OpenAI ChatGPT

Provides integration with OpenAI’s ChatGPT models to enable conversational AI capabilities within Flowgear.

Revision History

1.0.0.0 Initial Release

Properties

Connection

Type: Connection Input
The OpenAI connection profile, including API key and model configuration.

ApiKey
Type: Password
Your OpenAI API key. This is required for authentication and should be kept confidential.

Model
Type: String
The OpenAI model to use for chat completions, such as gpt-3.5-turbo, gpt-4, or gpt-4-turbo.

Temperature
Type: Number
Controls randomness in output. Values range from 0 (deterministic) to 1 (more random). Default is 0.

FrequencyPenalty
Type: Number
Penalizes new tokens based on their frequency in the text to reduce repetition. Range 0–1, default 0.

PresencePenalty
Type: Number
Penalizes new tokens based on whether they appear in the text at all to encourage new topics. Range 0–1, default 0.

SystemMessage

Type: Multiline Text Input
Optional high-level instructions to guide the AI’s behavior throughout the conversation. For example, set the assistant’s role or style.

PreviousMessages

Type: JSON Input
JSON array representing prior messages in the conversation, used to maintain context. Each message includes a role (system, user, or assistant) and content.

UserMessage

Type: Multiline Text Input
The user’s current message to send to the AI, appended after any previous messages.

ToolCallID

Type: String Input
The unique identifier of a tool call made by the assistant. Used when sending results of a tool invocation back to the AI.

ToolMessage

Type: Multiline Text Input
The message content describing the result or response of a tool invocation.

Tools

Type: JSON Input
JSON array describing available tools/functions the assistant can invoke. Supports OpenAI function calling capabilities.

ResponseMessageObject

Type: JSON Output
The raw JSON message object returned by the OpenAI API. Useful for debugging or detailed inspection.

ResponseMessage

Type: Multiline Text Output
The plain text content of the assistant’s response message.

ResponseToolCall

Type: JSON Output
The JSON describing any tool call invoked by the assistant, which can be used to trigger further function executions.

Setting up the OpenAI ChatGPT Node

  1. Obtain your OpenAI API key from the OpenAI platform. Keep this key secure.

  2. Create a connection profile in Flowgear with your API key and select the desired model (gpt-3.5-turbo, gpt-4, etc.).

  3. Optionally, provide a SystemMessage to guide the AI’s overall behavior.

  4. Pass any prior conversation messages as JSON in PreviousMessages to maintain chat context.

  5. Supply the current user prompt in UserMessage.

  6. Optionally define Tools and use ToolCallID and ToolMessage to handle function calls with the assistant.

  7. The node will return the assistant’s response in ResponseMessage, plus the full JSON in ResponseMessageObject and any tool call data in ResponseToolCall.