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

Add async API for completion and completion_stream #11

Merged
merged 4 commits into from Mar 28, 2023

Conversation

agola11
Copy link
Contributor

@agola11 agola11 commented Mar 28, 2023

Add two new async methods to the Client using aiohttp:

  • acompletion
  • acompletion_stream

Add examples in the examples directory.

Note that it would be more efficient to reuse the aiohttp.ClientSessions but since this sdk is going to change anyways, I didn't bother adding that complexity.

To test, I ran all unit tests and examples.

@mikelambert mikelambert merged commit 836bbc1 into anthropics:main Mar 28, 2023
agola11 added a commit to langchain-ai/langchain that referenced this pull request Mar 29, 2023
wertycn pushed a commit to wertycn/langchain-zh that referenced this pull request Apr 26, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants