From 4caece5108b708dcbce4c89de1b22987e5bfb3c8 Mon Sep 17 00:00:00 2001 From: sageTheDM Date: Fri, 11 Oct 2024 10:05:22 +0200 Subject: [PATCH] Models comments --- app/components/Models.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/components/Models.tsx b/app/components/Models.tsx index 469d9cb..3ac195c 100644 --- a/app/components/Models.tsx +++ b/app/components/Models.tsx @@ -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(""); const [isOpenSourceMode, setIsOpenSourceMode] = useState("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 (