Skip to content

Commit 28e4d55

Browse files
RobitxJonas Remmert
andauthored
parameters: change max_tokens to max_completion_tokens (#274)
Signed-off-by: Jonas Remmert <j.remmert@phytec.de> Co-authored-by: Jonas Remmert <j.remmert@phytec.de>
1 parent b32327f commit 28e4d55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/gp/dispatcher.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ D.prepare_payload = function(messages, model, provider)
169169
model = model.model,
170170
stream = true,
171171
messages = messages,
172-
max_tokens = model.max_tokens or 4096,
172+
max_completion_tokens = model.max_completion_tokens or 4096,
173173
temperature = math.max(0, math.min(2, model.temperature or 1)),
174174
top_p = math.max(0, math.min(1, model.top_p or 1)),
175175
}
@@ -185,7 +185,7 @@ D.prepare_payload = function(messages, model, provider)
185185
end
186186
end
187187
-- remove max_tokens, top_p, temperature for o1 models. https://platform.openai.com/docs/guides/reasoning/beta-limitations
188-
output.max_tokens = nil
188+
output.max_completion_tokens = nil
189189
output.temperature = nil
190190
output.top_p = nil
191191
end

0 commit comments

Comments
 (0)