A minimalist node that calls LLMs, combined with one API, can call all language models, including local models.
A ComfyUI extension that supports various Large Language Models (LLMs) and Vision Language Models (VLMs), providing a unified interface and simple configuration.
<a name="english"></a>
cd ComfyUI/custom_nodes
git clone https://github.com/leoleexh/ComfyUI-LLMs
cd ComfyUI-LLMs
pip install -r requirements.txt
cp settings.yaml.sample settings.yaml
settings.yaml
to configure your API keys and model settingsThe configuration file structure is as follows:
chatllmleoleexh:
# OpenAI Compatible Interface Configuration
openai_compatible:
default:
api_base: "http://your-api-endpoint:3200/v1" # API endpoint
organisation: "NONE" # Organization ID (optional)
api_key: "your-api-key" # API key
model: # Supported models
- "gpt-3.5-turbo"
- "gpt-4"
# Other supported models...
# Vision Models Configuration
vision_models:
# OpenAI Vision Model
openai:
api_key: "your-openai-key"
api_base: "http://your-api-endpoint:3200/v1"
model_list:
- "gpt-4-vision-preview"
# Zhipu GLM4 Vision Model
glm4:
api_key: "your-glm4-key"
model_list:
- "glm-4v"
- "glm-4"
# Alibaba Qwen Vision Model
ali:
api_key: "your-ali-key"
model_list:
- "qwen-vl-plus"
- "qwen-vl-max"
# Google Gemini Vision Model
gemini:
api_key: "your-gemini-key"
model_list:
- "gemini-pro-vision"
# Prompt Templates Configuration
prompt_templates:
default:
system: "System prompt"
prefix: "Prefix prompt"
suffix: "Suffix prompt"
OpenAI and Compatible Models
Vision Model Support
🤖 LLMs Chat
in the node list🎯 LLMs Vision
in the node listSee CHANGELOG.md
Issues and Pull Requests are welcome!
MIT License
<a name="chinese"></a>
ComfyUI的LLM扩展,支持多种大语言模型和视觉语言模型,提供统一的接口和简单的配置方式。
cd ComfyUI/custom_nodes
git clone https://github.com/leoleexh/ComfyUI-LLMs
cd ComfyUI-LLMs
pip install -r requirements.txt
cp settings.yaml.sample settings.yaml
settings.yaml
文件,配置您的API密钥和模型设置配置文件结构如下:
chatllmleoleexh:
# OpenAI兼容接口配置
openai_compatible:
default:
api_base: "http://your-api-endpoint:3200/v1" # API端点
organisation: "NONE" # 组织ID(可选)
api_key: "your-api-key" # API密钥
model: # 支持的模型列表
- "gpt-3.5-turbo"
- "gpt-4"
# 其他支持的模型...
# 视觉模型配置
vision_models:
# OpenAI视觉模型
openai:
api_key: "your-openai-key"
api_base: "http://your-api-endpoint:3200/v1"
model_list:
- "gpt-4-vision-preview"
# 智谱GLM4视觉模型
glm4:
api_key: "your-glm4-key"
model_list:
- "glm-4v"
- "glm-4"
# 阿里通义千问视觉模型
ali:
api_key: "your-ali-key"
model_list:
- "qwen-vl-plus"
- "qwen-vl-max"
# Google Gemini视觉模型
gemini:
api_key: "your-gemini-key"
model_list:
- "gemini-pro-vision"
# 提示词模板配置
prompt_templates:
default:
system: "系统提示词"
prefix: "前缀提示词"
suffix: "后缀提示词"
OpenAI及兼容模型
视觉模型支持
🤖 LLMs Chat | 智能对话
🎯 LLMs Vision | 图像理解
详见 CHANGELOG.md
欢迎提交Issue和Pull Request!
MIT License