/* eslint-disable @typescript-eslint/no-explicit-any */ import classNames from "classnames"; import { useEffect } from "react"; import { PiGearSixFill } from "react-icons/pi"; // @ts-expect-error not needed import { PROVIDERS } from "./../../../utils/providers"; function Settings({ open, onClose, provider, error, onChange, localSettings, setLocalSettings, }: { open: boolean; provider: string; error?: string; onClose: React.Dispatch>; onChange: (provider: string) => void; localSettings: any; setLocalSettings: React.Dispatch>; }) { // persist the local settings to local storage const persistLocalSettings = () => { localStorage.setItem('localSettings', JSON.stringify(localSettings)); }; useEffect(() => { persistLocalSettings(); }, [localSettings]); return (
onClose(false)} >
Provider Customize Settings
{/* toggle using tailwind css */}

Use auto-provider

{ onChange(provider === "auto" ? "fireworks-ai" : "auto"); }} >

We'll automatically select the best provider for you based on your prompt.

{error !== "" && (

{error}

)} {provider === "local" && (

Make sure to run the local server first


)} {provider === "openrouter" && (

Get your OpenRouter API key from here


)}
); } export default Settings;