Skip to content

Commit

Permalink
perf: app templates
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Jan 11, 2024
1 parent fb6e181 commit d603214
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 14 deletions.
4 changes: 2 additions & 2 deletions projects/app/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@
"Simple template tip": "Simple template\nHas built-in parameter details",
"Simple chat": "Simple chat",
"Simple chat desc": "An extremely simple AI conversation application ",
"Dataset and guide": "Knowledge base + dialogue guide",
"Dataset and guide": "Dataset + dialogue guide",
"Dataset and guide desc": "Conduct a knowledge base search each time a question is asked, inject the search results into the LLM model for reference answers ",
"Guide and variables": "Dialogue guide + Variables ",
"Guide and variables desc": "You can send a prompt at the beginning of the conversation, or ask the user to fill in something as a variable for the conversation ",
"Classify and dataset": "Problem classification + Knowledge base ",
"Classify and dataset": "Classification + Dataset",
"Classify and dataset desc": "Classify the user's problems first, then perform different actions according to the different types of problems."
},
"tip": {
Expand Down
18 changes: 13 additions & 5 deletions projects/app/src/pages/api/core/app/form2Modules/fastgpt-simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,18 +296,14 @@ function datasetTemplate({ formData, maxToken }: Props): ModuleItemType[] {
{
moduleId: 'vuc92c',
key: 'userChatInput'
},
{
moduleId: 'chatModule',
key: 'userChatInput'
}
]
}
]
},
{
moduleId: 'datasetSearch',
name: '知识库搜索',
name: 'core.module.template.Dataset search',
avatar: '/imgs/module/db.png',
flowType: 'datasetSearchNode',
showStatus: true,
Expand Down Expand Up @@ -447,6 +443,18 @@ function datasetTemplate({ formData, maxToken }: Props): ModuleItemType[] {
valueType: 'boolean',
type: 'source',
targets: []
},
{
key: 'userChatInput',
label: 'core.module.input.label.user question',
type: 'hidden',
valueType: 'string',
targets: [
{
moduleId: 'chatModule',
key: 'userChatInput'
}
]
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,18 +292,14 @@ function datasetTemplate(formData: AppSimpleEditFormType): ModuleItemType[] {
{
moduleId: 'vuc92c',
key: 'userChatInput'
},
{
moduleId: 'chatModule',
key: 'userChatInput'
}
]
}
]
},
{
moduleId: 'datasetSearch',
name: '知识库搜索',
name: 'core.module.template.Dataset search',
avatar: '/imgs/module/db.png',
flowType: 'datasetSearchNode',
showStatus: true,
Expand Down Expand Up @@ -457,6 +453,18 @@ function datasetTemplate(formData: AppSimpleEditFormType): ModuleItemType[] {
valueType: 'boolean',
type: 'source',
targets: []
},
{
key: 'userChatInput',
label: 'core.module.input.label.user question',
type: 'hidden',
valueType: 'string',
targets: [
{
moduleId: 'chatModule',
key: 'userChatInput'
}
]
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions projects/app/src/web/core/app/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export const appTemplates: (AppItemType & {
},
{
moduleId: 'datasetSearch',
name: '知识库搜索',
name: 'core.module.template.Dataset search',
avatar: '/imgs/module/db.png',
flowType: 'datasetSearchNode',
showStatus: true,
Expand Down Expand Up @@ -1494,7 +1494,7 @@ export const appTemplates: (AppItemType & {
},
{
moduleId: 'fljhzy',
name: '知识库搜索',
name: 'core.module.template.Dataset search',
avatar: '/imgs/module/db.png',
flowType: 'datasetSearchNode',
showStatus: true,
Expand Down

0 comments on commit d603214

Please sign in to comment.