Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0001ff commit 46ae756Copy full SHA for 46ae756
examples/mcp/sse_example/main.py
@@ -15,7 +15,8 @@ async def run(mcp_server: MCPServer):
15
name="Assistant",
16
instructions="Use the tools to answer the questions.",
17
mcp_servers=[mcp_server],
18
- model_settings=ModelSettings(tool_choice="required"),
+ model="gpt-4o",
19
+ model_settings=ModelSettings(tool_choice="auto", temperature=0.08, top_p=0.8),
20
)
21
22
# Use the `add` tool to add two numbers
@@ -36,6 +37,11 @@ async def run(mcp_server: MCPServer):
36
37
result = await Runner.run(starting_agent=agent, input=message)
38
print(result.final_output)
39
40
+ message = "What's the capital of France?"
41
+ print(f"\n\nRunning: {message}")
42
+ result = await Runner.run(starting_agent=agent, input=message)
43
+ print(result.final_output)
44
+
45
46
async def main():
47
async with MCPServerSse(
0 commit comments