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

Improve support for sync/async & streaming/non-streaming #76

Open
KennyVaneetvelde opened this issue Feb 3, 2025 · 2 comments
Open

Comments

@KennyVaneetvelde
Copy link
Member

Right now we can use the .run() method in BaseAgent for normal responses, and .run_async() for streaming responses.

It would be even better to support all 4 possible configurations and have:

  • .run()
  • .run_async()
  • .run_streaming()
  • .run_streaming_async()
    (Exact naming scheme to be decided)
@jonchun
Copy link
Contributor

jonchun commented Feb 3, 2025

I agree - I think the way it's currently setup was a little against convention and may have tripped me up.

run_async to me means it is the same as run() but done in an async manner. e.g.

run() -> OutputT
run_async() -> Coroutine[None, None, OutputT]

@KennyVaneetvelde
Copy link
Member Author

Yes exactly, my implementation was creating some false expectations so no worries!

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

No branches or pull requests

2 participants