Merge pull request #4062 from pczekaj/o3-mini-tools
Add tools support for o3-mini
This commit is contained in:
commit
732eb248b8
2 changed files with 2 additions and 2 deletions
|
|
@ -267,7 +267,7 @@ class OpenAI extends BaseLLM {
|
|||
body.max_completion_tokens = undefined;
|
||||
}
|
||||
|
||||
if (body.tools?.length) {
|
||||
if (body.tools?.length && !body.model?.startsWith("o3")) {
|
||||
// To ensure schema adherence: https://platform.openai.com/docs/guides/function-calling#parallel-function-calling-and-structured-outputs
|
||||
// In practice, setting this to true and asking for multiple tool calls
|
||||
// leads to "arguments" being something like '{"file": "test.ts"}{"file": "test.js"}'
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export const PROVIDER_TOOL_SUPPORT: Record<
|
|||
},
|
||||
openai: (model) => {
|
||||
// https://platform.openai.com/docs/guides/function-calling#models-supporting-function-calling
|
||||
if (model.toLowerCase().startsWith("gpt-4")) {
|
||||
if (model.toLowerCase().startsWith("gpt-4") || model.toLowerCase().startsWith("o3")) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue