| | |
| | | import { useEventEmitterContextContext } from '@/context/event-emitter' |
| | | import { useProviderContext } from '@/context/provider-context' |
| | | import { useFeatures } from '@/app/components/base/features/hooks' |
| | | import { noop } from 'lodash-es' |
| | | |
| | | type TextGenerationItemProps = { |
| | | modelAndParameter: ModelAndParameter |
| | |
| | | doSend(v.payload.message, v.payload.files) |
| | | }) |
| | | |
| | | const varList = modelConfig.configs.prompt_variables.map((item: any) => { |
| | | return { |
| | | label: item.key, |
| | | value: inputs[item.key], |
| | | } |
| | | }) |
| | | |
| | | return ( |
| | | <TextGeneration |
| | | className='flex h-full flex-col overflow-y-auto border-none' |
| | | className='flex flex-col h-full overflow-y-auto border-none' |
| | | innerClassName='grow flex flex-col' |
| | | contentClassName='grow' |
| | | content={completion} |
| | | isLoading={!completion && isResponding} |
| | | isResponding={isResponding} |
| | |
| | | siteInfo={null} |
| | | messageId={messageId} |
| | | isError={false} |
| | | onRetry={noop} |
| | | inSidePanel |
| | | onRetry={() => { }} |
| | | appId={appId} |
| | | varList={varList} |
| | | /> |
| | | ) |
| | | } |