OpenAI Chat Completion Chipset

This module provides functionality for interacting with OpenAI's chat completion API. It defines request and response models, handles API interactions, and registers a chip for generating chat completions.

Features:

  • Configurable OpenAI API client settings.
  • Supports non-streaming chat completion requests.
  • Handles various API errors gracefully.

View source code here: GitHub

reasoning.openai.chat.chat_completion

Generates a chat completion using OpenAI's API.

This is a pure wrapper around the OpenAI API, which handles the request and returns the response in a structured format. If you need to know what the API response looks like, refer to the OpenAI API documentation.

OpenAI API Reference

Request Parameters

FieldTypeDescription
client_settingsConfiguration for the OpenAI API client.
create_paramsParameters for the chat completion request.

Response

FieldTypeDescription
statustyping.Literal['OK', 'CONNECTION_ERROR', 'RATE_LIMIT', 'API_ERROR', 'ERROR']Status of the request.
status_codetyping.Optional[int]The HTTP status code of the response.
completiontyping.Optional[openai.types.chat.chat_completion.ChatCompletion]The chat completion result (if successful).

© 2025 South Patron LLC. All rights reserved.

AI everywhere.