This commit is contained in:
HuangHai
2026-01-21 08:51:44 +08:00
parent 7206bd554c
commit 2fda6f0dcf
6 changed files with 156 additions and 61 deletions

View File

@@ -45,7 +45,7 @@ async def get_llm_response(query_text: str, stream: bool = True, system_prompt:
request_params['temperature'] = temperature
# 创建请求
completion = await client.chat.completions.create(**request_params)
completion = await asyncio.wait_for(client.chat.completions.create(**request_params), timeout=60.0)
if stream:
# 流式输出模式,返回生成器