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 (Advanced)

ComfyUI Node: EasyRAG - LM Studio API (Advanced)

Class Name

RagPromptLMStudioChatAdvanced

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 (Advanced) Description

Facilitates advanced conversational interactions using LM Studio API for dynamic AI interactions.

EasyRAG - LM Studio API (Advanced):

The RagPromptLMStudioChatAdvanced node is designed to facilitate advanced conversational interactions using the LM Studio API. This node is part of the EasyRAG suite, which integrates retrieval-augmented generation (RAG) capabilities to enhance the quality and relevance of AI-generated responses. By leveraging the LM Studio API, this node allows you to engage in sophisticated dialogues, utilizing a variety of models and system prompts to tailor the conversation to specific needs. The advanced configuration options provide flexibility in managing the conversational context, model selection, and response generation parameters, making it a powerful tool for creating dynamic and contextually aware AI interactions.

EasyRAG - LM Studio API (Advanced) Input Parameters:

question

This parameter represents the query or prompt you wish to pose to the AI model. It supports multiline input, allowing for complex and detailed questions. The quality and specificity of the question can significantly impact the relevance and accuracy of the generated response.

base_url

The base URL specifies the endpoint for the LM Studio API. By default, it is set to http://127.0.0.1:1234, which assumes a local setup. This parameter is crucial for directing the API requests to the correct server hosting the LM Studio models.

model

This parameter allows you to select the AI model to be used for generating responses. The available models are listed dynamically, providing flexibility to choose the most suitable model for your task. The choice of model can affect the style and depth of the responses.

system_prompt_source

This parameter determines the source of the system prompt, which guides the AI's behavior during the conversation. Options include predefined files or a custom input, with the default being "🛠️ 自定义" (Custom). The system prompt can influence the tone and focus of the AI's responses.

system_prompt

The system prompt is a string that sets the context or role for the AI, such as "You are a helpful assistant." It can be customized to align the AI's responses with specific objectives or conversational styles. This parameter supports multiline input for detailed prompts.

temperature

This floating-point parameter controls the randomness of the AI's responses. A lower value (e.g., 0.2) results in more deterministic outputs, while a higher value introduces variability. The default is 0.2, balancing creativity and coherence.

max_tokens

This integer parameter sets the maximum number of tokens (words or word pieces) in the generated response. It ranges from 0 to 8192, with a default of 2048, allowing you to control the length and detail of the output.

seed

The seed parameter is an integer used to initialize the random number generator, ensuring reproducibility of results. It ranges from 0 to a large maximum value, allowing for consistent outputs across different runs.

top_k

This integer parameter specifies the number of top predictions to consider when generating a response. It ranges from 1 to 100, with a default of 5, influencing the diversity and quality of the generated text.

stream

A boolean parameter that, when enabled, allows for streaming responses, providing real-time feedback as the AI generates text. The default is True, enhancing interactivity and immediacy in conversations.

unload_model_after_response

This boolean parameter determines whether the model should be unloaded from memory after generating a response. The default is True, which helps manage system resources efficiently by freeing up memory after use.

rag_index

An optional parameter that specifies the RAG index to be used for retrieval-augmented generation. This can enhance the relevance of responses by incorporating external knowledge sources.

image

An optional parameter that allows you to include an image in the conversation context, potentially influencing the AI's response based on visual input.

EasyRAG - LM Studio API (Advanced) Output Parameters:

answer

This output parameter provides the AI-generated response to the input question. It reflects the model's interpretation and synthesis of the provided context and prompt, offering a coherent and relevant answer.

context_used

This output captures the context utilized during the response generation, including any RAG index or additional information that influenced the AI's output. It helps in understanding the basis of the generated answer.

raw_response

The raw_response output contains the complete response payload from the API, including metadata and any additional information beyond the main answer. It is useful for debugging and analyzing the AI's behavior.

EasyRAG - LM Studio API (Advanced) Usage Tips:

  • Customize the system prompt to align the AI's responses with your specific needs, such as setting a formal or casual tone.
  • Experiment with the temperature and top_k parameters to find the right balance between creativity and coherence for your application.

EasyRAG - LM Studio API (Advanced) 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 hosting the LM Studio API is 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 for the system prompt source is correct and that the file contains valid content. Alternatively, use the custom input option for the system prompt.

EasyRAG - LM Studio API (Advanced) 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 (Advanced)