mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-16 07:14:29 -04:00
fix: assume new models are function call models (#2112)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@llamaindex/openai": patch
|
||||
---
|
||||
|
||||
fix: assume new models are function call models
|
||||
@@ -149,10 +149,9 @@ export function isFunctionCallingModel(llm: LLM): llm is OpenAI {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
const isChatModel = Object.keys(ALL_AVAILABLE_OPENAI_MODELS).includes(model);
|
||||
const isOld = model.includes("0314") || model.includes("0301");
|
||||
const isO1 = model.startsWith("o1");
|
||||
return isChatModel && !isOld && !isO1;
|
||||
return !isOld && !isO1;
|
||||
}
|
||||
|
||||
export function isReasoningModel(model: ChatModel | string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user