feat(v2): 补齐模型连接与会议反馈闭环并完成真实模拟联调
This commit is contained in:
@@ -36,7 +36,7 @@ from langchain_openai import ChatOpenAI
|
||||
|
||||
from contracts.prescreen import ErrorCode, KnowledgeExtraction
|
||||
from graph.agent import agent_manager
|
||||
from services import assistant_model, assistant_store as store, knowledge_cards
|
||||
from services import assistant_model, assistant_store as store, knowledge_cards, model_settings
|
||||
from services.assistant_materials import FIELDS
|
||||
|
||||
KIND = "knowledge_extraction"
|
||||
@@ -122,7 +122,7 @@ def _call_model(config: dict, system_prompt: str, task: dict,
|
||||
在结构上不可能,而不是靠提示词请求模型自觉。
|
||||
"""
|
||||
with httpx.Client(trust_env=False, follow_redirects=False, timeout=TIMEOUT_SECONDS) as client:
|
||||
model = ChatOpenAI(model=config["name"], api_key=os.getenv("XINGBANG_LOCAL_MODEL_KEY", "local"),
|
||||
model = ChatOpenAI(model=config["name"], api_key=model_settings.api_key(),
|
||||
base_url=config["endpoint"].rstrip("/"), http_client=client,
|
||||
temperature=0, max_tokens=max_tokens, max_retries=0)
|
||||
result = agent_manager.invoke_scoped(json.dumps(task, ensure_ascii=False), model=model,
|
||||
|
||||
Reference in New Issue
Block a user