OpenAI Analytics icon

OpenAI Analytics

Use OpenAI Analytics API

Overview

The "Run Thread" operation in the OpenAI Analytics node allows you to execute a conversation thread with a selected AI assistant. This operation sends the thread to the assistant for processing and optionally waits for the run to complete before returning the results. It is useful for automating interactions with AI assistants, such as running predefined conversational workflows or processing messages through an AI model.

Practical examples include:

  • Running a customer support conversation thread to get AI-generated responses.
  • Executing a multi-turn dialogue with an assistant configured for specific tasks.
  • Automating content generation or analysis by running threads that encapsulate complex instructions.

Properties

Name Meaning
Authentication Choose which API credentials to use: either dedicated OpenAI Analytics API credentials or existing OpenAI API credentials.
Thread ID The unique identifier of the thread to run. Required to specify which thread to execute.
Select Assistant Method to select the assistant for the run: either select from a list of available assistants or enter the assistant's ID manually.
Assistant / Assistant ID Depending on selection method, either choose an assistant from a loaded list or provide the assistant's ID directly.
Wait for Completion Boolean flag indicating whether to wait for the thread run to finish before returning the result. If false, the node returns immediately after starting the run.
Maximum Poll Time (Seconds) When waiting for completion, this sets the maximum time in seconds to wait for the run to complete before timing out.
Instructions Optional override for the default system instructions of the assistant for this particular run.
Simplify Output Whether to return a simplified response format instead of the full detailed output.

Output

The node outputs JSON data representing the result of running the thread with the selected assistant. The structure typically includes details about the run status, assistant responses, and any metadata related to the execution.

If "Wait for Completion" is enabled, the output contains the final run results; otherwise, it may contain initial run identifiers or status information.

The node does not output binary data for this operation.

Dependencies

  • Requires valid API authentication credentials for either the OpenAI Analytics API or the standard OpenAI API.
  • The node internally uses the OpenAI client library to communicate with the OpenAI services.
  • Proper configuration of API keys and optional organization IDs is necessary.
  • Network access to OpenAI endpoints is required.

Troubleshooting

  • Invalid Thread ID: If the provided thread ID does not exist or is malformed, the node will throw an error. Verify the thread ID is correct.
  • Assistant Not Found: Selecting an assistant by ID or from the list requires that the assistant exists and is accessible with the provided credentials.
  • Timeout Waiting for Completion: If the run takes longer than the specified maximum poll time, the node may timeout. Increase the "Maximum Poll Time" if needed.
  • Authentication Errors: Ensure that the API key credentials are valid and have the necessary permissions.
  • Network Issues: Connectivity problems to the OpenAI API endpoints can cause failures; check network settings and firewall rules.

Links and References

Discussion