Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello World example fails in Jupyter #77

Closed
cmbant opened this issue Mar 12, 2025 · 2 comments
Closed

Hello World example fails in Jupyter #77

cmbant opened this issue Mar 12, 2025 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@cmbant
Copy link

cmbant commented Mar 12, 2025

The trivial Hello World example uses an event loop via run_sync, which immediately gives error in Jupyter notebook because there's already an event loop - another example may be better, e.g. this works

result = await Runner.run(agent, "Write a haiku about recursion in programming.")

The problem is documented somewhere, but quite offputting for new user trying to get started:

"""Run a workflow synchronously, starting at the given agent. Note that this just wraps the

@cmbant cmbant added the bug Something isn't working label Mar 12, 2025
@rm-openai rm-openai added documentation Improvements or additions to documentation and removed bug Something isn't working labels Mar 12, 2025
@rm-openai
Copy link
Collaborator

Thanks, makes sense. We can update docs. cc @dmitry-openai in case you have time.

@dmitry-openai
Copy link
Collaborator

Adding #113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants