ComfyUI  >  Nodes  >  comfyui-art-venture >  LLM Message

ComfyUI Node: LLM Message

Class Name

AV_LLMMessage

Category
ArtVenture/LLM
Author
sipherxyz (Account age: 1158 days)
Extension
comfyui-art-venture
Latest Updated
7/31/2024
Github Stars
0.1K

How to Install comfyui-art-venture

Install this extension via the ComfyUI Manager by searching for  comfyui-art-venture
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui-art-venture in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

LLM Message Description

Facilitates message creation and management for large language models within ArtVenture, ensuring correct formatting and API compliance.

LLM Message:

The AV_LLMMessage node is designed to facilitate the creation and management of messages for large language models (LLMs) within the ArtVenture framework. This node allows you to construct messages with specific roles, such as system, user, or assistant, and include text and optional images. It ensures that messages are formatted correctly and adhere to the constraints required by different LLM APIs. By using this node, you can streamline the process of preparing inputs for LLM interactions, making it easier to integrate complex conversational AI capabilities into your projects.

LLM Message Input Parameters:

role

The role parameter specifies the role of the message within the conversation. It can be one of three options: system, user, or assistant. The system role is used for setting up the context or instructions for the conversation, the user role represents the input from the user, and the assistant role is for the responses generated by the AI assistant. This parameter is crucial for defining the structure and flow of the conversation.

text

The text parameter contains the actual message content in the form of a string. This can be a multiline input, allowing for detailed and extensive messages. The text is the primary content that will be processed by the LLM, making it a critical component of the message.

image (optional)

The image parameter allows you to include an optional image in the message. This image should be in a format that can be converted to a base64 encoded string. Including an image can enhance the message by providing visual context or additional information that complements the text.

messages (optional)

The messages parameter is a list of existing messages that the new message will be appended to. This allows for the creation of a conversation history, which can be useful for maintaining context in ongoing interactions with the LLM.

LLM Message Output Parameters:

messages

The messages output parameter is a list of messages that includes the newly created message along with any existing messages provided in the input. This list is formatted and ready to be used as input for further processing by LLM APIs. It ensures that the conversation history is maintained and that all messages are correctly structured.

LLM Message Usage Tips:

  • Ensure that the role parameter is correctly set to define the context of the message within the conversation.
  • Use the text parameter to provide clear and concise information or queries to the LLM.
  • If including an image, make sure it is in a compatible format and appropriately encoded.
  • Utilize the messages parameter to maintain a coherent conversation history, which can improve the quality of responses from the LLM.

LLM Message Common Errors and Solutions:

System prompt does not support image.

  • Explanation: This error occurs when an image is included in a message with the system role.
  • Solution: Remove the image from the system message, as system prompts should only contain text.

Only one system prompt is allowed.

  • Explanation: This error is raised when multiple system messages are included in the conversation history.
  • Solution: Ensure that there is only one system message in the list of messages to avoid conflicts.

OpenAI API key is required.

  • Explanation: This error indicates that the OpenAI API key is missing or not provided.
  • Solution: Provide a valid OpenAI API key in the configuration settings to enable API access.

LLM Message Related Nodes

Go back to the extension to check out more related nodes.
comfyui-art-venture
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.