Skip to main content

ChatCompletionRequest

Represents a chat completion request.

    vendor stringrequired
    model stringrequired

    The ID of the model to use for the completion.

    messages

    object[]

    required

  • Array [

  • role stringrequired

    Role can be 'system', 'user', or 'assistant'.

    content stringrequired

    The content of the message.

  • ]

  • maxTokens integerrequired

    The maximum number of tokens to generate.

    temperature numberrequired

    The temperature to use for the completion.

    topP numberrequired

    The top_p value to use for the completion.