diff --git a/README.md b/README.md index 1198c15..08dbbbf 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Simple, no-nonsense LLM chat nodes for ComfyUI. Connect to OpenAI, Claude, Gemin [English](README.md) | [中文](README_CN.md) +![Workflow Example](assets/example-workflow.webp) + +[View Example Workflow JSON](assets/SimpleChatExample.json) + ## Features - **All-in-One Configuration**: Single, powerful config node for all providers. diff --git a/README_CN.md b/README_CN.md index 675a067..4f97d77 100644 --- a/README_CN.md +++ b/README_CN.md @@ -4,6 +4,10 @@ ComfyUI 的极简 LLM 聊天节点。轻松连接 OpenAI, Claude, Gemini 以及 [English](README.md) | [中文](README_CN.md) +![工作流示例](assets/example-workflow.webp) + +[查看示例工作流 JSON](assets/SimpleChatExample.json) + ## 特性 (Features) - **一站式配置**: 一个强大的配置节点即可搞定所有提供商。 @@ -17,7 +21,7 @@ ComfyUI 的极简 LLM 聊天节点。轻松连接 OpenAI, Claude, Gemini 以及 1. 进入您的 `ComfyUI/custom_nodes` 文件夹并克隆本仓库: ```bash -git clone https://github.com/Moeblack/ComfyUI-SimpleChat.git +git clone https://github.com/yourname/ComfyUI-SimpleChat.git ``` 2. 重启 ComfyUI。 diff --git a/assets/SimpleChatExample.json b/assets/SimpleChatExample.json new file mode 100644 index 0000000..7abcf36 --- /dev/null +++ b/assets/SimpleChatExample.json @@ -0,0 +1,333 @@ +{ + "id": "2b5c19ea-df9d-4ec2-9817-6008a5ec6b00", + "revision": 0, + "last_node_id": 7, + "last_link_id": 6, + "nodes": [ + { + "id": 1, + "type": "GeminiImageGen", + "pos": [ + -781.5342222221653, + 332.1999012404534 + ], + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "name": "config", + "type": "SIMPLECHAT_CONFIG", + "link": 1 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": null + }, + { + "name": "text", + "type": "STRING", + "links": [ + 4 + ] + } + ], + "properties": { + "aux_id": "Moeblack/ComfyUI-SimpleChat", + "ver": "2b6ec2e03952db3ecbaa4523863a26248aa1258c", + "Node name for S&R": "GeminiImageGen" + }, + "widgets_values": [ + "", + "1:1", + "1K" + ] + }, + { + "id": 7, + "type": "PreviewAny", + "pos": [ + -222.96891816368264, + 958.3015087032285 + ], + "size": [ + 290.1690243753533, + 227.7581267041797 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "source", + "type": "*", + "link": 6 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.76", + "Node name for S&R": "PreviewAny" + }, + "widgets_values": [] + }, + { + "id": 6, + "type": "PreviewAny", + "pos": [ + -225.35269895678204, + 634.1270341342924 + ], + "size": [ + 290.1690243753533, + 227.7581267041797 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "source", + "type": "*", + "link": 5 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.76", + "Node name for S&R": "PreviewAny" + }, + "widgets_values": [] + }, + { + "id": 3, + "type": "SimpleChatImage", + "pos": [ + -776.7668061215215, + 642.0725457784246 + ], + "size": [ + 400, + 210 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "config", + "type": "SIMPLECHAT_CONFIG", + "link": 2 + }, + { + "name": "image", + "type": "IMAGE", + "link": null + } + ], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 5 + ] + } + ], + "properties": { + "aux_id": "Moeblack/ComfyUI-SimpleChat", + "ver": "2b6ec2e03952db3ecbaa4523863a26248aa1258c", + "Node name for S&R": "SimpleChatImage" + }, + "widgets_values": [ + "Describe this image.", + "", + 1, + 2048 + ] + }, + { + "id": 4, + "type": "SimpleChatText", + "pos": [ + -768.0269797270017, + 967.0415896974682 + ], + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "config", + "type": "SIMPLECHAT_CONFIG", + "link": 3 + } + ], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 6 + ] + } + ], + "properties": { + "aux_id": "Moeblack/ComfyUI-SimpleChat", + "ver": "2b6ec2e03952db3ecbaa4523863a26248aa1258c", + "Node name for S&R": "SimpleChatText" + }, + "widgets_values": [ + "", + "", + 1, + 2048 + ] + }, + { + "id": 2, + "type": "SimpleChatConfig", + "pos": [ + -1232.835791955557, + 502.2325956119713 + ], + "size": [ + 270, + 178 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "config", + "type": "SIMPLECHAT_CONFIG", + "links": [ + 1, + 2, + 3 + ] + } + ], + "properties": { + "aux_id": "Moeblack/ComfyUI-SimpleChat", + "ver": "2b6ec2e03952db3ecbaa4523863a26248aa1258c", + "Node name for S&R": "SimpleChatConfig" + }, + "widgets_values": [ + "openai", + "", + "", + "refresh", + "" + ] + }, + { + "id": 5, + "type": "PreviewAny", + "pos": [ + -220.5852828561381, + 320.2817247027274 + ], + "size": [ + 290.1690243753533, + 227.7581267041797 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "source", + "type": "*", + "link": 4 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.76", + "Node name for S&R": "PreviewAny" + }, + "widgets_values": [] + } + ], + "links": [ + [ + 1, + 2, + 0, + 1, + 0, + "SIMPLECHAT_CONFIG" + ], + [ + 2, + 2, + 0, + 3, + 0, + "SIMPLECHAT_CONFIG" + ], + [ + 3, + 2, + 0, + 4, + 0, + "SIMPLECHAT_CONFIG" + ], + [ + 4, + 1, + 1, + 5, + 0, + "*" + ], + [ + 5, + 3, + 0, + 6, + 0, + "*" + ], + [ + 6, + 4, + 0, + 7, + 0, + "*" + ] + ], + "groups": [], + "config": {}, + "extra": { + "workflowRendererVersion": "LG", + "ds": { + "scale": 0.839054528882455, + "offset": [ + 1912.1718546059633, + 5.878936827452958 + ] + }, + "frontendVersion": "1.33.10" + }, + "version": 0.4 +} \ No newline at end of file diff --git a/assets/example-workflow.webp b/assets/example-workflow.webp new file mode 100644 index 0000000..9837a80 Binary files /dev/null and b/assets/example-workflow.webp differ diff --git a/core/__pycache__/noass.cpython-311.pyc b/core/__pycache__/noass.cpython-311.pyc index b29b837..9deaa94 100644 Binary files a/core/__pycache__/noass.cpython-311.pyc and b/core/__pycache__/noass.cpython-311.pyc differ diff --git a/nodes/__pycache__/chat_noass.cpython-311.pyc b/nodes/__pycache__/chat_noass.cpython-311.pyc index 0795134..095e89b 100644 Binary files a/nodes/__pycache__/chat_noass.cpython-311.pyc and b/nodes/__pycache__/chat_noass.cpython-311.pyc differ