- Modern ComfyUI FlexAI plugin with OpenAI SDK 1.x support - Dual-mode image processing: generation (images.generate) + editing (images.edit) - Support for 1-4 simultaneous image inputs in edit mode - Multimodal text generation with vision-language understanding - Multi-provider configuration system - Comprehensive error handling with visual feedback - Clean architecture with unified flexai: namespace - Complete documentation in English and Chinese
24 lines
814 B
Bash
24 lines
814 B
Bash
#############################################
|
|
# ComfyUI FlexAI 多提供商配置示例 (.env.example)
|
|
#############################################
|
|
|
|
# 方式一: 单一提供商 (最简单, 与旧版兼容)
|
|
#OPENAI_API_KEY=sk_your_key
|
|
#OPENAI_API_BASE=https://api.openai.com/v1
|
|
|
|
# 方式二: 多提供商 (后缀形式). 可显式列出顺序:
|
|
OPENAI_PROVIDERS=default,alt,local
|
|
|
|
OPENAI_API_KEY_default=sk_default
|
|
OPENAI_API_BASE_default=https://api.openai.com/v1
|
|
|
|
OPENAI_API_KEY_alt=sk_alt
|
|
OPENAI_API_BASE_alt=https://api.alt-endpoint.com/v1
|
|
|
|
OPENAI_API_KEY_local=sk_local
|
|
OPENAI_API_BASE_local=http://127.0.0.1:8000/v1
|
|
|
|
# (可选) 也可以不写 OPENAI_PROVIDERS, 只要存在多个 OPENAI_API_KEY_<suffix> 就会自动发现。
|
|
|
|
# 保存为 .env 生效; 修改后通常需重启 ComfyUI 以刷新下拉列表
|