forked from React-Group/interstellar_ai
main #46
1 changed files with 4 additions and 1 deletions
|
@ -225,6 +225,8 @@ const ModelSection: React.FC = () => {
|
||||||
const newModel = event.target.value;
|
const newModel = event.target.value;
|
||||||
setSelectedModelDropdown(newModel);
|
setSelectedModelDropdown(newModel);
|
||||||
localStorage.setItem('selectedModelDropdown', newModel); // Update localStorage directly
|
localStorage.setItem('selectedModelDropdown', newModel); // Update localStorage directly
|
||||||
|
var model = localStorage.getItem('activeSelectedAIFunction') || "Code"
|
||||||
|
modelClicked(model)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Determine the filtered models based on current radioSelection
|
// Determine the filtered models based on current radioSelection
|
||||||
|
@ -285,7 +287,8 @@ const ModelSection: React.FC = () => {
|
||||||
const modelClicked = (model: string) => {
|
const modelClicked = (model: string) => {
|
||||||
localStorage.setItem('activeSelectedAIFunction', model)
|
localStorage.setItem('activeSelectedAIFunction', model)
|
||||||
setActiveSelectedAIFunction(model)
|
setActiveSelectedAIFunction(model)
|
||||||
const selectedAIFunction = selectedModelDropdown as keyof typeof modelList;
|
var modelDropdown = localStorage.getItem('selectedModelDropdown') || 'Offline Fast'
|
||||||
|
const selectedAIFunction = modelDropdown as keyof typeof modelList;
|
||||||
localStorage.setItem("model", modelList[selectedAIFunction][model as keyof typeof modelList[typeof selectedAIFunction]])
|
localStorage.setItem("model", modelList[selectedAIFunction][model as keyof typeof modelList[typeof selectedAIFunction]])
|
||||||
localStorage.setItem("type", modelList[selectedAIFunction]['model_type' as keyof typeof modelList[typeof selectedAIFunction]])
|
localStorage.setItem("type", modelList[selectedAIFunction]['model_type' as keyof typeof modelList[typeof selectedAIFunction]])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue