summaryrefslogtreecommitdiffstats
path: root/g4f/gui/client
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/gui/client')
-rw-r--r--g4f/gui/client/js/chat.v1.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/g4f/gui/client/js/chat.v1.js b/g4f/gui/client/js/chat.v1.js
index d62c040b..99a75569 100644
--- a/g4f/gui/client/js/chat.v1.js
+++ b/g4f/gui/client/js/chat.v1.js
@@ -164,12 +164,16 @@ const ask_gpt = async () => {
for (const line of value.split("\n")) {
if (!line) continue;
const message = JSON.parse(line);
- if (message["type"] == "content") {
- text += message["content"];
+ if (message.type == "content") {
+ text += message.content;
} else if (message["type"] == "provider") {
- provider = message["provider"];
- content.querySelector('.provider').innerHTML =
- '<a href="' + provider.url + '" target="_blank">' + provider.name + "</a>"
+ provider = message.provider
+ content.querySelector('.provider').innerHTML = `
+ <a href="${provider.url}" target="_blank">
+ ${provider.name}
+ </a>
+ ${provider.model ? ' with ' + provider.model : ''}
+ `
} else if (message["type"] == "error") {
error = message["error"];
} else if (message["type"] == "message") {