if-ai / ComfyUI-IF_AI_tools

ComfyUI-IF_AI_tools is a set of custom nodes for ComfyUI that allows you to generate prompts using a local Large Language Model (LLM) via Ollama. This tool enables you to enhance your image generation workflow by leveraging the power of language models.
https://ko-fi.com/impactframes
368 stars 27 forks source link

Disable the `Error: <...> is required` log message #7

Closed Gerkinfeltser closed 2 months ago

Gerkinfeltser commented 3 months ago

Is it possible to disable the Error: ... is required log message if ollama is used?

I see the following frequently in my console log.

Error: ANTHROPIC_API_KEY is required
Error: OPENAI_API_KEY is required
Error: ANTHROPIC_API_KEY is required
Error: OPENAI_API_KEY is required
if-ai commented 3 months ago

Hi, I thought they were not required are you trying to use openai or anthropic api? if so you need to set them up like in the readme if not, please set a dummy key that might work for the time being I will fix this next update so is not required. Sorry I must have overlooked that

Gerkinfeltser commented 2 months ago

Hi, thanks for the reply! I went ahead and added system variables in Win 10 (dummy ones at least) and now the errors are gone but the server shell is constantly reporting:

API key found for ANTHROPIC_API_KEY
API key found for OPENAI_API_KEY
API key found for ANTHROPIC_API_KEY
API key found for OPENAI_API_KEY
if-ai commented 2 months ago

Fixed it, they will not show, anymore in the latest update, Thank you.