Skip to content

Commit 0fc3087

Browse files
committed
fix: streamline copilot API request configuration
Reorganize the copilot API request options to improve code clarity and maintain consistent behavior. Move stream, n, and temperature parameters into the non-O1 condition block where they belong.
1 parent 047ea1c commit 0fc3087

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lua/CopilotChat/config/providers.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,13 @@ M.copilot = {
203203
local out = {
204204
messages = inputs,
205205
model = opts.model.id,
206-
stream = not is_o1,
207-
n = 1,
208206
}
209207

210208
if not is_o1 then
211-
out.temperature = opts.temperature
209+
out.n = 1
212210
out.top_p = 1
211+
out.stream = true
212+
out.temperature = opts.temperature
213213
end
214214

215215
if opts.model.max_output_tokens then

0 commit comments

Comments
 (0)