From 1eb7dc05e59433de149ec16d9b2fe19b3fa4b24b Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Fri, 26 Jan 2024 12:49:52 +0100 Subject: Fix: ChromeDriver only supports characters in the BMP Add set_cookies helper, Show last used model --- g4f/gui/client/js/chat.v1.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'g4f/gui/client/js') 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 = - '' + provider.name + "" + provider = message.provider + content.querySelector('.provider').innerHTML = ` + + ${provider.name} + + ${provider.model ? ' with ' + provider.model : ''} + ` } else if (message["type"] == "error") { error = message["error"]; } else if (message["type"] == "message") { -- cgit v1.2.3