chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import asyncio
|
||||
|
||||
from agents import Agent, Runner
|
||||
|
||||
URL = "https://www.berkshirehathaway.com/letters/2024ltr.pdf"
|
||||
|
||||
|
||||
async def main():
|
||||
agent = Agent(
|
||||
name="Assistant",
|
||||
instructions="You are a helpful assistant.",
|
||||
)
|
||||
|
||||
result = await Runner.run(
|
||||
agent,
|
||||
[
|
||||
{
|
||||
"role": "user",
|
||||
"content": [{"type": "input_file", "file_url": URL}],
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"content": "Can you summarize the letter?",
|
||||
},
|
||||
],
|
||||
)
|
||||
print(result.final_output)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user