Skip to main content
Version: 0.12.x

Chat Completions API

POST 

/v1/chat/completions

Chat Completions API

Takes a OpenAI input payload, and then forwards the appropriate request on to the Takeoff server. Note: some OpenAI parameters are not supported, see supported parameters.

See more on the structure of openAI's API here See more on the structure of messages here.

Request​

Body

required

    frequency_penalty floatnullable
    function_call stringnullable
    functions string[]nullable

    logit_bias

    object

    nullable

    property name* float
    logprobs booleannullable
    max_tokens int64nullable

    messages

    object[]

    required

  • Array [

  • content stringrequired
    role stringrequired
  • ]

  • model stringnullable
    n int64nullable
    presence_penalty floatnullable
    response_format stringnullable
    seed int64nullable
    stop stringnullable
    stream boolean
    temperature floatnullable
    tool_choice stringnullable
    tools stringnullable
    top_logprobs int32nullable
    top_p floatnullable
    user stringnullable

Responses​

Takes in a JSON payload and returns the response all at once.

Schema

    choices

    object[]

    required

  • Array [

  • finish_reason stringrequired
    index int32required
    logprobs stringrequired

    text

    object

    required

    oneOf

    string

  • ]

  • created int64
    id string
    model stringrequired
    object string
    usage string
Loading...