You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/docs/modules
UmerHA 44ad9628c9
QuickFix for FinalStreamingStdOutCallbackHandler: Ignore new lines & white spaces (#5497)
# 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
1 year ago
..
agents QuickFix for FinalStreamingStdOutCallbackHandler: Ignore new lines & white spaces (#5497) 1 year ago
callbacks Dev2049/add argilla callback (#5621) 1 year ago
chains Fixed multi input prompt for MapReduceChain (#4979) 1 year ago
indexes Implements support for Personal Access Token Authentication in the ConfluenceLoader (#5385) 1 year ago
memory Documentation fixes (linting and broken links) (#5563) 1 year ago
models Bedrock llm and embeddings (#5464) 1 year ago
prompts docs: `modules` pages simplified (#5116) 1 year ago
utils/examples Pass parsed inputs through to tool _run (#4309) 1 year ago
agents.rst docs: `modules` pages simplified (#5116) 1 year ago
chains.rst docs: `modules` pages simplified (#5116) 1 year ago
indexes.rst docs: `modules` pages simplified (#5116) 1 year ago
memory.rst docs: `modules` pages simplified (#5116) 1 year ago
models.rst docs: `modules` pages simplified (#5116) 1 year ago
paul_graham_essay.txt Fix notebook example (#3142) 1 year ago
prompts.rst docs: `modules` pages simplified (#5116) 1 year ago
state_of_the_union.txt Docs refactor (#480) 2 years ago