GPT-OSS icon

GPT-OSS

Interact with GPT-OSS compatible large language models

Overview

This node interacts with GPT-OSS compatible large language models to generate chat completions based on user input. It supports two prompt modes: a simple prompt mode where a user prompt and optional system instructions are provided, and a messages array mode where a full array of chat messages can be sent for more control. The node is useful for automating conversational AI tasks, generating text responses, or integrating GPT-OSS models into workflows.

Use Case Examples

  1. Generating a response to a user query with optional system instructions to guide the assistant's behavior.
  2. Sending a structured array of chat messages to simulate a conversation and receive a model-generated reply.

Properties

Name Meaning
Model Model identifier to use. If left empty, the default model configured in the credentials is used.
Prompt Mode Determines how the prompt is provided: either as a simple user prompt with optional system instructions or as a full array of chat messages in JSON format.
System Prompt Optional system instructions that steer the assistant's behavior. Only used in simple prompt mode.
User Prompt The user message to send to the model. Required in simple prompt mode.
Messages The full array of chat messages as JSON, used in messages array prompt mode.
Advanced Options Additional parameters to customize the chat completion request, including penalties, max tokens, temperature, stop sequences, seed, and response format.

Output

JSON

  • content - The assistant's generated message content extracted from the model response.
  • usage - Optional usage metadata including prompt and completion tokens, if enabled.

Dependencies

  • An API key credential for GPT-OSS API authentication

Troubleshooting

  • Ensure the prompt is not empty when using simple prompt mode; an empty prompt will cause an error.
  • When using messages array mode, the messages must be a valid JSON array with each entry containing a 'role' and 'content' field; otherwise, an error is thrown.
  • If the response format JSON is invalid, the node will throw an error; ensure valid JSON syntax.
  • If the model response does not contain extractable message content, an error will be raised.
  • Check that the API credentials are correctly configured to avoid authentication errors.

Discussion