diff --git a/src/lib/components/chat/Messages.svelte b/src/lib/components/chat/Messages.svelte
index aa7bde72..ad691bf1 100644
--- a/src/lib/components/chat/Messages.svelte
+++ b/src/lib/components/chat/Messages.svelte
@@ -655,7 +655,32 @@
{:else}
- {@html marked(message.content.replace('\\\\', '\\\\\\'))}
+ {#if message?.error === true}
+
+
+
+
+ {message.content}
+
+
+ {:else}
+ {@html marked(message.content.replace('\\\\', '\\\\\\'))}
+ {/if}
{#if message.done}
diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte
index f6bf0e35..44c92397 100644
--- a/src/routes/(app)/+page.svelte
+++ b/src/routes/(app)/+page.svelte
@@ -276,12 +276,20 @@
console.log(error);
if ('detail' in error) {
toast.error(error.detail);
+ responseMessage.content = error.detail;
} else {
toast.error(error.error);
+ responseMessage.content = error.error;
}
} else {
toast.error(`Uh-oh! There was an issue connecting to Ollama.`);
+ responseMessage.content = `Uh-oh! There was an issue connecting to Ollama.`;
}
+
+ responseMessage.error = true;
+ responseMessage.content = `Uh-oh! There was an issue connecting to Ollama.`;
+ responseMessage.done = true;
+ messages = messages;
}
stopResponseFlag = false;
diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte
index 3eec7a5e..c2685af5 100644
--- a/src/routes/(app)/c/[id]/+page.svelte
+++ b/src/routes/(app)/c/[id]/+page.svelte
@@ -303,12 +303,20 @@
console.log(error);
if ('detail' in error) {
toast.error(error.detail);
+ responseMessage.content = error.detail;
} else {
toast.error(error.error);
+ responseMessage.content = error.error;
}
} else {
toast.error(`Uh-oh! There was an issue connecting to Ollama.`);
+ responseMessage.content = `Uh-oh! There was an issue connecting to Ollama.`;
}
+
+ responseMessage.error = true;
+ responseMessage.content = `Uh-oh! There was an issue connecting to Ollama.`;
+ responseMessage.done = true;
+ messages = messages;
}
stopResponseFlag = false;