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 a1ad518 commit 3a16a24Copy full SHA for 3a16a24
examples/basic/remote_pdf.py
@@ -0,0 +1,31 @@
1
+import asyncio
2
+
3
+from agents import Agent, Runner
4
5
+URL = "https://www.berkshirehathaway.com/letters/2024ltr.pdf"
6
7
8
+async def main():
9
+ agent = Agent(
10
+ name="Assistant",
11
+ instructions="You are a helpful assistant.",
12
+ )
13
14
+ result = await Runner.run(
15
+ agent,
16
+ [
17
+ {
18
+ "role": "user",
19
+ "content": [{"type": "input_file", "file_url": URL}],
20
+ },
21
22
23
+ "content": "Can you summarize the letter?",
24
25
+ ],
26
27
+ print(result.final_output)
28
29
30
+if __name__ == "__main__":
31
+ asyncio.run(main())
0 commit comments