-
Notifications
You must be signed in to change notification settings - Fork 409
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
fix: return actual source nodes with compact and refine response synt… #1554
fix: return actual source nodes with compact and refine response synt… #1554
Conversation
🦋 Changeset detectedLatest commit: 0b89cae The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@GunnarHolwerda is attempting to deploy a commit to the LlamaIndex Team on Vercel. A member of the Team first needs to authorize it. |
async getResponse( | ||
query: MessageContent, | ||
nodes: NodeWithScore[], | ||
stream: true, | ||
): Promise<AsyncIterable<EngineResponse>>; | ||
async getResponse( | ||
query: MessageContent, | ||
nodes: NodeWithScore[], | ||
stream: false, | ||
): Promise<EngineResponse>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added these signatures so that I didn't have to do more type jumbling after grabbing the original response and transforming it. If this is not accurate please let me know, but based on my knowledge if stream = true
it will always be an AsyncIterable.
bdd6e90
to
cfed16d
Compare
…hesizer Before we were only returning the packed text chunks in EngineResponse.sourceNodes for this response synthesizer. This is different than how every other synthesizer works.
cfed16d
to
57eb4e7
Compare
@llamaindex/autotool
@llamaindex/cloud
@llamaindex/community
@llamaindex/core
@llamaindex/experimental
@llamaindex/env
llamaindex
@llamaindex/node-parser
@llamaindex/readers
@llamaindex/wasm-tools
@llamaindex/workflow
@llamaindex/anthropic
@llamaindex/deepinfra
@llamaindex/clip
@llamaindex/groq
@llamaindex/huggingface
@llamaindex/ollama
@llamaindex/openai
@llamaindex/portkey-ai
@llamaindex/vercel
@llamaindex/replicate
@llamaindex/vllm
commit: |
Description of Changes
Updates the
Refine
responseSynthesizer to return thesourceNodes
in the response as the original nodes that were provided to the synthesizer. This persists the behavior of it prior to 0.5.20 and the other synthesizers whereEngineResponse.sourceNodes
is set to the value of the original source nodes that were provided. With the prior implementation it was returning the packed text chunks which would lose context of the document information.Fixes: #1552