From 932d3a3ca092756cc3025e427fabf9ab674350fc Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sat, 20 Apr 2024 10:43:53 +0200 Subject: Add MetaAI Provider and some small improvments --- g4f/gui/client/static/js/chat.v1.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'g4f/gui/client/static/js/chat.v1.js') diff --git a/g4f/gui/client/static/js/chat.v1.js b/g4f/gui/client/static/js/chat.v1.js index 39027260..a043cb25 100644 --- a/g4f/gui/client/static/js/chat.v1.js +++ b/g4f/gui/client/static/js/chat.v1.js @@ -302,7 +302,7 @@ async function add_message_chunk(message) { window.provider_result = message.provider; content.querySelector('.provider').innerHTML = ` - ${message.provider.name} + ${message.provider.label ? message.provider.label : message.provider.name} ${message.provider.model ? ' with ' + message.provider.model : ''} ` @@ -545,7 +545,8 @@ const load_conversation = async (conversation_id, scroll=true) => { last_model = item.provider?.model; let next_i = parseInt(i) + 1; let next_provider = item.provider ? item.provider : (messages.length > next_i ? messages[next_i].provider : null); - let provider_link = item.provider?.name ? `${item.provider.name}` : ""; + let provider_label = item.provider?.label ? item.provider?.label : item.provider?.name; + let provider_link = item.provider?.name ? `${provider_label}` : ""; let provider = provider_link ? `
${provider_link} -- cgit v1.2.3