openai chat temperature fix
frdel committed
Feb 8, 2025 at 09:47 UTC
2eef19651f83a5ed2a68d20677a5e5046172c916
4 files changed
+8
-12
memory/default/.gitkeep
models.py
+2
-6
@@ -316,12 +316,8 @@ def get_deepseek_chat(
316
dotenv.get_dotenv_value("DEEPSEEK_BASE_URL") or "https://api.deepseek.com"
317
)
318
319
- model = ChatOpenAI(api_key=api_key, model=model_name, base_url=base_url, **kwargs) # type: ignore
320
- # little hack for reasoning model's problem with temperature
321
- if not "temperature" in kwargs:
322
- model.temperature = None # type: ignore
323
- return model
324
-
319
+ return ChatOpenAI(api_key=api_key, model=model_name, base_url=base_url, **kwargs) # type: ignore
320
+
321
# OpenRouter models
322
def get_openrouter_chat(
323
model_name: str,
python/helpers/settings.py
+5
-5
@@ -488,12 +488,12 @@ def convert_out(settings: Settings) -> SettingsOutput:
488
"id": "agent_memory_subdir",
489
"title": "Memory Subdirectory",
490
"description": "Subdirectory of /memory folder to use for agent memory storage. Used to separate memory storage between different instances.",
491
- "type": "select",
491
+ "type": "text",
492
"value": settings["agent_memory_subdir"],
493
- "options": [
494
- {"value": subdir, "label": subdir}
495
- for subdir in files.get_subdirectories("memory", exclude="embeddings")
496
- ],
493
+ # "options": [
494
+ # {"value": subdir, "label": subdir}
495
+ # for subdir in files.get_subdirectories("memory", exclude="embeddings")
496
+ # ],
497
}
498
)
499
requirements.txt
+1
-1
@@ -15,7 +15,7 @@ langchain-groq==0.2.2
15
langchain-huggingface==0.1.2
16
langchain-mistralai==0.2.4
17
langchain-ollama==0.2.2
18
-langchain-openai==0.2.14
18
+langchain-openai==0.3.4
19
openai-whisper==20240930
20
lxml_html_clean==0.3.1
21
markdown==3.7