File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 77
88import Foundation
99
10- struct AnyCodable : Codable , @unchecked Sendable {
11- let value : Any
10+ public struct AnyCodable : Codable , @unchecked Sendable {
11+ public let value : Any
1212
13- init ( from decoder: Decoder ) throws {
13+ public init ( from decoder: Decoder ) throws {
1414 let container = try decoder. singleValueContainer ( )
1515 if container. decodeNil ( ) {
1616 self . value = ( )
@@ -32,7 +32,7 @@ struct AnyCodable: Codable, @unchecked Sendable {
3232 }
3333 }
3434
35- func encode( to encoder: Encoder ) throws {
35+ public func encode( to encoder: Encoder ) throws {
3636 var container = encoder. singleValueContainer ( )
3737 switch value {
3838 case is Void : try container. encodeNil ( )
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public enum OpenAIModel: Sendable {
1919 case gpt4_1_nano
2020 case o4_mini( reasoningEffort: ReasoningEffort )
2121
22- var modelName : String {
22+ public var modelName : String {
2323 switch self {
2424 case . gpt4_1:
2525 " gpt-4.1 "
@@ -32,7 +32,7 @@ public enum OpenAIModel: Sendable {
3232 }
3333 }
3434
35- var hasReasoning : Bool {
35+ public var hasReasoning : Bool {
3636 switch self {
3737 case . gpt4_1, . gpt4_1_mini, . gpt4_1_nano:
3838 false
Original file line number Diff line number Diff line change 88import Foundation
99
1010public enum OpenAIRequest {
11- private static let endpoint = URL ( string: " https://api.openai.com/v1/responses " ) !
11+ public static let endpoint = URL ( string: " https://api.openai.com/v1/responses " ) !
1212
13- struct Payload < Schema: Codable > : Codable {
13+ public struct Payload < Schema: Codable > : Codable {
1414 let model : String
1515 let input : String
1616 let reasoning : Reasoning
1717 let instructions : String
1818 let text : TextObject
19- struct Reasoning : Codable {
19+ public struct Reasoning : Codable {
2020 let effort : String ?
2121 }
22- struct TextObject : Codable {
22+ public struct TextObject : Codable {
2323 let format : Schema
2424 }
2525 }
@@ -64,19 +64,19 @@ public enum OpenAIRequest {
6464 return result
6565 }
6666
67- struct PayloadWithImage < Schema: Codable > : Codable {
67+ public struct PayloadWithImage < Schema: Codable > : Codable {
6868 let model : String
6969 let input : [ Input ]
7070 let reasoning : Reasoning
7171 let instructions : String
7272 let text : TextObject
73- struct Reasoning : Codable {
73+ public struct Reasoning : Codable {
7474 let effort : String ?
7575 }
76- struct TextObject : Codable {
76+ public struct TextObject : Codable {
7777 let format : Schema
7878 }
79- struct Input : Codable {
79+ public struct Input : Codable {
8080 var role : String
8181 var content : [ Content ]
8282 init ( content: [ Content ] ) {
You can’t perform that action at this time.
0 commit comments