mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 13:22:12 +00:00
Update clients to support rendering webp images inline
This is for self-hosted scenarios where AWS S3 uploads is not enabled
This commit is contained in:
@@ -214,6 +214,8 @@
|
|||||||
imageMarkdown = ``;
|
imageMarkdown = ``;
|
||||||
} else if (intentType === "text-to-image2") {
|
} else if (intentType === "text-to-image2") {
|
||||||
imageMarkdown = ``;
|
imageMarkdown = ``;
|
||||||
|
} else if (intentType === "text-to-image-v3") {
|
||||||
|
imageMarkdown = ``;
|
||||||
}
|
}
|
||||||
|
|
||||||
const inferredQuery = inferredQueries?.[0];
|
const inferredQuery = inferredQueries?.[0];
|
||||||
@@ -288,6 +290,8 @@
|
|||||||
imageMarkdown = ``;
|
imageMarkdown = ``;
|
||||||
} else if (intentType === "text-to-image2") {
|
} else if (intentType === "text-to-image2") {
|
||||||
imageMarkdown = ``;
|
imageMarkdown = ``;
|
||||||
|
} else if (intentType === "text-to-image-v3") {
|
||||||
|
imageMarkdown = ``;
|
||||||
}
|
}
|
||||||
const inferredQuery = inferredQueries?.[0];
|
const inferredQuery = inferredQueries?.[0];
|
||||||
if (inferredQuery) {
|
if (inferredQuery) {
|
||||||
@@ -509,6 +513,8 @@
|
|||||||
rawResponse += ``;
|
rawResponse += ``;
|
||||||
} else if (responseAsJson.intentType === "text-to-image2") {
|
} else if (responseAsJson.intentType === "text-to-image2") {
|
||||||
rawResponse += ``;
|
rawResponse += ``;
|
||||||
|
} else if (responseAsJson.intentType === "text-to-image-v3") {
|
||||||
|
rawResponse += ``;
|
||||||
}
|
}
|
||||||
const inferredQueries = responseAsJson.inferredQueries?.[0];
|
const inferredQueries = responseAsJson.inferredQueries?.[0];
|
||||||
if (inferredQueries) {
|
if (inferredQueries) {
|
||||||
|
|||||||
@@ -156,6 +156,8 @@ export class KhojChatModal extends Modal {
|
|||||||
imageMarkdown = ``;
|
imageMarkdown = ``;
|
||||||
} else if (intentType === "text-to-image2") {
|
} else if (intentType === "text-to-image2") {
|
||||||
imageMarkdown = ``;
|
imageMarkdown = ``;
|
||||||
|
} else if (intentType === "text-to-image-v3") {
|
||||||
|
imageMarkdown = ``;
|
||||||
}
|
}
|
||||||
if (inferredQueries) {
|
if (inferredQueries) {
|
||||||
imageMarkdown += "\n\n**Inferred Query**:";
|
imageMarkdown += "\n\n**Inferred Query**:";
|
||||||
@@ -429,6 +431,8 @@ export class KhojChatModal extends Modal {
|
|||||||
responseText += ``;
|
responseText += ``;
|
||||||
} else if (responseAsJson.intentType === "text-to-image2") {
|
} else if (responseAsJson.intentType === "text-to-image2") {
|
||||||
responseText += ``;
|
responseText += ``;
|
||||||
|
} else if (responseAsJson.intentType === "text-to-image-v3") {
|
||||||
|
responseText += ``;
|
||||||
}
|
}
|
||||||
const inferredQuery = responseAsJson.inferredQueries?.[0];
|
const inferredQuery = responseAsJson.inferredQueries?.[0];
|
||||||
if (inferredQuery) {
|
if (inferredQuery) {
|
||||||
|
|||||||
@@ -244,6 +244,8 @@ To get started, just start typing below. You can also type / to see a list of co
|
|||||||
imageMarkdown = ``;
|
imageMarkdown = ``;
|
||||||
} else if (intentType === "text-to-image2") {
|
} else if (intentType === "text-to-image2") {
|
||||||
imageMarkdown = ``;
|
imageMarkdown = ``;
|
||||||
|
} else if (intentType === "text-to-image-v3") {
|
||||||
|
imageMarkdown = ``;
|
||||||
}
|
}
|
||||||
const inferredQuery = inferredQueries?.[0];
|
const inferredQuery = inferredQueries?.[0];
|
||||||
if (inferredQuery) {
|
if (inferredQuery) {
|
||||||
@@ -312,6 +314,8 @@ To get started, just start typing below. You can also type / to see a list of co
|
|||||||
imageMarkdown = ``;
|
imageMarkdown = ``;
|
||||||
} else if (intentType === "text-to-image2") {
|
} else if (intentType === "text-to-image2") {
|
||||||
imageMarkdown = ``;
|
imageMarkdown = ``;
|
||||||
|
} else if (intentType === "text-to-image-v3") {
|
||||||
|
imageMarkdown = ``;
|
||||||
}
|
}
|
||||||
const inferredQuery = inferredQueries?.[0];
|
const inferredQuery = inferredQueries?.[0];
|
||||||
if (inferredQuery) {
|
if (inferredQuery) {
|
||||||
@@ -619,6 +623,8 @@ To get started, just start typing below. You can also type / to see a list of co
|
|||||||
rawResponse += ``;
|
rawResponse += ``;
|
||||||
} else if (imageJson.intentType === "text-to-image2") {
|
} else if (imageJson.intentType === "text-to-image2") {
|
||||||
rawResponse += ``;
|
rawResponse += ``;
|
||||||
|
} else if (imageJson.intentType === "text-to-image-v3") {
|
||||||
|
rawResponse = ``;
|
||||||
}
|
}
|
||||||
if (inferredQuery) {
|
if (inferredQuery) {
|
||||||
rawResponse += `\n\n**Inferred Query**:\n\n${inferredQuery}`;
|
rawResponse += `\n\n**Inferred Query**:\n\n${inferredQuery}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user