app:
description: ''
icon: 🉐
icon_background: '#FCE7F6'
mode: advanced-chat
name: 'Claude Prompt: 汉语新解'
use_icon_as_answer_icon: false
kind: app
version: 0.1.2
workflow:
conversation_variables: []
environment_variables: []
features:
file_upload:
image:
enabled: false
number_limits: 3
transfer_methods:
- local_file
- remote_url
opening_statement: ''
retriever_resource:
enabled: false
sensitive_word_avoidance:
enabled: false
speech_to_text:
enabled: false
suggested_questions: []
suggested_questions_after_answer:
enabled: false
text_to_speech:
enabled: false
language: ''
voice: ''
graph:
edges:
- data:
sourceType: start
targetType: llm
id: 1726099945853-llm
selected: false
source: '1726099945853'
sourceHandle: source
target: llm
targetHandle: target
type: custom
- data:
isInIteration: false
sourceType: llm
targetType: code
id: llm-source-1726107763753-target
selected: false
source: llm
sourceHandle: source
target: '1726107763753'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: code
targetType: answer
id: 1726107763753-source-answer-target
source: '1726107763753'
sourceHandle: source
target: answer
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: '1726099945853'
position:
x: 80
y: 282
positionAbsolute:
x: 80
y: 282
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: ''
memory:
query_prompt_template: "{{#sys.query#}}\n(直接生成 svg 完整代码,我会复制,需要你用代码块)\n\
(除此之外不要有多余的解释)\n解释的内容自动加入换行标签,例如:\n文字1,\n 文字12,\n"
role_prefix:
assistant: ''
user: ''
window:
enabled: false
size: 10
model:
completion_params:
temperature: 0.7
mode: chat
name: claude-3-5-sonnet-20240620
provider: anthropic
prompt_template:
- id: cd16d16b-62b2-452d-91fd-a091312787a5
role: system
text: "{提示词 START:\n;; 作者: 李继刚\n;; 版本: 0.3\n;; 模型: Claude Sonnet\n;; 用途:\
\ 将一个汉语词汇进行全新角度的解释\n\n;; 设定如下内容为你的 *System Prompt*\n(defun 新汉语老师 ()\n\
\ \"你是年轻人,批判现实,思考深刻,语言风趣\"\n (风格 . (\"Oscar Wilde\" \"鲁迅\" \"罗永浩\"))\n\
\ (擅长 . 一针见血)\n (表达 . 隐喻)\n (批判 . 讽刺幽默))\n\n(defun 汉语新解 (用户输入)\n \"\
你会用一个特殊视角来解释一个词汇\"\n (let (解释 (精练表达\n (隐喻 (一针见血 (辛辣讽刺 (抓住本质\
\ 用户输入))))))\n (few-shots (委婉 . \"刺向他人时, 决定在剑刃上撒上止痛药。\"))\n (SVG-Card\
\ 解释)))\n\n(defun SVG-Card (解释)\n \"输出SVG 卡片\"\n (setq design-rule \"\
合理使用负空间,整体排版要有呼吸感\"\n design-principles '(干净 简洁 典雅))\n\n (设置画布\
\ '(宽度 400 高度 600 边距 20))\n (标题字体 '毛笔楷体)\n (自动缩放 '(最小字号 16))\n\n (配色风格\
\ '((背景色 (蒙德里安风格 设计感)))\n (主要文字 (汇文明朝体 粉笔灰))\n (装饰图案\
\ 随机几何图))\n\n (卡片元素 ((居中标题 \"汉语新解\")\n 分隔线\n \
\ (排版输出 用户输入 英文 日语)\n 解释\n (线条图 (批判内核 解释))\n \
\ (极简总结 线条图))))\n\n(defun start ()\n \"启动时运行\"\n (let (system-role\
\ 新汉语老师)\n (print \"说吧, 他们又用哪个词来忽悠你了?\")))\n\n;; 运行规则\n;; 1. 启动时必须运行\
\ (start) 函数\n;; 2. 之后调用主函数 (汉语新解 用户输入)\n提示词 END}"
- id: 749128f5-e95a-480c-9d7b-aeb9982cb9e3
role: user
text: 开始
- id: bdae2ae8-856b-4e9a-ab73-8fc780b0091f
role: assistant
text: 说吧, 他们又用哪个词来忽悠你了?
selected: false
title: 'Claude Prompt: 汉语新解'
type: llm
variables: []
vision:
configs:
detail: high
enabled: true
height: 98
id: llm
position:
x: 380.86982207962456
y: 282
positionAbsolute:
x: 380.86982207962456
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: 'SVG:
{{#llm.text#}}
HTML:
![]({{#1726107763753.result#}})'
desc: ''
selected: false
title: SVG Code
type: answer
variables: []
height: 125
id: answer
position:
x: 981.7329709775304
y: 282
positionAbsolute:
x: 981.7329709775304
y: 282
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
author: lysonober
desc: ''
height: 238
selected: false
showAuthor: true
text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Lyson
Ober''s tip:","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[],"direction":null,"format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"After
the SVG code generation is complete, go here to render and share with one
click! 👉 https://www.svgviewer.dev/","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[],"direction":null,"format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"But
you can also see that directly in Dify because 👉","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
theme: blue
title: ''
type: ''
width: 249
height: 238
id: '1726101164710'
position:
x: 380.86982207962456
y: 409.2078640511019
positionAbsolute:
x: 380.86982207962456
y: 409.2078640511019
selected: false
sourcePosition: right
targetPosition: left
type: custom-note
width: 249
- data:
author: lysonober
desc: ''
height: 286
selected: false
showAuthor: true
text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"👋
Hi everyone, I''m Lyson Ober, the webmaster of dify101.com. This is my Dify
implementation DSL file for the prompt from Li Jigang. ","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"👉
Check it out ","type":"text","version":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"here","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"link","version":1,"rel":"noreferrer","target":null,"title":null,"url":"https://dify101.com/tutorial/hanyuxinjie"}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"✨
I hope this can help you learn Dify, and also serve as a supplement to Li
Jigang''s generous sharing.","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"🙏
Thank you all for your wisdom and contributions. It''s because you open-source
contributors have made Dify better. Your efforts are greatly appreciated!","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
theme: blue
title: ''
type: ''
width: 241
height: 286
id: '1726101257454'
position:
x: 82.95491644963508
y: 366.95134777626964
positionAbsolute:
x: 82.95491644963508
y: 366.95134777626964
selected: false
sourcePosition: right
targetPosition: left
type: custom-note
width: 241
- data:
code: "import base64\n\n\ndef main(svg_str: str) -> dict:\n svg_str = svg_str.strip(\"\
```svg\\n\")\n svg_bytes = svg_str.encode(\"utf-8\")\n base64_bytes\
\ = base64.b64encode(svg_bytes)\n base64_string = base64_bytes.decode(\"\
utf-8\")\n result = f\"data:image/svg+xml;base64,{base64_string}\"\n\
\ return {\n \"result\": result,\n }\n"
code_language: python3
desc: ''
outputs:
result:
children: null
type: string
selected: false
title: svg-to-base64
type: code
variables:
- value_selector:
- llm
- text
variable: svg_str
height: 54
id: '1726107763753'
position:
x: 680
y: 282
positionAbsolute:
x: 680
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
author: lysonober
desc: ''
height: 126
selected: false
showAuthor: true
text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"From
Rain''s tip:","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[],"direction":null,"format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Like
this 👆","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
theme: blue
title: ''
type: ''
width: 253
height: 126
id: '1726130016426'
position:
x: 680
y: 409.2078640511019
positionAbsolute:
x: 680
y: 409.2078640511019
selected: false
sourcePosition: right
targetPosition: left
type: custom-note
width: 253
viewport:
x: -753.8716114255371
y: 29.02315031814561
zoom: 1.159584469323235