Theia API Documentation v1.66.0
    Preparing search index...

    Utility class for handling OpenAI Response API requests and tool calling cycles.

    This class encapsulates the complexity of the Response API's multi-turn conversation patterns for tool calling, keeping the main language model class clean and focused.

    Index

    Constructors

    Methods

    • Processes the provided list of messages by applying system message adjustments and converting them directly to the format expected by the OpenAI Response API.

      This method converts messages directly without going through ChatCompletionMessageParam types.

      Parameters

      • messages: LanguageModelMessage[]

        the list of messages to process.

      • developerMessageSettings: DeveloperMessageSettings

        how system and developer messages are handled during processing.

      • model: string

        the OpenAI model identifier. Currently not used, but allows subclasses to implement model-specific behavior.

      Returns { input: ResponseInputItem[]; instructions?: string }

      an object containing instructions and input formatted for the Response API.