Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export async function streamDocsAiChat({
query,
history = [],
conversationId,
anchorUrl = '',
rewriteQuery = false,
signal,
onToken,
Expand All @@ -20,6 +21,9 @@ export async function streamDocsAiChat({
if (conversationId) {
attributes.conversation_id = conversationId;
}
if (anchorUrl) {
attributes.anchor_url = anchorUrl;
}
// Tells the API to rewrite the query for better retrieval (first message only)
if (rewriteQuery) {
attributes.rewrite_query = true;
Expand Down
1 change: 1 addition & 0 deletions assets/scripts/components/conversational-search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ class ConversationalSearch {
query,
history: isFirstMessage ? [] : this.chatHistory.slice(0, -1),
conversationId: this.conversationId,
anchorUrl: window.location.href,
rewriteQuery: isFirstMessage && this.shouldRewriteQuery && !isSuggestion,
signal: this.abortController.signal,
onThinking: (message) => {
Expand Down
Loading