From b9e03e9cb1a2547911ba692159c2ee767f351600 Mon Sep 17 00:00:00 2001
From: Cohee <18619528+Cohee1207@users.noreply.github.com>
Date: Thu, 18 Jul 2024 16:37:12 +0000
Subject: [PATCH 01/10] Add Mistral Nemo and Codestral Mamba models
---
public/index.html | 5 +++++
public/scripts/openai.js | 7 ++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/public/index.html b/public/index.html
index 6ac770401..3e438efa8 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2821,15 +2821,19 @@
MistralAI Model
diff --git a/public/scripts/openai.js b/public/scripts/openai.js
index c23f7a4e2..b60a6948f 100644
--- a/public/scripts/openai.js
+++ b/public/scripts/openai.js
@@ -125,6 +125,7 @@ const max_32k = 32767;
const max_64k = 65535;
const max_128k = 128 * 1000;
const max_200k = 200 * 1000;
+const max_256k = 256 * 1000;
const max_1mil = 1000 * 1000;
const scale_max = 8191;
const claude_max = 9000; // We have a proper tokenizer, so theoretically could be larger (up to 9k)
@@ -3992,7 +3993,7 @@ async function onModelChange() {
if ($(this).is('#model_mistralai_select')) {
// Upgrade old mistral models to new naming scheme
// would have done this in loadOpenAISettings, but it wasn't updating on preset change?
- if (value === 'mistral-medium' || value === 'mistral-small' || value === 'mistral-tiny') {
+ if (value === 'mistral-medium' || value === 'mistral-small') {
value = value + '-latest';
} else if (value === '') {
value = default_settings.mistralai_model;
@@ -4139,6 +4140,10 @@ 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')) {
+ $('#openai_max_context').attr('max', max_256k);
+ } else if (oai_settings.mistralai_model.includes('mistral-nemo')) {
+ $('#openai_max_context').attr('max', max_128k);
} else if (oai_settings.mistralai_model.includes('mixtral-8x22b')) {
$('#openai_max_context').attr('max', max_64k);
} else {
From e6995e40ccbb24ef006ef03a8123fac8f08cc573 Mon Sep 17 00:00:00 2001
From: Wolfsblvt
Date: Thu, 18 Jul 2024 18:47:13 +0200
Subject: [PATCH 02/10] Update /qr-delete help string and add missing arg
- Fixes #2527
---
.../extensions/quick-reply/src/SlashCommandHandler.js | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/public/scripts/extensions/quick-reply/src/SlashCommandHandler.js b/public/scripts/extensions/quick-reply/src/SlashCommandHandler.js
index a2c54e9ee..0f3829e84 100644
--- a/public/scripts/extensions/quick-reply/src/SlashCommandHandler.js
+++ b/public/scripts/extensions/quick-reply/src/SlashCommandHandler.js
@@ -316,7 +316,14 @@ export class SlashCommandHandler {
enumProvider: localEnumProviders.qrEntries,
}),
],
- helpString: 'Deletes a Quick Reply from the specified set. If no label is provided, the entire set is deleted.',
+ unnamedArgumentList: [
+ SlashCommandArgument.fromProps({
+ description: 'label',
+ typeList: [ARGUMENT_TYPE.STRING],
+ enumProvider: localEnumProviders.qrEntries,
+ }),
+ ],
+ helpString: 'Deletes a Quick Reply from the specified set. (Label must be provided via named or unnamed argument)',
}));
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'qr-contextadd',
callback: (args, name) => {
From 318b6a17b93a032618d4d460806b215a55830cd2 Mon Sep 17 00:00:00 2001
From: Wolfsblvt
Date: Thu, 18 Jul 2024 21:37:18 +0200
Subject: [PATCH 03/10] Add gpt-4o-mini
---
public/index.html | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/public/index.html b/public/index.html
index 3e438efa8..cca1fefba 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2560,6 +2560,10 @@
+