h2oGPTe icon

h2oGPTe

h2oGPTe is an AI-powered search assistant for your internal teams to answer questions gleaned from large volumes of documents, websites and workplace content.

Actions198

Overview

This node allows users to ask a question within an existing chat session in the h2oGPT environment. It sends a query or instruction to a large language model (LLM) associated with the specified chat session and retrieves the response. If streaming is enabled, the server sends a stream of incremental delta messages, allowing real-time updates as the answer is generated.

Common scenarios for this node include:

  • Integrating conversational AI into workflows where ongoing chat sessions are maintained.
  • Querying knowledge bases or documents through a chat interface powered by LLMs.
  • Using streaming responses to display partial answers immediately for better user experience.

Practical example:

  • A user wants to ask "Who is the strongest hero?" in a specific chat session that has context from previous interactions. The node sends this message to the LLM and returns the answer, optionally streaming it if enabled.

Properties

Name Meaning
Session ID ID of the chat session where the question will be asked. This identifies the conversation context.
Message The query or instruction text sent to the LLM. For example, a question like "Who is the strongest hero?".
Additional Options A collection of optional parameters to customize the request:
- Image Batch Final Prompt A prompt applied to each image batch for vision-capable models.
- Image Batch Image Prompt A prompt to summarize all answers per image batch for vision models.
- Include Chat History Whether to include previous questions and answers from the current chat session in the context for the new query.
- Llm The name of the LLM to use for answering. Use "auto" for automatic model selection.
- Llm Args JSON map of arguments for the LLM, e.g., temperature to control randomness.
- Pre Prompt Query Text prepended before contextual document chunks to guide the LLM.
- Prompt Query Text appended at the beginning of the user's message to customize prompt behavior.
- Rag Config JSON map controlling retrieval-augmented generation (RAG) settings, such as rag_type.
- Self Reflection Config JSON map with self-reflection settings for the LLM, e.g., specifying reflection prompts or models.
- Stream Boolean flag to enable streaming of incremental response messages from the server.
- System Prompt Text sent as a system prompt to models supporting it, providing overall context on how to respond. Use 'auto' for default behavior.
- Tags List of tags used to pull context for RAG.

Output

The node outputs the full response from the LLM in the json field of the output data. This includes the answer generated by the model based on the input message and chat session context.

If streaming is enabled, the output represents a stream of delta messages incrementally updating the answer as it is generated by the server.

The node does not explicitly output binary data.

Dependencies

  • Requires connection to an h2oGPT API endpoint, configured via credentials including the base URL and an API key credential.
  • The node uses HTTP POST requests to the /chats/{session_id}/completions endpoint of the h2oGPT API.
  • Proper authentication credentials must be set up in n8n to access the h2oGPT service.

Troubleshooting

  • Invalid Session ID: If the provided session ID does not exist or is invalid, the API may return an error. Verify the session ID is correct and active.
  • Missing Required Parameters: Both session_id and message are required. Omitting these will cause errors.
  • Streaming Issues: When enabling streaming, ensure your environment supports handling streamed responses; otherwise, incomplete or failed responses may occur.
  • API Authentication Errors: Ensure the API key credential is valid and has permissions to access the chat session.
  • Timeouts: Large or complex queries might take longer; consider adjusting timeout settings if available or simplifying the query.

Links and References

Discussion