We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db3cd17 commit 2d9f951Copy full SHA for 2d9f951
Sources/AnthropicSwiftSDK/Entity/SystemPrompt.swift
@@ -35,10 +35,10 @@ public enum SystemPrompt {
35
}
36
37
extension SystemPrompt: Encodable {
38
- enum CodingKeys: CodingKey {
+ enum CodingKeys: String, CodingKey {
39
case type
40
case text
41
- case cache_control
+ case cacheControl = "cache_control"
42
43
44
public func encode(to encoder: any Encoder) throws {
@@ -50,7 +50,7 @@ extension SystemPrompt: Encodable {
50
try container.encode(type, forKey: .type)
51
try container.encode(text, forKey: .text)
52
if let cacheControl {
53
- try container.encode(cacheControl, forKey: .cache_control)
+ try container.encode(cacheControl, forKey: .cacheControl)
54
55
56
0 commit comments