forked from React-Group/interstellar_ai
very cool fixes and a bit of a revert
This commit is contained in:
parent
091744d75b
commit
c018829f8f
4 changed files with 280 additions and 275 deletions
|
@ -4,139 +4,140 @@ import React, { useState, useEffect } from 'react';
|
|||
// Define all models that should be available.
|
||||
const modelList = {
|
||||
'Offline Fast': {
|
||||
'model_type': 'local',
|
||||
'Math': 'qwen2-math:1.5b',
|
||||
'Code': 'starcoder2',
|
||||
'Language': 'llama3.2',
|
||||
'Character': 'dolphin-phi',
|
||||
'Finance': 'qwen2-math:1.5b',
|
||||
'Weather': 'llama3.2',
|
||||
'Time': 'llama3.2',
|
||||
'Image': 'llava-phi3'
|
||||
model_type: 'local',
|
||||
Math: 'qwen2-math:1.5b',
|
||||
Code: 'starcoder2',
|
||||
Language: 'llama3.2',
|
||||
Character: 'dolphin-phi',
|
||||
Finance: 'qwen2-math:1.5b',
|
||||
Weather: 'llama3.2',
|
||||
Time: 'llama3.2',
|
||||
Image: 'llava-phi3'
|
||||
},
|
||||
'Offline Slow': {
|
||||
'model_type': 'local',
|
||||
'Math': 'wizard-math',
|
||||
'Code': 'starcoder2:7b',
|
||||
'Language': 'llama3.1',
|
||||
'Character': 'dolphin-llama3',
|
||||
'Finance': 'wizard-math',
|
||||
'Weather': 'llama3.1',
|
||||
'Time': 'llama3.1',
|
||||
'Image': 'llava'
|
||||
model_type: 'local',
|
||||
Math: 'wizard-math',
|
||||
Code: 'starcoder2:7b',
|
||||
Language: 'llama3.1',
|
||||
Character: 'dolphin-llama3',
|
||||
Finance: 'wizard-math',
|
||||
Weather: 'llama3.1',
|
||||
Time: 'llama3.1',
|
||||
Image: 'llava'
|
||||
},
|
||||
'Offline Fast (FOSS)': {
|
||||
'model_type': 'local',
|
||||
'Math': 'qwen2-math:1.5b',
|
||||
'Code': 'qwen2.5-coder:1.5b',
|
||||
'Language': 'phi3.5',
|
||||
'Character': 'dolphin-mistral',
|
||||
'Finance': 'qwen2-math:1.5b',
|
||||
'Weather': 'phi3.5',
|
||||
'Time': 'phi3.5',
|
||||
'Image': 'llava'
|
||||
model_type: 'local',
|
||||
Math: 'qwen2-math:1.5b',
|
||||
Code: 'qwen2.5-coder:1.5b',
|
||||
Language: 'phi3.5',
|
||||
Character: 'dolphin-mistral',
|
||||
Finance: 'qwen2-math:1.5b',
|
||||
Weather: 'phi3.5',
|
||||
Time: 'phi3.5',
|
||||
Image: 'llava'
|
||||
},
|
||||
'Offline Slow (FOSS)': {
|
||||
'model_type': 'local',
|
||||
'Math': 'mathstral',
|
||||
'Code': 'qwen2.5-coder',
|
||||
'Language': 'qwen2.5',
|
||||
'Character': 'dolphin-mistral',
|
||||
'Finance': 'mathstral',
|
||||
'Weather': 'qwen2.5',
|
||||
'Time': 'qwen2.5',
|
||||
'Image': 'llava'
|
||||
model_type: 'local',
|
||||
Math: 'mathstral',
|
||||
Code: 'qwen2.5-coder',
|
||||
Language: 'qwen2.5',
|
||||
Character: 'dolphin-mistral',
|
||||
Finance: 'mathstral',
|
||||
Weather: 'qwen2.5',
|
||||
Time: 'qwen2.5',
|
||||
Image: 'llava'
|
||||
},
|
||||
'Online Cheap (OpenAI)': {
|
||||
'model_type': 'openai',
|
||||
'Math': 'gpt-4o-mini',
|
||||
'Code': 'gpt-4o-mini',
|
||||
'Language': 'gpt-4o-mini',
|
||||
'Character': 'gpt-4o-mini',
|
||||
'Finance': 'gpt-4o-mini',
|
||||
'Weather': 'gpt-4o-mini',
|
||||
'Time': 'gpt-4o-mini',
|
||||
'Image': 'gpt-4o-mini'
|
||||
model_type: 'openai',
|
||||
Math: 'gpt-4o-mini',
|
||||
Code: 'gpt-4o-mini',
|
||||
Language: 'gpt-4o-mini',
|
||||
Character: 'gpt-4o-mini',
|
||||
Finance: 'gpt-4o-mini',
|
||||
Weather: 'gpt-4o-mini',
|
||||
Time: 'gpt-4o-mini',
|
||||
Image: 'gpt-4o-mini'
|
||||
},
|
||||
'Online Expensive (OpenAI)': {
|
||||
'model_type': 'openai',
|
||||
'Math': 'gpt-4o',
|
||||
'Code': 'gpt-4o',
|
||||
'Language': 'gpt-4o',
|
||||
'Character': 'gpt-4o',
|
||||
'Finance': 'gpt-4o',
|
||||
'Weather': 'gpt-4o',
|
||||
'Time': 'gpt-4o',
|
||||
'Image': 'gpt-4o'
|
||||
model_type: 'openai',
|
||||
Math: 'gpt-4o',
|
||||
Code: 'gpt-4o',
|
||||
Language: 'gpt-4o',
|
||||
Character: 'gpt-4o',
|
||||
Finance: 'gpt-4o',
|
||||
Weather: 'gpt-4o',
|
||||
Time: 'gpt-4o',
|
||||
Image: 'gpt-4o'
|
||||
},
|
||||
'Online Cheap (Anthropic)': {
|
||||
'model_type': 'anthropic',
|
||||
'Math': 'claude-3-haiku',
|
||||
'Code': 'claude-3-haiku',
|
||||
'Language': 'claude-3-haiku',
|
||||
'Character': 'claude-3-haiku',
|
||||
'Finance': 'claude-3-haiku',
|
||||
'Weather': 'claude-3-haiku',
|
||||
'Time': 'claude-3-haiku',
|
||||
'Image': 'claude-3-haiku'
|
||||
model_type: 'anthropic',
|
||||
Math: 'claude-3-haiku',
|
||||
Code: 'claude-3-haiku',
|
||||
Language: 'claude-3-haiku',
|
||||
Character: 'claude-3-haiku',
|
||||
Finance: 'claude-3-haiku',
|
||||
Weather: 'claude-3-haiku',
|
||||
Time: 'claude-3-haiku',
|
||||
Image: 'claude-3-haiku'
|
||||
},
|
||||
'Online Expensive (Anthropic)': {
|
||||
'model_type': 'anthropic',
|
||||
'Math': 'claude-3-5-sonnet',
|
||||
'Code': 'claude-3-5-sonnet',
|
||||
'Language': 'claude-3-5-sonnet',
|
||||
'Character': 'claude-3-5-sonnet',
|
||||
'Finance': 'claude-3-5-sonnet',
|
||||
'Weather': 'claude-3-5-sonnet',
|
||||
'Time': 'claude-3-5-sonnet',
|
||||
'Image': 'claude-3-5-sonnet'
|
||||
model_type: 'anthropic',
|
||||
Math: 'claude-3-5-sonnet',
|
||||
Code: 'claude-3-5-sonnet',
|
||||
Language: 'claude-3-5-sonnet',
|
||||
Character: 'claude-3-5-sonnet',
|
||||
Finance: 'claude-3-5-sonnet',
|
||||
Weather: 'claude-3-5-sonnet',
|
||||
Time: 'claude-3-5-sonnet',
|
||||
Image: 'claude-3-5-sonnet'
|
||||
},
|
||||
'Online Cheap (Google)': {
|
||||
'model_type': 'google',
|
||||
'Math': 'gemini-1.5-flash-latest',
|
||||
'Code': 'gemini-1.5-flash-latest',
|
||||
'Language': 'gemini-1.5-flash-latest',
|
||||
'Character': 'gemini-1.5-flash-latest',
|
||||
'Finance': 'gemini-1.5-flash-latest',
|
||||
'Weather': 'gemini-1.5-flash-latest',
|
||||
'Time': 'gemini-1.5-flash-latest',
|
||||
'Image': 'gemini-1.5-flash-latest'
|
||||
model_type: 'google',
|
||||
Math: 'gemini-1.5-flash-latest',
|
||||
Code: 'gemini-1.5-flash-latest',
|
||||
Language: 'gemini-1.5-flash-latest',
|
||||
Character: 'gemini-1.5-flash-latest',
|
||||
Finance: 'gemini-1.5-flash-latest',
|
||||
Weather: 'gemini-1.5-flash-latest',
|
||||
Time: 'gemini-1.5-flash-latest',
|
||||
Image: 'gemini-1.5-flash-latest'
|
||||
},
|
||||
'Online Expensive (Google)': {
|
||||
'model_type': 'google',
|
||||
'Math': 'gemini-1.5-pro-latest',
|
||||
'Code': 'gemini-1.5-pro-latest',
|
||||
'Language': 'gemini-1.5-pro-latest',
|
||||
'Character': 'gemini-1.5-pro-latest',
|
||||
'Finance': 'gemini-1.5-pro-latest',
|
||||
'Weather': 'gemini-1.5-pro-latest',
|
||||
'Time': 'gemini-1.5-pro-latest',
|
||||
'Image': 'gemini-1.5-pro-latest'
|
||||
model_type: 'google',
|
||||
Math: 'gemini-1.5-pro-latest',
|
||||
Code: 'gemini-1.5-pro-latest',
|
||||
Language: 'gemini-1.5-pro-latest',
|
||||
Character: 'gemini-1.5-pro-latest',
|
||||
Finance: 'gemini-1.5-pro-latest',
|
||||
Weather: 'gemini-1.5-pro-latest',
|
||||
Time: 'gemini-1.5-pro-latest',
|
||||
Image: 'gemini-1.5-pro-latest'
|
||||
},
|
||||
'Online (La Plateforme)': {
|
||||
'model_type': 'mistral',
|
||||
'Math': 'open-mistral-nemo',
|
||||
'Code': 'codestral-latest',
|
||||
'Language': 'mistral-small-latest',
|
||||
'Character': 'mistral-large-latest',
|
||||
'Finance': 'open-mistral-nemo',
|
||||
'Weather': 'mistral-small-latest',
|
||||
'Time': 'mistral-small-latest',
|
||||
'Image': 'pixtral-12b-2409'
|
||||
model_type: 'mistral',
|
||||
Math: 'open-mistral-nemo',
|
||||
Code: 'codestral-latest',
|
||||
Language: 'mistral-small-latest',
|
||||
Character: 'mistral-large-latest',
|
||||
Finance: 'open-mistral-nemo',
|
||||
Weather: 'mistral-small-latest',
|
||||
Time: 'mistral-small-latest',
|
||||
Image: 'pixtral-12b-2409'
|
||||
},
|
||||
'Online (FOSS) (La Plateforme)': {
|
||||
'model_type': 'mistral',
|
||||
'Math': 'open-mistral-nemo',
|
||||
'Code': 'open-codestral-mamba',
|
||||
'Language': 'open-mistral-nemo',
|
||||
'Character': 'open-mixtral-8x22b',
|
||||
'Finance': 'open-mixtral-8x22b',
|
||||
'Weather': 'open-mistral-nemo',
|
||||
'Time': 'open-mistral-nemo',
|
||||
'Image': 'pixtral-12b-2409'
|
||||
model_type: 'mistral',
|
||||
Math: 'open-mistral-nemo',
|
||||
Code: 'open-codestral-mamba',
|
||||
Language: 'open-mistral-nemo',
|
||||
Character: 'open-mixtral-8x22b',
|
||||
Finance: 'open-mixtral-8x22b',
|
||||
Weather: 'open-mistral-nemo',
|
||||
Time: 'open-mistral-nemo',
|
||||
Image: 'pixtral-12b-2409'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Define the available selectedAIFunction options
|
||||
const modelDropdown = {
|
||||
offlineNonFoss: ['Offline Fast', 'Offline Slow'],
|
||||
|
@ -172,6 +173,7 @@ const ModelSection: React.FC = () => {
|
|||
const [radioSelection, setRadioSelection] = useState<string | null>("")
|
||||
const [activeSelectedAIFunction, setActiveSelectedAIFunction] = useState('');
|
||||
const [currentSelectedAIFunction, setCurrentSelectedAIFunction] = useState<string | null>("");
|
||||
const [isOpenSourceMode, setIsOpenSourceMode] = useState(localStorage.getItem('openSourceMode') || "false")
|
||||
|
||||
useEffect(() => {
|
||||
var temp = localStorage.getItem("activeSelectedAIFunction") || ""
|
||||
|
@ -233,23 +235,23 @@ const ModelSection: React.FC = () => {
|
|||
models = [
|
||||
...modelDropdown.onlineNonFoss,
|
||||
...modelDropdown.onlineFoss,
|
||||
]; // Show only offline models without FOSS
|
||||
break;
|
||||
case 'Offline (FOSS)':
|
||||
models = [
|
||||
...modelDropdown.onlineFoss,
|
||||
]; // Show only offline models with FOSS
|
||||
];
|
||||
if (isOpenSourceMode == "true") {
|
||||
models = [
|
||||
...modelDropdown.onlineFoss,
|
||||
];
|
||||
} // Show only offline models without FOSS
|
||||
break;
|
||||
case 'Online':
|
||||
models = [
|
||||
...modelDropdown.offlineNonFoss,
|
||||
...modelDropdown.offlineFoss,
|
||||
]; // Show only online models without FOSS
|
||||
break;
|
||||
case 'Online (FOSS)':
|
||||
models = [
|
||||
...modelDropdown.offlineFoss,
|
||||
]; // Show only online models with FOSS
|
||||
];
|
||||
if (isOpenSourceMode == "true") {
|
||||
models = [
|
||||
...modelDropdown.offlineFoss,
|
||||
];
|
||||
} // Show only online models without FOSS
|
||||
break;
|
||||
case 'None':
|
||||
models = [
|
||||
|
@ -257,13 +259,13 @@ const ModelSection: React.FC = () => {
|
|||
...modelDropdown.offlineFoss,
|
||||
...modelDropdown.onlineNonFoss,
|
||||
...modelDropdown.onlineFoss,
|
||||
]; // Show all models if nothing matches
|
||||
break;
|
||||
case 'None (FOSS)':
|
||||
models = [
|
||||
...modelDropdown.offlineFoss,
|
||||
...modelDropdown.onlineFoss,
|
||||
]; // Show all models if nothing matches
|
||||
];
|
||||
if (isOpenSourceMode == "true") {
|
||||
models = [
|
||||
...modelDropdown.offlineFoss,
|
||||
...modelDropdown.onlineFoss,
|
||||
];
|
||||
} // Show all models if nothing matches
|
||||
break;
|
||||
default:
|
||||
models = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue