You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Cohere Team 👋 , I'm currently trying to implement async Token Streaming with Cohere (cohere==4.33). However, when running this code, I get some errors:
Not sure whether my implementation is incorrect, please let me know if my code is incorrect or if you can reproduce the error! Thanks a lot 🚀 Also happy about any directions to examples or documentation.
Edit: It works when I remove the async for loop in my code, but then the method gets synchronous :(
The text was updated successfully, but these errors were encountered:
Hey Cohere Team 👋 , I'm currently trying to implement async
Token Streaming
with Cohere (cohere==4.33
). However, when running this code, I get some errors:I get this error message:
TypeError: 'async for' requires an object with __aiter__ method, got bytes
Which comes from the
StreamingChat
object (code):When looking at the origin of the response, I get the
_request
method (code) which runs:Not sure whether my implementation is incorrect, please let me know if my code is incorrect or if you can reproduce the error! Thanks a lot 🚀 Also happy about any directions to examples or documentation.
Edit: It works when I remove the
async for
loop in my code, but then the method gets synchronous :(The text was updated successfully, but these errors were encountered: