hjg 账号默认使用 DeepSeek Pro AI 配置
This commit is contained in:
@@ -285,6 +285,8 @@ async def analyze_rotation_stream(
|
||||
repo,
|
||||
days: int = 12,
|
||||
focus: str = "",
|
||||
*,
|
||||
username: str | None = None,
|
||||
) -> AsyncIterator[str]:
|
||||
"""流式概念轮动分析: yield 出每个 NDJSON 事件。
|
||||
|
||||
@@ -329,7 +331,7 @@ async def analyze_rotation_stream(
|
||||
try:
|
||||
from app.services.ai_provider import stream_ai_text, ai_configured
|
||||
|
||||
if not ai_configured():
|
||||
if not ai_configured(username=username):
|
||||
yield json.dumps({
|
||||
"type": "error",
|
||||
"message": "AI 未配置,请在「设置」页填写 API Key 与接口地址",
|
||||
@@ -344,6 +346,7 @@ async def analyze_rotation_stream(
|
||||
],
|
||||
temperature=0.5,
|
||||
max_tokens=4000,
|
||||
username=username,
|
||||
):
|
||||
yield json.dumps({"type": "delta", "content": delta}, ensure_ascii=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user