mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 05:29:12 +00:00
s/online_context/onlineContext chat API response field for consistency
This will align the name of the online context field returned by current chat message and chat history
This commit is contained in:
@@ -515,7 +515,7 @@ function processMessageChunk(rawChunk) {
|
||||
isVoice: false,
|
||||
}
|
||||
} else if (chunk.type === "references") {
|
||||
chatMessageState.references = {"notes": chunk.data.context, "online": chunk.data.online_results};
|
||||
chatMessageState.references = {"notes": chunk.data.context, "online": chunk.data.onlineContext};
|
||||
} else if (chunk.type === 'message') {
|
||||
const chunkData = chunk.data;
|
||||
if (typeof chunkData === 'object' && chunkData !== null) {
|
||||
|
||||
@@ -947,7 +947,7 @@ export class KhojChatView extends KhojPaneView {
|
||||
isVoice: false,
|
||||
};
|
||||
} else if (chunk.type === "references") {
|
||||
this.chatMessageState.references = {"notes": chunk.data.context, "online": chunk.data.online_results};
|
||||
this.chatMessageState.references = {"notes": chunk.data.context, "online": chunk.data.onlineContext};
|
||||
} else if (chunk.type === 'message') {
|
||||
const chunkData = chunk.data;
|
||||
if (typeof chunkData === 'object' && chunkData !== null) {
|
||||
|
||||
@@ -834,7 +834,7 @@ To get started, just start typing below. You can also type / to see a list of co
|
||||
isVoice: false,
|
||||
}
|
||||
} else if (chunk.type === "references") {
|
||||
chatMessageState.references = {"notes": chunk.data.context, "online": chunk.data.online_results};
|
||||
chatMessageState.references = {"notes": chunk.data.context, "online": chunk.data.onlineContext};
|
||||
} else if (chunk.type === 'message') {
|
||||
const chunkData = chunk.data;
|
||||
if (typeof chunkData === 'object' && chunkData !== null) {
|
||||
|
||||
@@ -831,7 +831,7 @@ async def chat(
|
||||
{
|
||||
"inferredQueries": inferred_queries,
|
||||
"context": compiled_references,
|
||||
"online_results": online_results,
|
||||
"onlineContext": online_results,
|
||||
},
|
||||
):
|
||||
yield result
|
||||
@@ -887,7 +887,7 @@ async def chat(
|
||||
"content-type": "application/json",
|
||||
"intentType": intent_type,
|
||||
"context": compiled_references,
|
||||
"online_results": online_results,
|
||||
"onlineContext": online_results,
|
||||
"inferredQueries": [improved_image_prompt],
|
||||
"image": image,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user