diff --git a/api/core/tools/provider/builtin/jina/tools/jina_tokenizer.yaml b/api/core/tools/provider/builtin/jina/tools/jina_tokenizer.yaml index 807aeec39b621b..62a5c7e7bacd75 100644 --- a/api/core/tools/provider/builtin/jina/tools/jina_tokenizer.yaml +++ b/api/core/tools/provider/builtin/jina/tools/jina_tokenizer.yaml @@ -60,5 +60,11 @@ parameters: label: en_US: Tokenizer human_description: - en_US: cl100k_base - gpt-4,gpt-3.5-turbo,gpt-3.5; o200k_base - gpt-4o,gpt-4o-mini; p50k_base - text-davinci-003,text-davinci-002 + en_US: | + · cl100k_base --- gpt-4, gpt-3.5-turbo, gpt-3.5 + · o200k_base --- gpt-4o, gpt-4o-mini + · p50k_base --- text-davinci-003, text-davinci-002 + · r50k_base --- text-davinci-001, text-curie-001 + · p50k_edit --- text-davinci-edit-001, code-davinci-edit-001 + · gpt2 --- gpt-2 form: form diff --git a/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx b/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx index 6bf7f389fc2db2..3cf3fc513f931c 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react' +import { Fragment, useState } from 'react' import type { FC } from 'react' import { RiQuestionLine, @@ -70,6 +70,16 @@ const Form: FC = ({ onChange({ ...value, [key]: val, ...shouldClearVariable }) } + // convert tooltip '\n' to
+ const renderTooltipContent = (content: string) => { + return content.split('\n').map((line, index, array) => ( + + {line} + {index < array.length - 1 &&
} +
+ )) + } + const renderField = (formSchema: CredentialFormSchema) => { const tooltip = formSchema.tooltip const tooltipContent = (tooltip && ( @@ -77,7 +87,7 @@ const Form: FC = ({ - {tooltip[language] || tooltip.en_US} + {renderTooltipContent(tooltip[language] || tooltip.en_US)} } >