ComfyUI Node
LLM Prompt Refiner
Formats an LLM request payload for prompt refinement and parses the response. Does not perform network I/O. Returns the request payload as JSON and the parsed refined prompt if a response is provided.
LLM Prompt Refiner
- refined_prompt
- request_payload
- redacted_api_key
- error_message
◄raw_prompt►
◄llm_endpointhttp://127.0.0.1:8002/v1/chat/completions►
◄api_key►
◄system_promptYou are a prompt engineer. Refine and expand the user's prompt to be more detailed and descriptive for an image generation model.►
◄api_formatopenai►
◄llm_response►
CategoryParametric/Agents
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| raw_prompt | STRING | Raw prompt. | |
| llm_endpoint | STRING | http://127.0.0.1:8002/v1/chat/completions | Llm endpoint. Default http://127.0.0.1:8002/v1/chat/completions. |
| api_key | STRING | Api key. | |
| system_prompt | STRING | You are a prompt engineer. Refine and expand the user's prompt to be more detailed and descriptive for an image generation model. | System prompt. Default You are a prompt engineer. Refine and expand the user's prompt to be more detailed and descriptive for an image generation model.. |
| api_format | COMBO | openai | Api format. One of 2 choices. Default openai. |
| llm_responseopt | STRING | Llm response. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| refined_prompt | STRING | — |
| request_payload | STRING | — |
| redacted_api_key | STRING | — |
| error_message | STRING | — |