Skip to content

Commit

Permalink
fix(openai): #619 o1 streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Jan 8, 2025
1 parent 8bfb496 commit 83786d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/codecompanion/adapters/openai.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ return {
---@param self CodeCompanion.Adapter
---@return boolean
setup = function(self)
local model = self.schema.model.default
local model_opts = self.schema.model.choices[model]
if model_opts and model_opts.opts then
self.opts = vim.tbl_deep_extend("force", self.opts, model_opts.opts)
end

if self.opts and self.opts.stream then
self.parameters.stream = true
self.parameters.stream_options = { include_usage = true }
Expand Down

0 comments on commit 83786d8

Please sign in to comment.