mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-16 07:14:29 -04:00
fix: delete temp competely from params when calling openai o3 (#1629)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@llamaindex/openai": patch
|
||||
---
|
||||
|
||||
fix: moved the temp exclusion lower level for o3 mini openai
|
||||
@@ -364,7 +364,7 @@ export class OpenAI extends ToolCallLLM<OpenAIAdditionalChatOptions> {
|
||||
const { messages, stream, tools, additionalChatOptions } = params;
|
||||
const baseRequestParams = <OpenAILLM.Chat.ChatCompletionCreateParams>{
|
||||
model: this.model,
|
||||
temperature: isTemperatureSupported(this.model) ? this.temperature : null,
|
||||
temperature: this.temperature,
|
||||
reasoning_effort: this.reasoningEffort,
|
||||
max_tokens: this.maxTokens,
|
||||
tools: tools?.map(OpenAI.toTool),
|
||||
@@ -381,6 +381,9 @@ export class OpenAI extends ToolCallLLM<OpenAIAdditionalChatOptions> {
|
||||
delete baseRequestParams.tools;
|
||||
}
|
||||
|
||||
if (!isTemperatureSupported(baseRequestParams.model))
|
||||
delete baseRequestParams.temperature;
|
||||
|
||||
// Streaming
|
||||
if (stream) {
|
||||
return this.streamChat(baseRequestParams);
|
||||
|
||||
Reference in New Issue
Block a user