Skip to main content
Version: 0.21.x

Chat/Completions

POST 

/v1/chat/completions

Chat/Completions

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

    object

    required

    oneOf

    string

    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

    Input Text used for ease of users not to have to use the clunky PayloadText. Mapping provided below to convert InputText to PayloadText.

    oneOf

    string

  • ]

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