Nodes Browser
ComfyDeploy: How ComfyUI_pandai works in ComfyUI?
What is ComfyUI_pandai?
Introduction The ComfyUI_pandai node is a custom ComfyUI node designed to interact with the DeepSeek API. It supports text generation, translation, and text polishing. With this node, users can easily generate text, translate content, and refine the generated text for better quality.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
ComfyUI_pandai
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
ComfyUI_pandai
核心改进说明
-
JSON结构验证
- 新增
_build_messages
方法确保消息结构符合API规范 - 支持字符串和字典两种content格式
- 自动处理历史消息的深拷贝
- 新增
-
错误处理优化
- 所有API调用添加try-catch保护
- 分离生成、翻译、润色逻辑到独立方法
- 新增安全调用方法
_call_api_safely
-
输出改进
- 明确返回四个输出端口
- 新增translated_text独立输出
- 优化polish提示词模板
安装指南(保持不变)
(原有安装步骤保持不变,此处省略以节省篇幅)