Completions

Create completions based on provided messages or prompt and sources.

Completions endpoint is used in scenarios where you need to generate text based on a given context, either provided through a conversation history (messages) or a specific starting prompt. The sources parameter helps to contextualize the completion by specifying the indexes to use.

The response should look something like this:

Body Parameters:

Note: Either messages or prompt must be provided, along with sources.

Example Request Body

Using Messages:

{
  "messages": [{
      "role": "user",
      "content": "Tell me a joke."
  }],
  "sources": [
    "kjzl6kcym7w8y8lefkkbpl44q6jh1zu78gaq2zp18we4wdgz1tz9vxyx213ochh"
  ]
}

Last updated