Skip to content

Commit

Permalink
syncify
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Aug 8, 2023
1 parent 5468174 commit 2e98ce9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/show_bitcoin_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
from codeinterpreterapi import CodeInterpreterSession


async def main():
async with CodeInterpreterSession() as session:
def main():
with CodeInterpreterSession(local=True) as session:
currentdate = datetime.now().strftime("%Y-%m-%d")

response = await session.generate_response(
response = session.generate_response_sync(
f"Plot the bitcoin chart of 2023 YTD (today is {currentdate})"
)

Expand All @@ -16,6 +16,4 @@ async def main():


if __name__ == "__main__":
import asyncio

asyncio.run(main())
main()

0 comments on commit 2e98ce9

Please sign in to comment.