Skip to content

Commit 96ce84e

Browse files
authored
Update topP parameter (#40)
1 parent 3afefca commit 96ce84e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/SwiftOpenAI/OpenAI/DataModels/Chat/ChatCompletionsOptionalParameters.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import Foundation
22

33
public struct ChatCompletionsOptionalParameters {
44
public let temperature: Double?
5-
public let topP: Int?
5+
public let topP: Double?
66
public let n: Int?
77
public let stop: [String]?
88
public let stream: Bool
99
public let maxTokens: Int?
1010
public let user: String?
1111

1212
public init(temperature: Double = 1.0,
13-
topP: Int = 1,
13+
topP: Double = 1.0,
1414
n: Int = 1,
1515
stop: [String]? = nil,
1616
stream: Bool = false,

Sources/SwiftOpenAI/OpenAI/DataModels/Completions/CompletionsOptionalParameters.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public struct CompletionsOptionalParameters {
55
public let suffix: String?
66
public let maxTokens: Int?
77
public let temperature: Double?
8-
public let topP: Int?
8+
public let topP: Double?
99
public let n: Int?
1010
public let logprobs: Int?
1111
public let echo: Bool?
@@ -19,7 +19,7 @@ public struct CompletionsOptionalParameters {
1919
suffix: String = "",
2020
maxTokens: Int? = 16,
2121
temperature: Double? = 1.0,
22-
topP: Int? = 1,
22+
topP: Double? = 1.0,
2323
n: Int? = 1,
2424
logprobs: Int? = nil,
2525
echo: Bool? = false,

0 commit comments

Comments
 (0)