Skip to content

Commit f06d7ea

Browse files
committed
Make the types Encodable
1 parent 39132c1 commit f06d7ea

3 files changed

Lines changed: 382 additions & 108 deletions

File tree

Tool/Sources/ChatBasic/ChatGPTFunction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public extension ChatGPTArgumentsCollectingFunction {
8989
}
9090
}
9191

92-
public struct ChatGPTFunctionSchema: Codable, Equatable {
92+
public struct ChatGPTFunctionSchema: Codable, Equatable, Sendable {
9393
public var name: String
9494
public var description: String
9595
public var parameters: JSONSchemaValue

Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ public actor ClaudeChatCompletionsService: ChatCompletionsStreamAPI, ChatComplet
127127
var stop_sequence: String?
128128
}
129129

130-
struct RequestBody: Encodable, Equatable {
131-
struct CacheControl: Encodable, Equatable {
132-
enum CacheControlType: String, Codable, Equatable {
130+
public struct RequestBody: Encodable, Equatable {
131+
public struct CacheControl: Codable, Equatable, Sendable {
132+
public enum CacheControlType: String, Codable, Equatable, Sendable {
133133
case ephemeral
134134
}
135135

136-
var type: CacheControlType = .ephemeral
136+
public var type: CacheControlType = .ephemeral
137137
}
138138

139139
struct MessageContent: Encodable, Equatable {

0 commit comments

Comments
 (0)