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": {
"and": "<array>",
"id": "<string>"
},
"filter": {
"and": "<array>",
"id": "<string>"
},
"properties": {
"include": [
"<string>"
],
"exclude": [
"<string>"
]
},
"highlighting": [
"<string>"
],
"page": 123,
"perPage": 20,
"sort": {
"path": "<string>",
"direction": "DESC"
},
"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>"
}
]
}
]Generate a summary for the provided context.
This is similar to the Complete endpoint, but is designed for summarization tasks.
it does not require a conversation ID and does not store the conversation history.
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": {
"and": "<array>",
"id": "<string>"
},
"filter": {
"and": "<array>",
"id": "<string>"
},
"properties": {
"include": [
"<string>"
],
"exclude": [
"<string>"
]
},
"highlighting": [
"<string>"
],
"page": 123,
"perPage": 20,
"sort": {
"path": "<string>",
"direction": "DESC"
},
"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>"
}
]
}
]The summarization task to perform (e.g. "knowledge-answer").
Key/value inputs for that task, must conform to the JSON-Schema of the chosen task.
When provided, instructs the service how to fetch dynamic parameters from a vector store.
Show child attributes
The key of the data partition.
Which collection(s) to query for retrieving context.
1Parameters that control how the retriever searches (e.g. semantic query, include/exclude filters).
Show child attributes
A semantic query is a high-level representation of the user's intent. When specified, it will trigger our query understanding capabilities and generate a query and filter operator that will be applied to the search parameters.
Show child attributes
The text value of the semantic query.
Limits the semantic paths the LLM can consider. Accepts collection-scoped paths or federated paths depending on the endpoint.
Show child attributes
The properties to include in the search response. System properties are included by default.
The properties to exclude from the search response. System properties are not allowed to be excluded.
An operator that will be used to search the targeted collections. The matching operator will count as part of the ranking.
An operator that will be used to filter the targeted collections. The filtering operator excludes results that do not match the specified criteria.
Properties selector allows to specify which properties should be included or excluded in the search response. System properties are always included and cannot be excluded. Exclude properties has precedence over include properties.
Show child attributes
Show child attributes
LEXICAL The path of the property to aggregate.
The prefix is an optional query to filter the values to aggregate (e.g. 'mont' would match 'montreal', 'Montecarlo', etc.).
The maximum number of unique values to return in the aggregation.
The properties from the relationships or adjacent records that will be returned in the search response. The wildcard '*' can be used in itself or in combination with a prefix
* will return all traversed properties.@worksAt.* will return all traversed properties from the relationship 'worksAt'.@worksAt.@clinic.* will return all traversed properties from an adjacent 'clinic' connected with a 'worksAt' relationship.A param name (e.g. "hits") that will be used to store the results of the retriever. Only necessary if retriever is specified.
"hits"
Was this page helpful?