• Function that converts an array of messages into a single string prompt that can be used as input for a chat model. It delegates the conversion logic to the appropriate provider-specific function.

    Parameters

    • messages: BaseMessage[]

      Array of messages to be converted.

    • provider: string

    Returns string

    A string prompt that can be used as input for a chat model.