diff --git a/.env.example b/.env.example
index ad6cf4e..0302d1c 100644
--- a/.env.example
+++ b/.env.example
@@ -6,6 +6,7 @@ MISTRAL_API_KEY=your_mistral_ai_key_here
CLAUDE_API_KEY=your_anthropic_ai_key_here
QROQ_API_KEY=your_qroq_ai_key_here
OPENROUTER_API_KEY=your_openrouter_ai_key_here
+CODESTRAL_API_KEY=your_codestral_ai_key_here
# Uncomment (remove the '#') from the following lines
diff --git a/public/portal.html b/public/portal.html
index 2db2b46..04c0201 100644
--- a/public/portal.html
+++ b/public/portal.html
@@ -30,6 +30,7 @@
+
diff --git a/public/script.js b/public/script.js
index 9b1922c..5037569 100644
--- a/public/script.js
+++ b/public/script.js
@@ -59,6 +59,7 @@ fetchConfig();
"Llama3-70b": "llama3-70b-8192",
"Llama3-8b": "llama3-8b-8192",
"Gemma-7b": "gemma-7b-it",
+ "Codestral": "codestral-latest",
// Open Router Models
"OpenRouter Auto": "openrouter/auto",
"Nous: Capybara 7B (free)": "nousresearch/nous-capybara-7b:free",
@@ -214,6 +215,7 @@ fetchConfig();
"llama3-70b-8192": "Llama3-70b",
"llama3-8b-8192": "Llama3-8b",
"gemma-7b-it": "Gemma-7b",
+ "codestral-latest": "Codestral",
// Open Router Models
"openrouter/auto": "OpenRouter Auto",
"nousresearch/nous-capybara-7b:free": "Nous: Capybara 7B (free)",
@@ -667,6 +669,9 @@ document.getElementById('model-llama-8b').addEventListener('mouseover', (event)
// gemma it via qroq
document.getElementById('model-gemma-it').addEventListener('click', () => selectModel('gemma-7b-it'));
document.getElementById('model-gemma-it').addEventListener('mouseover', (event) => showCustomTooltip(modelDescriptions["gemma-7b-it"], event.currentTarget));
+document.getElementById('model-codestral').addEventListener('click', () => selectModel('codestral-latest'));
+document.getElementById('model-codestral').addEventListener('mouseover', (event) => showCustomTooltip(modelDescriptions["codestral-latest"], event.currentTarget));
+
// select open router models lol
diff --git a/server.js b/server.js
index 42a02f6..2f2db86 100644
--- a/server.js
+++ b/server.js
@@ -1128,7 +1128,7 @@ if (modelID === 'gpt-4') {
messages: conversationHistory, // Includes the System Prompt, previous queries and responses, and your most recently sent message.
- temperature: 1, // Controls randomness: Lowering results in less random completions.
+ temperature: 0.8, // Controls randomness: Lowering results in less random completions.
// As the temperature approaches zero, the model will become deterministic and repetitive.
// top_p: 1, // Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered.
@@ -1195,6 +1195,13 @@ if (modelID === 'gpt-4') {
// Add any Mistral-specific headers here if necessary
};
apiUrl = 'https://api.mistral.ai/v1/chat/completions';
+ } else if (modelID === 'codestral-latest') {
+ conversationHistory.push(user_input);
+ headers = {
+ 'Authorization': `Bearer ${process.env.CODESTRAL_API_KEY}`,
+ // Add any Mistral-specific headers here if necessary
+ };
+ apiUrl = 'https://codestral.mistral.ai/v1/chat/completions';
} else if (modelID.startsWith('claude')) {
claudeHistory.push(user_input);
data = {