LoRAX

OpenAI Chat Completions v1 compatible endpoint

OpenAI Chat Completions v1 compatible endpoint

post/v1/chat/completions

Request body

modelstring
temperaturenumber float nullable
top_pnumber float nullable
ninteger nullable
max_tokensinteger
stopstring[]
streamboolean
adapter_sourcestring nullable
api_tokenstring nullable

Example request

{
  "model": "alignment-handbook/zephyr-7b-dpo-lora",
  "messages": [
    {
      "role": "user",
      "content": "What is deep learning?"
    }
  ],
  "temperature": 0.5,
  "top_p": 0.95,
  "n": 3,
  "stop": [
    "photographer"
  ]
}

Response

Generated Text

idstring
objectstring
createdinteger
modelstring

Changes

Changed in 6 of the 14 revisions of this API.2711

  • d56749eaa5c434See the full diff
    • the n request property's min was set to 0.00

      request-property-min-set

    • the temperature request property's min was set to 0.00

      request-property-min-set

    • the top_p request property's min was set to 0.00

      request-property-min-set

    • the max_tokens request property's exclusiveMinimum was decreased from 0.00 to true

      request-property-exclusive-min-decreased

    • the n request property's exclusiveMinimum was decreased from 0.00 to true

      request-property-exclusive-min-decreased

    • the temperature request property's exclusiveMinimum was decreased from 0.00 to false

      request-property-exclusive-min-decreased

    • the top_p request property's exclusiveMinimum was decreased from 0.00 to true

      request-property-exclusive-min-decreased

    • added the new optional request property adapter_source

      new-optional-request-property

    • added the new optional request property api_token

      new-optional-request-property

  • 1e6862900f8f21See the full diff
    • removed the optional property choices/items/message from the response with the 200 status

      response-optional-property-removed

    • removed the optional property usage from the response with the 200 status

      response-optional-property-removed

    • added the optional property choices/items/delta to the response with the 200 status

      response-optional-property-added

  • 365c16997999123See the full diff
    • the choices/items/message response's property type/format changed from string/ to object/ for status 200 (media type: application/json)

      response-property-type-changed

    • removed the optional property choices/items/logprobs from the response with the 200 status (media type: text/event-stream)

      response-optional-property-removed

    • removed the optional property choices/items/text from the response with the 200 status (media type: text/event-stream)

      response-optional-property-removed

    • added the optional property choices/items/message to the response with the 200 status (media type: text/event-stream)

      response-optional-property-added

    • added the optional property choices/items/message/content to the response with the 200 status (media type: application/json)

      response-optional-property-added

    • added the optional property choices/items/message/role to the response with the 200 status (media type: application/json)

      response-optional-property-added

    • endpoint added

      endpoint-added

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 14 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog