Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix: Fixes empty input in the langchain stream calls #538

Conversation

noble-varghese
Copy link
Contributor

@noble-varghese noble-varghese commented Apr 7, 2024

Description

  • Fixes the input in the stream calls by adding the inputs in chain streaming and astream calling

Issue: langfuse/langfuse#1589

@noble-varghese noble-varghese marked this pull request as ready for review April 7, 2024 14:24
@noble-varghese noble-varghese requested a review from a team April 7, 2024 14:24
@marcklingen marcklingen requested review from maxdeichmann and hassiebp and removed request for maxdeichmann April 8, 2024 12:21
@hassiebp
Copy link
Contributor

hassiebp commented Apr 8, 2024

@noble-varghese Do I understand correctly from your changes that the underlying issue was that vor .achat chains there was no input on the on_chain_start callback, but only delivered in the on_chain_end callback?

@noble-varghese
Copy link
Contributor Author

@hassiebp Yes, in the case of the streaming data the input passed on the on_chain_start method from langchain contains a dummy input and not the actual input passed by the user. The complete input is only delivered at the end of the chain on the on_chain_end method.
You can check the code here from langchain where the input is being passed as a dummy input for the streaming data.

@hassiebp hassiebp changed the base branch from main to lfe-711-missing-input-langchain-stream-calls April 8, 2024 15:16
@hassiebp hassiebp merged commit 4c0c9dd into langfuse:lfe-711-missing-input-langchain-stream-calls Apr 8, 2024
3 of 8 checks passed
hassiebp added a commit that referenced this pull request Apr 8, 2024
Co-authored-by: Noble Varghese <noblekvarghese96@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants