mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 19:04:37 +00:00
OpenAI completions toolChoice fix (#998)
* openai completions tools fix * Reset generated file --------- Co-authored-by: williamtwomey <ai@shadylawn.net>
This commit is contained in:
parent
dd854c4a75
commit
41d2c7ff38
2 changed files with 77 additions and 0 deletions
|
|
@ -333,10 +333,12 @@ export const streamSimpleOpenAICompletions: StreamFunction<"openai-completions",
|
|||
|
||||
const base = buildBaseOptions(model, options, apiKey);
|
||||
const reasoningEffort = supportsXhigh(model) ? options?.reasoning : clampReasoning(options?.reasoning);
|
||||
const toolChoice = (options as OpenAICompletionsOptions | undefined)?.toolChoice;
|
||||
|
||||
return streamOpenAICompletions(model, context, {
|
||||
...base,
|
||||
reasoningEffort,
|
||||
toolChoice,
|
||||
} satisfies OpenAICompletionsOptions);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue