Skip to content

Commit

Permalink
models
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaki-1052 committed May 15, 2024
1 parent dd3ff96 commit e6ad9a4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## You are **GPT-4**, an advanced *Large Language Model* trained by *OpenAI*

- Knowledge cutoff: 2023-12
- Knowledge cutoff: 2023-10
- Current date: 2024-05
- Image input capabilities: **Enabled**

Expand Down
1 change: 1 addition & 0 deletions public/portal.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<button id="model-mistral-large" data-value="mistral-large-latest">Mistral Large</button>
<button id="model-llama-70b" data-value="llama3-70b">Llama3 70b</button>
<button id="model-gemini-1.5-pro" data-value="gemini-1.5-pro">Gemini-1.5 Pro</button>
<button id="model-gemini-1.5-flash" data-value="gemini-1.5-flash">Gemini-1.5 Flash</button>
<button id="model-gemini-pro-vision" data-value="gemini-pro-vision">Gemini Pro Vision</button>
<button id="model-llama-8b" data-value="Llama3-8b">Llama3 8b</button>
<button id="model-mistral-small" data-value="mistral-small-latest">Mistral Small</button>
Expand Down
3 changes: 3 additions & 0 deletions public/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ fetchConfig();
"Gemini-Pro": "gemini-pro",
"Gemini-Pro-Vision": "gemini-pro-vision",
"Gemini-1.5-Pro": "gemini-1.5-pro",
"Gemini-1.5-Flash": "gemini-1.5-flash",
"Gemini-Ultra": "gemini-1.0-ultra",
"Claude-Opus": "claude-3-opus-20240229",
"Claude-Sonnet": "claude-3-sonnet-20240229",
Expand Down Expand Up @@ -195,6 +196,7 @@ fetchConfig();
"gemini-pro": "Gemini-Pro",
"gemini-pro-vision": "Gemini-Pro-Vision",
"gemini-1.5-pro": "Gemini-1.5-Pro",
"gemini-1.5-flash": "Gemini-1.5-Flash",
"gemini-1.0-ultra": "Gemini-Ultra",
"claude-3-opus-20240229": "Claude-Opus",
"claude-3-sonnet-20240229": "Claude-Sonnet",
Expand Down Expand Up @@ -611,6 +613,7 @@ document.getElementById('model-gpt-3.5').addEventListener('mouseover', (event) =
document.getElementById('model-gemini-pro').addEventListener('click', () => selectModel('gemini-pro'));
document.getElementById('model-gemini-pro-vision').addEventListener('click', () => selectModel('gemini-pro-vision'));
document.getElementById('model-gemini-1.5-pro').addEventListener('click', () => selectModel('gemini-1.5-pro'));
document.getElementById('model-gemini-1.5-flash').addEventListener('click', () => selectModel('gemini-1.5-flash'));
document.getElementById('model-gemini-ultra').addEventListener('click', () => selectModel('gemini-1.0-ultra'));

// Event listeners for showing Gemini model descriptions on hover
Expand Down
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ let thread = null;
let response = '';
let initialize = true;
let messages;
let modelID = 'gpt-4-turbo';
let modelID = 'gpt-4o';

// Utility function to ensure Assistant and Thread initialization
async function AssistantAndThread(modelID, systemMessage) {
Expand Down Expand Up @@ -841,7 +841,7 @@ if (!history && (!imageParts || imageParts.length === 0)) {
}

// Initialize the Google model for text-and-image input
const googleModel = genAI.getGenerativeModel({ model: 'gemini-pro-vision', generationConfig: defaultConfig, safetySettings });
const googleModel = genAI.getGenerativeModel({ model: model, generationConfig: defaultConfig, safetySettings });
console.log(googleModel);
// Convert image parts to the required format using the new function
// Construct file paths from received filenames and convert image parts
Expand Down

0 comments on commit e6ad9a4

Please sign in to comment.