diff --git a/.env.example b/.env.example
index 3e1d2fe..fc5804c 100644
--- a/.env.example
+++ b/.env.example
@@ -2,7 +2,7 @@ OPENAI_API_KEY=your_api_key_here
USER_USERNAME=Username
USER_PASSWORD=Password
GOOGLE_API_KEY=your_google_ai_key_here
-MISTRAL_KEY=your_mistral_ai_key_here
+MISTRAL_API_KEY=your_mistral_ai_key_here
# Remember to either rename this file to `.env`
# or create a new `.env` file with these variables.
# An OpenAI Key is required for GPT; if unchanged,
diff --git a/README.md b/README.md
index 4238509..76df71a 100644
--- a/README.md
+++ b/README.md
@@ -146,7 +146,7 @@ https://github.com/Zaki-1052/GPTPortal/assets/134018102/de7cb401-54f3-4cdd-a041-
USER_USERNAME=Username
USER_PASSWORD=Password
GOOGLE_API_KEY=your_google_ai_key_here
- MISTRAL_KEY=your_mistral_ai_key_here
+ MISTRAL_API_KEY=your_mistral_ai_key_here
```
5. **Start the Server**:
@@ -346,7 +346,7 @@ Lastly, if you have uploaded an image and are working with the Vision model, you
- The [Mistral **Documentation**](https://docs.mistral.ai/redocusaurus/plugin-redoc-0.yaml) for **Chat Completions** is linked [**here**](https://docs.mistral.ai/api/#operation/createChatCompletion) as well.
- Please follow the same steps for inserting your **API Key** into the `.env` file.
- See the above instructions, applied to "`your_mistral_ai_key_here`".
- - *Create a New Key*, and insert it into the correct **`MISTRAL_KEY`**.
+ - *Create a New Key*, and insert it into the correct **`MISTRAL_API_KEY`**.
- The largest *Mistral Model* is said to **beat** *Gemini Pro* at *most tasks*!
## Relevant [Links](https://arc.net/folder/B777A318-2A95-4C36-86AA-156166895CC2)
diff --git a/public/portal.html b/public/portal.html
index 8b01b13..863a43e 100644
--- a/public/portal.html
+++ b/public/portal.html
@@ -17,7 +17,7 @@
-
+
diff --git a/public/script.js b/public/script.js
index a17e5c1..4bf30d9 100644
--- a/public/script.js
+++ b/public/script.js
@@ -14,7 +14,7 @@
"GPT-4-Vision": "gpt-4-vision-preview",
"GPT-4-32k": "gpt-4-32k",
"GPT-4-Turbo": "gpt-4-turbo-preview",
- "GPT-3.5-Turbo": "gpt-3.5-turbo",
+ "GPT-3.5-Turbo": "gpt-3.5-turbo-0125",
"Gemini-Pro": "gemini-pro",
"Gemini-Pro-Vision": "gemini-pro-vision",
"Mistral-Tiny": "mistral-tiny",
@@ -28,7 +28,7 @@
"gpt-4-vision-preview": "GPT-4-Vision",
"gpt-4-32k": "GPT-4-32k",
"gpt-4-turbo-preview": "GPT-4-Turbo",
- "gpt-3.5-turbo": "GPT-3.5-Turbo",
+ "gpt-3.5-turbo-0125": "GPT-3.5-Turbo",
"gemini-pro": "Gemini-Pro",
"gemini-pro-vision": "Gemini-Pro-Vision",
"mistral-tiny": "Mistral-Tiny",
@@ -184,7 +184,7 @@ const selectedModelDisplayName = document.getElementById('selected-model').textC
"gpt-4-vision-preview": "GPT-4-Vision: View & Analyze Images",
"gpt-4-32k": "GPT-4-32k: Longer Context Window — Higher Price",
"gpt-4-turbo-preview": "GPT-4-Turbo: ChatGPT-Plus Model — 128k Tokens",
- "gpt-3.5-turbo": "GPT-3.5-Turbo: Cheapest Option Available",
+ "gpt-3.5-turbo-0125": "GPT-3.5-Turbo: Cheapest Option Available",
"gemini-pro": "Gemini-Pro: Google Bard Model — 3.5 Equivalent",
"gemini-pro-vision": "Gemini-Vision: View Images — One-Time Use",
"mistral-tiny": "Mistral-Tiny: Cheapest Model — English Proficient",
@@ -250,14 +250,14 @@ document.getElementById('model-gpt-4').addEventListener('click', () => selectMod
document.getElementById('model-gpt-4-vision').addEventListener('click', () => selectModel('gpt-4-vision-preview'));
document.getElementById('model-gpt-4-32k').addEventListener('click', () => selectModel('gpt-4-32k'));
document.getElementById('model-gpt-4-turbo').addEventListener('click', () => selectModel('gpt-4-turbo-preview'));
-document.getElementById('model-gpt-3.5').addEventListener('click', () => selectModel('gpt-3.5-turbo'));
+document.getElementById('model-gpt-3.5').addEventListener('click', () => selectModel('gpt-3.5-turbo-0125'));
// Event listeners for showing GPT model descriptions on hover
document.getElementById('model-gpt-4').addEventListener('mouseover', (event) => showCustomTooltip(modelDescriptions["gpt-4"], event.currentTarget));
document.getElementById('model-gpt-4-vision').addEventListener('mouseover', (event) => showCustomTooltip(modelDescriptions["gpt-4-vision-preview"], event.currentTarget));
document.getElementById('model-gpt-4-32k').addEventListener('mouseover', (event) => showCustomTooltip(modelDescriptions["gpt-4-32k"], event.currentTarget));
document.getElementById('model-gpt-4-turbo').addEventListener('mouseover', (event) => showCustomTooltip(modelDescriptions["gpt-4-turbo-preview"], event.currentTarget));
-document.getElementById('model-gpt-3.5').addEventListener('mouseover', (event) => showCustomTooltip(modelDescriptions["gpt-3.5-turbo"], event.currentTarget));
+document.getElementById('model-gpt-3.5').addEventListener('mouseover', (event) => showCustomTooltip(modelDescriptions["gpt-3.5-turbo-0125"], event.currentTarget));
// Event listeners for selecting Gemini models
document.getElementById('model-gemini-pro').addEventListener('click', () => selectModel('gemini-pro'));
diff --git a/server.js b/server.js
index c2a8a19..acdba68 100644
--- a/server.js
+++ b/server.js
@@ -753,7 +753,7 @@ conversationHistory.push(user_input);
apiUrl = 'https://api.openai.com/v1/chat/completions';
} else if (modelID.startsWith('mistral')) {
headers = {
- 'Authorization': `Bearer ${process.env.MISTRAL_KEY}`,
+ 'Authorization': `Bearer ${process.env.MISTRAL_API_KEY}`,
// Add any Mistral-specific headers here if necessary
};
apiUrl = 'https://api.mistral.ai/v1/chat/completions';
@@ -761,7 +761,6 @@ conversationHistory.push(user_input);
// Log the data payload just before sending it to the chosen API
console.log("API URL", apiUrl);
- console.log("Headers", headers);
console.log(`Sending to ${modelID.startsWith('gpt') ? 'OpenAI' : 'Mistral'} API:`, JSON.stringify(data, null, 2));
try {