When going from v0.6.2 -> v0.6.3 the following error started occurring on every new streamed token:
Error in on_llm_new_token callback: sequence item 1: expected a bytes-like object, str found
This happens for both regular chains and new agents as tested by multiple examples and a private app which uses lanarky.
This fix solves this by encoding the message body to utf-8.
Description
When going from
v0.6.2 -> v0.6.3
the following error started occurring on every new streamed token:Error in on_llm_new_token callback: sequence item 1: expected a bytes-like object, str found
This happens for both regular chains and new agents as tested by multiple examples and a private app which uses lanarky. This fix solves this by encoding the message body to utf-8.Changelog: