import React, { useState, useEffect } from 'react'; const Models: React.FC = () => { const modelOptions = [ 'Offline Fast', 'Offline Fast (FOSS)', 'Offline Slow', 'Offline Slow (FOSS)', 'Online (La Plateforme)', 'Online (FOSS) (La Plateforme)', 'Online Cheap (OpenAI)', 'Online Expensive (OpenAI)', 'Online Cheap (Anthropic)', 'Online Expensive (Anthropic)', 'Online Cheap (Google)', 'Online Expensive (Google)', ]; const [selectedModel, setSelectedModel] = useState(() => { // Load the selected model from localStorage on initial render return localStorage.getItem('selectedModel') || 'Offline Fast'; }); const handleModelChange = (event: React.ChangeEvent) => { const newModel = event.target.value; setSelectedModel(newModel); }; const isOfflineModel = (model: string) => { return model.includes('Offline'); }; // Save selected model to localStorage whenever it changes useEffect(() => { localStorage.setItem('selectedModel', selectedModel); }, [selectedModel]); return (

Different AI models

); }; export default Models;