Skip to content

Commit d70da5a

Browse files
committed
public
1 parent 22c1c71 commit d70da5a

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

Sources/OpenAIStructure/AnyCodable.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
import 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()

Sources/OpenAIStructure/OpenAIModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

Sources/OpenAIStructure/OpenAIRequest.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
import Foundation
99

1010
public 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]) {

0 commit comments

Comments
 (0)