forked from React-Group/interstellar_ai
Models comments
This commit is contained in:
parent
5f017026e2
commit
4caece5108
1 changed files with 5 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
|
||||
// Define all models that should be available.
|
||||
//#region modelist
|
||||
const modelList = {
|
||||
'Offline Fast': {
|
||||
model_type: 'local',
|
||||
|
@ -112,7 +113,7 @@ const selectedAIFunction = [
|
|||
'Language',
|
||||
'Weather'
|
||||
]
|
||||
|
||||
//#region variables
|
||||
const ModelSection: React.FC = () => {
|
||||
// Initialize state with value from localStorage or default to ''
|
||||
const [selectedModelDropdown, setSelectedModelDropdown] = useState('');
|
||||
|
@ -120,7 +121,7 @@ const ModelSection: React.FC = () => {
|
|||
const [activeSelectedAIFunction, setActiveSelectedAIFunction] = useState('');
|
||||
const [currentSelectedAIFunction, setCurrentSelectedAIFunction] = useState<string | null>("");
|
||||
const [isOpenSourceMode, setIsOpenSourceMode] = useState<string|null>("false")
|
||||
|
||||
//#region functions
|
||||
useEffect(() => {
|
||||
if (typeof localStorage !== 'undefined') {
|
||||
const defaultValues = {
|
||||
|
@ -175,7 +176,7 @@ const ModelSection: React.FC = () => {
|
|||
modelClicked(model)
|
||||
}
|
||||
};
|
||||
|
||||
//#region dropdown
|
||||
// Determine the filtered models based on current radioSelection
|
||||
const filteredModels = (() => {
|
||||
let models = [];
|
||||
|
@ -241,7 +242,7 @@ const ModelSection: React.FC = () => {
|
|||
localStorage.setItem("type", modelList[selectedAIFunction]['model_type' as keyof typeof modelList[typeof selectedAIFunction]])
|
||||
}
|
||||
}
|
||||
|
||||
//#region return "html"
|
||||
return (
|
||||
<div className="model-background">
|
||||
<div className="models">
|
||||
|
|
Loading…
Reference in a new issue