Shroominic commited on
Commit
25a640f
·
1 Parent(s): 45fad9b

first implementation still wip

Browse files
Files changed (1) hide show
  1. examples/plot_sin_wave.py +15 -1
examples/plot_sin_wave.py CHANGED
@@ -1 +1,15 @@
1
- # TODO: ask the agent to plot a sin wave and check if an image in the output and show it to the user with PIL.show()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from codeinterpreterapi import CodeInterpreterSession
2
+
3
+
4
+ async def main():
5
+ async with CodeInterpreterSession() as session:
6
+ user_request = "Plot a sin wave and show it to me."
7
+ output = await session.generate_response(user_request)
8
+
9
+ print(output.content)
10
+ print(output.files)
11
+
12
+
13
+ if __name__ == "__main__":
14
+ import asyncio
15
+ asyncio.run(main())