mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-16 15:05:52 +08:00
chore: remove legecy label
This commit is contained in:
parent
b305c17bc3
commit
744d75c8aa
@ -10,7 +10,6 @@ import Slider from '@/app/components/base/slider'
|
||||
import Radio from '@/app/components/base/radio'
|
||||
import { SimpleSelect } from '@/app/components/base/select'
|
||||
import TagInput from '@/app/components/base/tag-input'
|
||||
import Badge from '@/app/components/base/badge'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
export type ParameterValue = number | string | string[] | boolean | undefined
|
||||
@ -281,19 +280,6 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
||||
/>
|
||||
)
|
||||
}
|
||||
{/* TODO: wait api return and product design */}
|
||||
{parameterRule.name === 'json_schema' && (
|
||||
<Tooltip
|
||||
popupContent={(
|
||||
<div className='w-[232px]'>
|
||||
<div className='mb-1 body-xs-regular text-text-secondary'>{t('app.structOutput.legacyTip')}</div>
|
||||
<a className='' target='_blank' href='https://todo'>{t('app.structOutput.learnMore')}</a>
|
||||
</div>
|
||||
)}
|
||||
>
|
||||
<Badge uppercase className='text-text-accent-secondary'>{t('app.structOutput.legacy')}</Badge>
|
||||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
{
|
||||
parameterRule.type === 'tag' && (
|
||||
|
@ -3,7 +3,7 @@ import Button from '@/app/components/base/button'
|
||||
import { RiEditLine } from '@remixicon/react'
|
||||
import type { FC } from 'react'
|
||||
import React, { useCallback } from 'react'
|
||||
import type { SchemaRoot, StructuredOutput } from '../types'
|
||||
import { type SchemaRoot, type StructuredOutput, Type } from '../types'
|
||||
import ShowPanel from '@/app/components/workflow/nodes/_base/components/variable/object-child-tree-panel/show'
|
||||
import { useBoolean } from 'ahooks'
|
||||
import JsonSchemaConfigModal from './json-schema-config-modal'
|
||||
@ -59,7 +59,12 @@ const StructureOutput: FC<Props> = ({
|
||||
{showConfig && (
|
||||
<JsonSchemaConfigModal
|
||||
isShow
|
||||
defaultSchema={(value?.schema || {}) as any} // wait for types change
|
||||
defaultSchema={(value?.schema || {
|
||||
type: Type.object,
|
||||
properties: {},
|
||||
required: [],
|
||||
additionalProperties: false,
|
||||
}) as any} // wait for types change
|
||||
onSave={handleChange as any} // wait for types change
|
||||
onClose={hideConfigModal}
|
||||
/>
|
||||
|
@ -190,9 +190,6 @@ const translation = {
|
||||
structuredTip: 'Structured Outputs is a feature that ensures the model will always generate responses that adhere to your supplied JSON Schema',
|
||||
modelNotSupported: 'Model not supported',
|
||||
modelNotSupportedTip: 'The current model does not support this feature and is automatically downgraded to prompt injection.',
|
||||
legacy: 'Legacy',
|
||||
legacyTip: 'JSON Schema will be removed from model parameters, you can use the structured output functionality under nodes instead.',
|
||||
learnMore: 'Learn more',
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -191,9 +191,6 @@ const translation = {
|
||||
structuredTip: '结构化输出是一项功能,可确保模型始终生成符合您提供的 JSON 模式的响应',
|
||||
modelNotSupported: '模型不支持',
|
||||
modelNotSupportedTip: '当前模型不支持此功能,将自动降级为提示注入。',
|
||||
legacy: '遗留',
|
||||
legacyTip: '此功能将在未来版本中删除',
|
||||
learnMore: '了解更多',
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user