feat(llm): update model and reasoning parameters
Some checks failed
Build and Push Docker / build-and-push (push) Failing after 31s
Some checks failed
Build and Push Docker / build-and-push (push) Failing after 31s
This commit is contained in:
@@ -149,8 +149,10 @@ async def chat_stream_endpoint(request: Request):
|
||||
payload["messages"] = messages
|
||||
payload.pop("user_id", None)
|
||||
payload.pop("include_audio", None)
|
||||
if not payload.get("model"):
|
||||
payload["model"] = OPENAI_LLM_MODEL
|
||||
payload["model"] = OPENAI_LLM_MODEL
|
||||
payload["thinking"] = {"type": "disabled"}
|
||||
payload["reasoning"] = {"effort": "minimal"}
|
||||
payload["max_tokens"] = 200
|
||||
payload["stream"] = True
|
||||
|
||||
base_url = OPENAI_API_BASE_URL_CONFIG or ""
|
||||
|
||||
@@ -30,7 +30,7 @@ OPENAI_EMBEDDING_MODEL = "doubao-embedding-large-text-250515"
|
||||
OPENAI_EMBEDDING_DIM = 2048
|
||||
OPENAI_EMBEDDING_KEY = os.getenv("DOUBAO_API_KEY", "YOUR_API_KEY_PLACEHOLDER_IF_NOT_IN_ENV")
|
||||
OPENAI_EMBEDDING_BASE = "https://ark.cn-beijing.volces.com/api/v3"
|
||||
OPENAI_LLM_MODEL = "doubao-seed-1-6-251015"
|
||||
OPENAI_LLM_MODEL = "doubao-seed-1-8-251228"
|
||||
|
||||
# ---huggingface模型---
|
||||
HUGGINGFACE_KEY = "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"
|
||||
@@ -63,7 +63,7 @@ MEM0_CONFIG = {
|
||||
"provider": "openai",
|
||||
"config": {
|
||||
"api_key": OPENAI_API_KEY_FROM_CONFIG,
|
||||
"model": "doubao-seed-1-6-250615",
|
||||
"model": OPENAI_LLM_MODEL,
|
||||
"openai_base_url": OPENAI_API_BASE_URL_CONFIG
|
||||
}
|
||||
},
|
||||
|
||||
@@ -54,7 +54,7 @@ MEM0_CONFIG = {
|
||||
"provider": "openai",
|
||||
"config": {
|
||||
"api_key": OPENAI_API_KEY_FROM_CONFIG,
|
||||
"model": "doubao-seed-1-6-250615",
|
||||
"model": "doubao-seed-1-8-251228",
|
||||
"openai_base_url": OPENAI_API_BASE_URL_CONFIG
|
||||
}
|
||||
},
|
||||
|
||||
@@ -417,7 +417,9 @@ class LocalMemoryIntegration:
|
||||
{"role": "system", "content": system_prompt},
|
||||
{"role": "user", "content": user_input}
|
||||
],
|
||||
# reasoning_effort="minimal", # 你原始代码里的,如果豆包不支持就删掉
|
||||
thinking={"type": "disabled"},
|
||||
reasoning={"effort": "minimal"},
|
||||
max_tokens=200,
|
||||
# 推荐开启 JSON 模式,让豆包强制输出 JSON
|
||||
response_format={"type": "json_object"}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user