Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Restore the application template (#1174)

charli11720bab6edec9e
diff --git a/api/constants/model_template.py b/api/constants/model_template.py
index 46dfd2dea70..95574b83f70 100644
--- a/api/constants/model_template.py
+++ b/api/constants/model_template.py
@@ -210,44 +210,6 @@ demo_model_templates = {
}),
user_input_form=None
)
- },
- {
- 'name': 'AI Graph Generator',
- 'icon': '',
- 'icon_background': '',
- 'description': 'According to the user\'s stated requirements, mermaid code blocks are generated by AI, and the code blocks are rendered into corresponding SVG vector drawings.',
- 'mode': 'chat',
- 'model_config': AppModelConfig(
- provider='openai',
- model_id='gpt-3.5-turbo',
- configs={
- 'introduction': 'Warm reminder: Click 👍 for correct reply and 👎 for inaccurate reply, which will help me further improve myself and greatly improve the accuracy of reply to similar questions. Hello, please tell me about your image generation needs: ',
- 'prompt_template': "You will play as a mermaid graphics generator, generating code blocks that conform to mermaid format requirements based on user scenario descriptions. \n\n[Note]\n\n- Output mermaid code blocks only, no other explanation. \nLet\'s think step by step.\n",
- 'prompt_variables': [],
- 'completion_params': {
- 'max_token': 300,
- 'temperature': 0.8,
- 'top_p': 0.9,
- 'presence_penalty': 0.1,
- 'frequency_penalty': 0.1,
- }
- },
- opening_statement='Warm reminder: Click 👍 for correct reply and 👎 for inaccurate reply, which will help me further improve myself and greatly improve the accuracy of reply to similar questions. Hello, please tell me about your image generation needs: ',
- suggested_questions=None,
- pre_prompt="You will play as a mermaid graphics generator, generating code blocks that conform to mermaid format requirements based on user scenario descriptions. \n\n[Note]\n\n- Output mermaid code blocks only, no other explanation. \nLet\'s think step by step.\n",
- model=json.dumps({
- "provider": "openai",
- "name": "gpt-3.5-turbo",
- "completion_params": {
- "max_tokens": 300,
- "temperature": 0.8,
- "top_p": 0.9,
- "presence_penalty": 0.1,
- "frequency_penalty": 0.1
- }
- }),
- user_input_form=None
- )
}
],
@@ -366,44 +328,6 @@ demo_model_templates = {
}),
user_input_form=None
)
- },
- {
- 'name': 'AI 图形生成器',
- 'icon': '',
- 'icon_background': '',
- 'description': '根据用户陈述需求利用AI生成mermaid代码块,将代码块渲染成对应SVG矢量图。',
- 'mode': 'chat',
- 'model_config': AppModelConfig(
- provider='openai',
- model_id='gpt-3.5-turbo',
- configs={
- 'introduction': ' 温馨提醒:对正确的回复点击 👍赞同、不准确的回复点击 👎反对,将有助我进一步自我完善,大幅提高同类型问题回复的准确性。\n你好,请告诉我您的图像生成需求:',
- 'prompt_template': "你将扮演mermaid图形生成器,根据用户场景描述生成符合mermaid格式要求的代码块。\n\n[注意事项]\n\n- 仅输出mermaid代码块,不做其他解释。\nLet\'s think step by step.\n",
- 'prompt_variables': [],
- 'completion_params': {
- 'max_token': 1024,
- 'temperature': 0.8,
- 'top_p': 0.9,
- 'presence_penalty': 0.1,
- 'frequency_penalty': 0.1,
- }
- },
- opening_statement=' 温馨提醒:对正确的回复点击 👍赞同、不准确的回复点击 👎反对,将有助我进一步自我完善,大幅提高同类型问题回复的准确性。\n你好,请告诉我您的图像生成需求:',
- suggested_questions=None,
- pre_prompt="你将扮演mermaid图形生成器,根据用户场景描述生成符合mermaid格式要求的代码块。\n\n[注意事项]\n\n- 仅输出mermaid代码块,不做其他解释。\nLet\'s think step by step.\n",
- model=json.dumps({
- "provider": "openai",
- "name": "gpt-3.5-turbo",
- "completion_params": {
- "max_tokens": 1024,
- "temperature": 0.8,
- "top_p": 0.9,
- "presence_penalty": 0.1,
- "frequency_penalty": 0.1
- }
- }),
- user_input_form=None
- )
}
],
}
diff --git a/web/app/(commonLayout)/apps/NewAppDialog.tsx b/web/app/(commonLayout)/apps/NewAppDialog.tsx
index 9dacf6d18b3..1ce38f5830c 100644
--- a/web/app/(commonLayout)/apps/NewAppDialog.tsx
+++ b/web/app/(commonLayout)/apps/NewAppDialog.tsx
@@ -139,7 +139,7 @@ const NewAppDialog = ({ show, onSuccess, onClose }: NewAppDialogProps) => {
</div>
{isWithTemplate
? (
- <ul className='grid grid-cols-3 gap-4'>
+ <ul className='grid grid-cols-2 gap-4'>
{templates?.data?.map((template, index) => (
<li
key={index}