Skip to content

Commit e549268

Browse files
authored
gpt-5
1 parent 6f045fa commit e549268

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lua/gp/dispatcher.lua

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ D.prepare_payload = function(messages, model, provider)
127127
},
128128
},
129129
generationConfig = {
130-
--temperature = math.max(0, math.min(2, model.temperature or 1)),
131-
--maxOutputTokens = model.max_tokens or 8192,
130+
temperature = math.max(0, math.min(2, model.temperature or 1)),
131+
maxOutputTokens = model.max_tokens or 8192,
132132
topP = math.max(0, math.min(1, model.top_p or 1)),
133133
topK = model.top_k or 100,
134134
},
@@ -190,6 +190,13 @@ D.prepare_payload = function(messages, model, provider)
190190
output.top_p = nil
191191
end
192192

193+
if model.model == "gpt-5" then
194+
-- remove max_tokens, top_p, temperature for gpt-5 models (duh)
195+
output.max_tokens = nil
196+
output.temperature = nil
197+
output.top_p = nil
198+
end
199+
193200
return output
194201
end
195202

0 commit comments

Comments
 (0)