/* eslint-disable */ "use client"; import { UseFormRegister } from "react-hook-form"; import Field from "@/lib/components/ui/Field"; import { BrainConfig, Model, PaidModels, anthropicModels, models, paidModels, } from "@/lib/context/BrainConfigProvider/types"; interface ModelConfigProps { register: UseFormRegister; model: Model | PaidModels; openAiKey: string | undefined; temperature: number; maxTokens: number; } export const ModelConfig = ({ register, model, openAiKey, temperature, maxTokens, }: ModelConfigProps): JSX.Element => { const defineMaxTokens = (model: Model | PaidModels): number => { //At the moment is evaluating only models from OpenAI switch (model) { case "gpt-3.5-turbo-0613": return 500; case "gpt-3.5-turbo-16k": return 2000; case "gpt-4": return 1000; case "gpt-4-0613": return 100; default: return 250; } }; return ( <>

Model config

{(anthropicModels as readonly string[]).includes(model) && ( )}
); };