Revert "chore: use node specify llm to auto generate prompt" (#6555)

This commit is contained in:
Joel
2024-07-23 13:31:32 +08:00
committed by GitHub
parent e80412df23
commit d726473c6d
9 changed files with 57 additions and 98 deletions

View File

@@ -9,7 +9,6 @@ import { useTranslation } from 'react-i18next'
import { useBoolean } from 'ahooks'
import { BlockEnum, EditionType } from '../../../../types'
import type {
ModelConfig,
Node,
NodeOutPutVar,
Variable,
@@ -59,7 +58,6 @@ type Props = {
availableNodes?: Node[]
isSupportPromptGenerator?: boolean
onGenerated?: (prompt: string) => void
modelConfig?: ModelConfig
// for jinja
isSupportJinja?: boolean
editionType?: EditionType
@@ -92,7 +90,6 @@ const Editor: FC<Props> = ({
varList = [],
handleAddVariable,
onGenerated,
modelConfig,
}) => {
const { t } = useTranslation()
const { eventEmitter } = useEventEmitterContextContext()
@@ -133,7 +130,7 @@ const Editor: FC<Props> = ({
<div className='flex items-center'>
<div className='leading-[18px] text-xs font-medium text-gray-500'>{value?.length || 0}</div>
{isSupportPromptGenerator && (
<PromptGeneratorBtn className='ml-[5px]' onGenerated={onGenerated} modelConfig={modelConfig} />
<PromptGeneratorBtn className='ml-[5px]' onGenerated={onGenerated} />
)}
<div className='w-px h-3 ml-2 mr-2 bg-gray-200'></div>