({ chatId }: { chatId: string | null })
| 12 | const ChatConfigSummary = dynamic(() => import("./ChatConfigSummary"), { ssr: false }); |
| 13 | |
| 14 | export const ChatSection = ({ chatId }: { chatId: string | null }) => { |
| 15 | const { modelInfos } = useChatContext(); |
| 16 | |
| 17 | console.assert(modelInfos.length > 0, "No model config was found"); |
| 18 | |
| 19 | const form = useForm<ChatConfigFormData>({ |
| 20 | defaultValues: getConfigCache() ?? { |
| 21 | ...modelInfos[0].parameter_configs[0].sampling_parameters, |
| 22 | model_config_name: modelInfos[0].name, |
| 23 | }, |
| 24 | }); |
| 25 | |
| 26 | return ( |
| 27 | <FormProvider {...form}> |
| 28 | <Card className="max-w-5xl mx-auto"> |
| 29 | <CardBody display="flex" flexDirection="column" gap="2"> |
| 30 | <ChatConversation chatId={chatId} key={chatId} /> |
| 31 | <ChatConfigSummary /> |
| 32 | <Divider /> |
| 33 | <InferencePoweredBy /> |
| 34 | </CardBody> |
| 35 | </Card> |
| 36 | <ChatConfigSaver /> |
| 37 | </FormProvider> |
| 38 | ); |
| 39 | }; |
nothing calls this directly
no test coverage detected