Skip to content
Snippets Groups Projects
Unverified Commit 910eb36c authored by Sean Hatfield's avatar Sean Hatfield Committed by GitHub
Browse files

[FIX] OpenAI compatible endpoints query mode developer API bug fix (#1789)

fix query mode always responding with refusal message on develop api openai compatible endpoints
parent 7a78ad39
No related branches found
No related tags found
No related merge requests found
......@@ -112,8 +112,8 @@ async function chatSync({
}
// For OpenAI Compatible chats, we cannot do backfilling so we simply aggregate results here.
contextTexts = [...contextTexts];
sources = [...sources];
contextTexts = [...contextTexts, ...vectorSearchResults.contextTexts];
sources = [...sources, ...vectorSearchResults.sources];
// If in query mode and no context chunks are found from search, backfill, or pins - do not
// let the LLM try to hallucinate a response or use general knowledge and exit early
......@@ -328,8 +328,8 @@ async function streamChat({
}
// For OpenAI Compatible chats, we cannot do backfilling so we simply aggregate results here.
contextTexts = [...contextTexts];
sources = [...sources];
contextTexts = [...contextTexts, ...vectorSearchResults.contextTexts];
sources = [...sources, ...vectorSearchResults.sources];
// If in query mode and no context chunks are found from search, backfill, or pins - do not
// let the LLM try to hallucinate a response or use general knowledge and exit early
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment