Utility class for processing messages for the OpenAI language model.

Adopters can rebind this class to implement custom message processing behavior.

Constructors

Methods

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

    Adopters can rebind this processing to implement custom behavior.

    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 ChatCompletionMessageParam[]

    an array of messages formatted for the OpenAI API.