diff --git a/public/index.html b/public/index.html index a122b0082..ec0e088a3 100644 --- a/public/index.html +++ b/public/index.html @@ -3193,6 +3193,7 @@ + @@ -3208,13 +3209,20 @@ + + + + + + + @@ -3417,7 +3425,7 @@

- + 01.AI API Key

diff --git a/public/scripts/extensions/caption/settings.html b/public/scripts/extensions/caption/settings.html index 95e53304b..457ac13b5 100644 --- a/public/scripts/extensions/caption/settings.html +++ b/public/scripts/extensions/caption/settings.html @@ -42,6 +42,9 @@ + + + diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 3adf18615..80d1e9ed7 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -4437,9 +4437,9 @@ async function onModelChange() { if (oai_settings.chat_completion_source === chat_completion_sources.MISTRALAI) { if (oai_settings.max_context_unlocked) { $('#openai_max_context').attr('max', unlocked_max); - } else if (oai_settings.mistralai_model.includes('codestral-mamba')) { + } else if (['codestral-latest', 'codestral-mamba-2407', 'codestral-2411-rc5', 'codestral-2412', 'codestral-2501'].includes(oai_settings.mistralai_model)) { $('#openai_max_context').attr('max', max_256k); - } else if (['mistral-large-2407', 'mistral-large-2411', 'mistral-large-latest'].includes(oai_settings.mistralai_model)) { + } else if (['mistral-large-2407', 'mistral-large-2411', 'mistral-large-pixtral-2411', 'mistral-large-latest'].includes(oai_settings.mistralai_model)) { $('#openai_max_context').attr('max', max_128k); } else if (oai_settings.mistralai_model.includes('mistral-nemo')) { $('#openai_max_context').attr('max', max_128k); diff --git a/src/endpoints/backends/chat-completions.js b/src/endpoints/backends/chat-completions.js index 9cd784a0c..4d2eee774 100644 --- a/src/endpoints/backends/chat-completions.js +++ b/src/endpoints/backends/chat-completions.js @@ -49,7 +49,7 @@ const API_COHERE_V2 = 'https://api.cohere.ai/v2'; const API_PERPLEXITY = 'https://api.perplexity.ai'; const API_GROQ = 'https://api.groq.com/openai/v1'; const API_MAKERSUITE = 'https://generativelanguage.googleapis.com'; -const API_01AI = 'https://api.01.ai/v1'; +const API_01AI = 'https://api.lingyiwanwu.com/v1'; const API_BLOCKENTROPY = 'https://api.blockentropy.ai/v1'; const API_AI21 = 'https://api.ai21.com/studio/v1'; const API_NANOGPT = 'https://nano-gpt.com/api/v1'; diff --git a/src/endpoints/openai.js b/src/endpoints/openai.js index 14ee69fb8..c8f1701ce 100644 --- a/src/endpoints/openai.js +++ b/src/endpoints/openai.js @@ -116,7 +116,7 @@ router.post('/caption-image', async (request, response) => { } if (request.body.api === 'zerooneai') { - apiUrl = 'https://api.01.ai/v1/chat/completions'; + apiUrl = 'https://api.lingyiwanwu.com/v1/chat/completions'; } if (request.body.api === 'groq') {