Skip to content

Commit cc758ac

Browse files
committed
fix: fix typos in MaxCompletionTokens variable name
- Fix typo in `MaxCompletionTokens` variable name in `CreateFunctionCall` method - Fix typo in `MaxCompletionTokens` variable name in `CreateChatCompletion` method Signed-off-by: appleboy <[email protected]>
1 parent a080e41 commit cc758ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openai/openai.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func (c *Client) CreateFunctionCall(
141141

142142
if checkO1Serial.MatchString(c.model) {
143143
req.MaxTokens = 0
144-
req.MaxCompletionsTokens = c.maxTokens
144+
req.MaxCompletionTokens = c.maxTokens
145145
}
146146

147147
return c.client.CreateChatCompletion(ctx, req)
@@ -173,7 +173,7 @@ func (c *Client) CreateChatCompletion(
173173

174174
if checkO1Serial.MatchString(c.model) {
175175
req.MaxTokens = 0
176-
req.MaxCompletionsTokens = c.maxTokens
176+
req.MaxCompletionTokens = c.maxTokens
177177
}
178178

179179
return c.client.CreateChatCompletion(ctx, req)

0 commit comments

Comments
 (0)