feat: advanced prompt (#1330)
Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: Gillian97 <jinling.sunshine@gmail.com>
This commit is contained in:
@@ -121,6 +121,13 @@ const config: ProviderConfig = {
|
||||
'zh-Hans': '文本生成',
|
||||
},
|
||||
},
|
||||
// {
|
||||
// key: 'chat',
|
||||
// label: {
|
||||
// 'en': 'Chat',
|
||||
// 'zh-Hans': '聊天',
|
||||
// },
|
||||
// },
|
||||
{
|
||||
key: 'embeddings',
|
||||
label: {
|
||||
@@ -217,22 +224,33 @@ const config: ProviderConfig = {
|
||||
'en': 'Task',
|
||||
'zh-Hans': 'Task',
|
||||
},
|
||||
options: [
|
||||
{
|
||||
key: 'text2text-generation',
|
||||
label: {
|
||||
'en': 'Text-to-Text Generation',
|
||||
'zh-Hans': 'Text-to-Text Generation',
|
||||
options: (value?: FormValue) => {
|
||||
if (value?.model_type === 'chat') {
|
||||
return [{
|
||||
key: 'question-answer',
|
||||
label: {
|
||||
'en': '问答',
|
||||
'zh-Hans': 'Question Answer',
|
||||
},
|
||||
}]
|
||||
}
|
||||
return [
|
||||
{
|
||||
key: 'text2text-generation',
|
||||
label: {
|
||||
'en': 'Text-to-Text Generation',
|
||||
'zh-Hans': 'Text-to-Text Generation',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'text-generation',
|
||||
label: {
|
||||
'en': 'Text Generation',
|
||||
'zh-Hans': 'Text Generation',
|
||||
{
|
||||
key: 'text-generation',
|
||||
label: {
|
||||
'en': 'Text Generation',
|
||||
'zh-Hans': 'Text Generation',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
]
|
||||
},
|
||||
},
|
||||
{
|
||||
hidden: (value?: FormValue) => !(value?.huggingfacehub_api_type === 'inference_endpoints' && value?.model_type === 'embeddings'),
|
||||
|
||||
@@ -61,6 +61,13 @@ const config: ProviderConfig = {
|
||||
'zh-Hans': '文本生成',
|
||||
},
|
||||
},
|
||||
// {
|
||||
// key: 'chat',
|
||||
// label: {
|
||||
// 'en': 'Chat',
|
||||
// 'zh-Hans': '聊天',
|
||||
// },
|
||||
// },
|
||||
{
|
||||
key: 'embeddings',
|
||||
label: {
|
||||
|
||||
Reference in New Issue
Block a user