File tree Expand file tree Collapse file tree 2 files changed +5
-59
lines changed Expand file tree Collapse file tree 2 files changed +5
-59
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,9 @@ Create your Python application (save as `example.py`):
105105import asyncio
106106import os
107107
108+ os.environ["GRPC_VERBOSITY"] = (
109+ "ERROR" # Suppress gRPC warnings caused by the Dapr Python SDK gRPC connection.
110+ )
108111from agents import Agent, Runner
109112from agents.extensions.memory import DaprSession
110113
@@ -127,19 +130,11 @@ async def main():
127130
128131 try:
129132 # First turn
130- result = await Runner.run(
131- agent,
132- "What city is the Golden Gate Bridge in?",
133- session=session
134- )
133+ result = await Runner.run(agent, "What city is the Golden Gate Bridge in?", session=session)
135134 print(f"Agent: {result.final_output}") # "San Francisco"
136135
137136 # Second turn - agent remembers context
138- result = await Runner.run(
139- agent,
140- "What state is it in?",
141- session=session
142- )
137+ result = await Runner.run(agent, "What state is it in?", session=session)
143138 print(f"Agent: {result.final_output}") # "California"
144139
145140 finally:
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments