Models comments

This commit is contained in:
sageTheDM 2024-10-11 10:05:22 +02:00
parent 5f017026e2
commit 4caece5108

View file

@ -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">