Skip to content

Commit 2d9f951

Browse files
committed
fix lint
1 parent db3cd17 commit 2d9f951

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/AnthropicSwiftSDK/Entity/SystemPrompt.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public enum SystemPrompt {
3535
}
3636

3737
extension SystemPrompt: Encodable {
38-
enum CodingKeys: CodingKey {
38+
enum CodingKeys: String, CodingKey {
3939
case type
4040
case text
41-
case cache_control
41+
case cacheControl = "cache_control"
4242
}
4343

4444
public func encode(to encoder: any Encoder) throws {
@@ -50,7 +50,7 @@ extension SystemPrompt: Encodable {
5050
try container.encode(type, forKey: .type)
5151
try container.encode(text, forKey: .text)
5252
if let cacheControl {
53-
try container.encode(cacheControl, forKey: .cache_control)
53+
try container.encode(cacheControl, forKey: .cacheControl)
5454
}
5555
}
5656
}

0 commit comments

Comments
 (0)