-
Notifications
You must be signed in to change notification settings - Fork 28
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
[ENH] - add support for Cohere assistants #307
[ENH] - add support for Cohere assistants #307
Conversation
a81385f
to
8bd016f
Compare
Quick status update The code seems to receive the JSON stream http responses without error, but is not parsing them properly. No error is reported in the terminal console when running the UI, but the UI response says that something went wrong. I believe this has to do with the type of streamedchatresponse. I'll do more work to try to fix this. Also, mypy complains when I run it after adapting |
@smokestacklightnin I took the liberty and had a look to unblock you. I've pushed bfc868b that implements the streaming. While Cohere also uses a streaming HTTP request, in contrast to Google they don't stream JSON, but rather JSONL. Meaning, each line is valid JSON. Thus, we don't need an extra library to resolve the stream, but rather just ingest the stream line by line and convert to JSON ourselves. |
@pmeier Thanks for the help! I'll continue working on this |
I added a I tested it, and it seems to be working nominally correctly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a few minor comments left. Otherwise this is good to go. Thanks @smokestacklightnin!
Everything is done. Glad to contribute! |
This addresses Issue #227
As always, comments and change requests are welcome and encouraged