Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > Comfyui-Easy-RAG > EasyRAG - LM Studio API (Simple)

ComfyUI Node: EasyRAG - LM Studio API (Simple)

Class Name

RagPromptLMStudioChatSimple

Category
RagPrompt
Author
nregret (Account age: 206days)
Extension
Comfyui-Easy-RAG
Latest Updated
2026-06-03
Github Stars
0.05K

How to Install Comfyui-Easy-RAG

Install this extension via the ComfyUI Manager by searching for Comfyui-Easy-RAG
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Comfyui-Easy-RAG 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

EasyRAG - LM Studio API (Simple) Description

Facilitates interactions with language models via LM Studio API for easy AI-generated responses.

EasyRAG - LM Studio API (Simple):

The RagPromptLMStudioChatSimple node is designed to facilitate straightforward interactions with language models via the LM Studio API. This node is part of the EasyRAG suite, which aims to simplify the process of retrieving and generating responses from AI models. It allows you to input a question and receive a generated answer, leveraging the capabilities of language models hosted on a specified server. The node is particularly useful for those who need a quick and efficient way to integrate AI-driven conversational capabilities into their projects without delving into complex configurations. By providing a simple interface, it enables users to focus on crafting their queries and interpreting the responses, making it an ideal tool for AI artists and developers looking to enhance their applications with AI-generated content.

EasyRAG - LM Studio API (Simple) Input Parameters:

question

The question parameter is a string input where you can specify the query or prompt you want the AI model to respond to. This parameter supports multiline input, allowing for detailed and complex questions. The content of this parameter directly influences the response generated by the model, as it forms the basis of the interaction.

base_url

The base_url parameter specifies the URL of the server hosting the language model. By default, it is set to http://127.0.0.1:1234, which typically points to a local server. This parameter is crucial as it determines where the API requests are sent, and changing it allows you to connect to different servers hosting various models.

model

The model parameter allows you to select the specific language model you wish to use for generating responses. The available models are listed dynamically, and choosing the right model can affect the style and accuracy of the responses. This parameter is essential for tailoring the AI's output to your specific needs.

system_prompt

The system_prompt parameter is a string that sets the initial context or behavior for the AI model. It acts as a guiding instruction for the model, influencing how it interprets and responds to the question. This parameter can be customized to adjust the tone and focus of the AI's responses.

system_prompt_source

The system_prompt_source parameter allows you to choose the source of the system prompt. You can select from predefined files or use a custom input. This flexibility enables you to easily switch between different prompt configurations, which can be useful for testing or adapting to different conversational contexts.

temperature

The temperature parameter is a float that controls the randomness of the AI's responses. A lower value like 0.2, which is the default, makes the output more deterministic, while higher values introduce more variability and creativity. Adjusting this parameter can help balance between precision and creativity in the responses.

max_tokens

The max_tokens parameter sets the maximum number of tokens (words or word pieces) that the AI model can generate in its response. It ranges from 0 to 8192, with a default of 2048. This parameter helps manage the length of the output, ensuring it fits within desired constraints.

seed

The seed parameter is an integer used to initialize the random number generator for response generation. It ranges from 0 to a large maximum value, allowing for reproducibility of results. By setting a specific seed, you can ensure consistent outputs across different runs with the same input.

top_k

The top_k parameter is an integer that limits the number of highest probability tokens considered during response generation. It ranges from 1 to 100, with a default of 5. This parameter helps control the diversity of the output by restricting the model's focus to the most likely options.

stream

The stream parameter is a boolean that determines whether the response should be streamed in real-time. When set to true, it allows for a more interactive experience, as you can see the response being generated progressively.

unload_model_after_response

The unload_model_after_response parameter is a boolean that specifies whether the model should be unloaded from memory after generating a response. This can help manage system resources, especially when working with large models or limited hardware.

rag_index

The rag_index parameter is optional and allows you to specify a RAG (Retrieval-Augmented Generation) index to enhance the response with additional context. This can improve the relevance and accuracy of the generated content by incorporating external information.

image

The image parameter is optional and can be used to provide an image input that the model can consider when generating a response. This feature is useful for tasks that require visual context or when integrating multimodal inputs.

EasyRAG - LM Studio API (Simple) Output Parameters:

answer

The answer output parameter provides the generated response from the AI model based on the input question and other parameters. It is a string that contains the AI's interpretation and reply, serving as the primary output of the node.

context_used

The context_used output parameter details the context or additional information utilized by the model during response generation. This can include any RAG index data or system prompts that influenced the output, offering insight into the response's background.

raw_response

The raw_response output parameter contains the complete raw data returned by the API, including metadata and any additional information. This output is useful for debugging or when you need to analyze the full response beyond the generated answer.

EasyRAG - LM Studio API (Simple) Usage Tips:

  • To achieve more creative responses, consider increasing the temperature parameter, but keep in mind that this may reduce the determinism of the output.
  • Utilize the system_prompt parameter to guide the AI's behavior and ensure the responses align with your desired tone or style.

EasyRAG - LM Studio API (Simple) Common Errors and Solutions:

API 连接失败

  • Explanation: This error indicates a failure to connect to the specified API endpoint, possibly due to incorrect base_url or network issues.
  • Solution: Verify that the base_url is correct and that the server is running and accessible. Check your network connection and firewall settings.

未找到提示词文件或内容为空

  • Explanation: This error occurs when the specified system prompt file cannot be found or is empty.
  • Solution: Ensure that the file path is correct and that the file contains valid content. Alternatively, use the custom input option for the system_prompt_source.

EasyRAG - LM Studio API (Simple) Related Nodes

Go back to the extension to check out more related nodes.
Comfyui-Easy-RAG
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

EasyRAG - LM Studio API (Simple)