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
477 stars 35 forks source link

system's content is blank #89

Open vicliu624 opened 1 month ago

vicliu624 commented 1 month ago

when i use IF_AI_tools.json to test. In IF_Chat_Prompt, engine is 'lmstudio' and tool is 'None'. but server log show [2024-08-04 00:03:05.289] [ERROR] [Server Error] {"title":'"messages' array must only contain objects with a 'content' field that is not empty"} in LM Studio.

The reason is content is "", when role is system.

''' [2024-08-04 00:03:05.289] [INFO] Received POST request to /v1/chat/completions with body: { "model": "xtuner/llava-llama-3-8b-v1_1-gguf/llava-llama-3-8b-v1_1-int4.gguf", "messages": [ { "role": "system", "content": "" }, { "role": "user", "content": "a flower\n[Image data: .... ''' Possitive prompt cant generate.Response is ''' 400 Client Error: Bad Request for url: http://127.0.0.1:1234/v1/chat/completions Pixar, animated, whimsical, exaggerated, stylized, ''' How to avoid this error.How to set system's content.

if-ai commented 1 month ago

right maybe did you select assistant none? this looks like a bug I made somewhere but meanwhile maybe you can create a new preset that says something like "you are a helpful assistant" or use the prime directives