chore:minor adjustments

This commit is contained in:
Annyfee
2025-12-27 09:48:52 +08:00
parent 0347c79add
commit b6482f1cf6
2 changed files with 6 additions and 3 deletions
+1 -2
View File
@@ -2,9 +2,8 @@ from agents.mcp import MCPServerStdio, MCPServerStdioParams
from openai import AsyncOpenAI
from agents.agent import Agent
from agents.models.openai_chatcompletions import OpenAIChatCompletionsModel
from config import OPENAI_API_KEY
from m12_agents_sdk_swarm.tools import execute_refund, check_seat
from config import AMAP_MAPS_API_KEY
from config import AMAP_MAPS_API_KEY,OPENAI_API_KEY
client = AsyncOpenAI(api_key=OPENAI_API_KEY, base_url="https://api.deepseek.com")
model = OpenAIChatCompletionsModel(model="deepseek-chat", openai_client=client)
+5 -1
View File
@@ -33,7 +33,11 @@ async def main():
messages.append({"role": "user", "content": user_input})
# 启动流式响应
result = Runner.run_streamed(cur_agent, input=messages, context=context_variables)
result = Runner.run_streamed(
cur_agent,
input=messages,
context=context_variables
)
# 状态变量
current_agent_name = None # 当前Agent名称