chore:minor adjustments
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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名称
|
||||
|
||||
Reference in New Issue
Block a user