mirror of
https://github.com/hwchase17/langchain
synced 2024-11-08 07:10:35 +00:00
44ad9628c9
# Make FinalStreamingStdOutCallbackHandler more robust by ignoring new lines & white spaces `FinalStreamingStdOutCallbackHandler` doesn't work out of the box with `ChatOpenAI`, as it tokenized slightly differently than `OpenAI`. The response of `OpenAI` contains the tokens `["\nFinal", " Answer", ":"]` while `ChatOpenAI` contains `["Final", " Answer", ":"]`. This PR make `FinalStreamingStdOutCallbackHandler` more robust by ignoring new lines & white spaces when determining if the answer prefix has been reached. Fixes #5433 ## Who can review? Community members can review the PR once tests pass. Tag maintainers/contributors who might be interested: Tracing / Callbacks - @agola11 Twitter: [@UmerHAdil](https://twitter.com/@UmerHAdil) | Discord: RicChilligerDude#7589 |
||
---|---|---|
.. | ||
agent_executors/examples | ||
agents | ||
toolkits/examples | ||
tools | ||
agent_executors.rst | ||
agents.rst | ||
getting_started.ipynb | ||
how_to_guides.rst | ||
plan_and_execute.ipynb | ||
streaming_stdout_final_only.ipynb | ||
toolkits.rst | ||
tools.rst |