-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipeline Chat History #693
base: main
Are you sure you want to change the base?
Conversation
Very cool. I think we also want no history, or perhaps it should be implemented as a max number of messages to keep (which could be zero). I think in the translation case you likely don't want much, if any, history as it's just x-shot prompting that unnecessarily gets expensive. I think you also wouldn't want to spend tokens on compression / summerization activities either in that case. |
c99ebac
to
fff6dc5
Compare
fff6dc5
to
962f236
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files📢 Thoughts on this report? Let us know! |
Description
This adds three different Chat History types to the pipelines:
Node
history stores and includes the history for only that particular node. ANamed
history can be shared between nodes.Global
history is the history for the full pipeline run (i.e. the input and output of the pipeline).Global
history uses the currentChatHistory
model, and similarly will compress this history, using whatever LLM is associated with the node that is requesting that history to be inserted.Note, if you have multiple LLMs with different allowed token lengths, I think you will need to set all of them to be the minimum of all the token lengths, otherwise you get errors.
For now,
node
andnamed
history do not compress their history.In follow up PRs I will work on ways of storing multiple compressed summaries so that the same history can be shared between nodes with different context lengths. At that time, I will also implement compression of the named and node history types.
User Impact
Allows actually chatting with a pipeline, rather than just sending a single message.
Demo
Screencast.from.2024-09-20.15-31-19.webm
Docs