Skip to main content
POST
/
ai
/
v1
/
summarize
Generate a summary for the provided context
curl --request POST \
  --url https://{workspaceId}.clinia.cloud/ai/v1/summarize \
  --header 'Content-Type: application/json' \
  --header 'X-Clinia-API-Key: <api-key>' \
  --data '{
  "task": "<string>",
  "params": {},
  "retriever": {
    "partitionKey": "<string>",
    "collectionKeys": [
      "<string>"
    ],
    "searchParams": {
      "semanticQuery": {
        "value": "<string>",
        "paths": {
          "include": [
            "<string>"
          ],
          "exclude": [
            "<string>"
          ]
        }
      },
      "query": {
        "id": "<string>",
        "and": [
          "<any>"
        ]
      },
      "filter": {
        "id": "<string>",
        "and": [
          "<any>"
        ]
      },
      "properties": {
        "include": [
          "<string>"
        ],
        "exclude": [
          "<string>"
        ]
      },
      "highlighting": [
        "<string>"
      ],
      "page": 123,
      "perPage": 20,
      "sort": {
        "direction": "DESC",
        "path": "<string>"
      },
      "ranking": {
        "type": "DEFAULT"
      },
      "aggregations": [
        {
          "type": "LEXICAL",
          "path": "<string>",
          "prefix": "<string>",
          "size": 20
        }
      ],
      "traversedProperties": [
        "<string>"
      ]
    }
  },
  "targetParam": "hits"
}'
[
  {
    "role": "user",
    "id": "<string>",
    "parts": [
      {
        "type": "text",
        "text": "<string>"
      }
    ]
  }
]

Authorizations

X-Clinia-API-Key
string
header
required

Body

application/json
task
string
required

The summarization task to perform (e.g. "knowledge-answer").

params
object
required

Key/value inputs for that task, must conform to the JSON-Schema of the chosen task.

retriever
object

When provided, instructs the service how to fetch dynamic parameters from a vector store.

targetParam
string

A param name (e.g. "hits") that will be used to store the results of the retriever. Only necessary if retriever is specified.

Example:

"hits"

Response

A successful response.

The list of new messages added to the conversation. This will only include the assistant message.

  • Option 1
  • Option 2
role
enum<string>
required
Available options:
user,
assistant
id
string
parts
object[]
  • Option 1
  • Option 2
I