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.
2 parents 136e2b4 + d56047b commit 486b4e8Copy full SHA for 486b4e8
docs/context.md
@@ -41,14 +41,14 @@ async def fetch_user_age(wrapper: RunContextWrapper[UserInfo]) -> str: # (2)!
41
return f"User {wrapper.context.name} is 47 years old"
42
43
async def main():
44
- user_info = UserInfo(name="John", uid=123) # (3)!
+ user_info = UserInfo(name="John", uid=123)
45
46
- agent = Agent[UserInfo]( # (4)!
+ agent = Agent[UserInfo]( # (3)!
47
name="Assistant",
48
tools=[fetch_user_age],
49
)
50
51
- result = await Runner.run(
+ result = await Runner.run( # (4)!
52
starting_agent=agent,
53
input="What is the age of the user?",
54
context=user_info,
0 commit comments