forked from Archives/langchain
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 |
||
---|---|---|
.. | ||
_static | ||
additional_resources | ||
ecosystem | ||
getting_started | ||
integrations | ||
modules | ||
reference | ||
templates | ||
tracing | ||
use_cases | ||
conf.py | ||
dependents.md | ||
index.rst | ||
integrations.rst | ||
make.bat | ||
Makefile | ||
reference.rst | ||
requirements.txt |