Permissions do not allow updating the user.
diff --git a/www/static/vectara-oas-v2.yaml b/www/static/vectara-oas-v2.yaml
index a142ebe5..b42c3101 100644
--- a/www/static/vectara-oas-v2.yaml
+++ b/www/static/vectara-oas-v2.yaml
@@ -1,30 +1,21 @@
openapi: 3.0.0
info:
title: Vectara REST API v2
- description: |
- Vectara provides an end-to-end platform for creating GenAI products using
- a simple to use API.
-
- You can [sign up for an account](https://console.vectara.com/signup) and
- then view several [API Recipes](https://docs.vectara.com/docs/api-recipes) with example queries
- and parameter values.
-
- The Vectara API Playground lets you experiment with REST endpoints from
- your browser. Select an endpoint to view its definition, including the
- required or optional headers, body, responses, and sample commands. On the
- right side of each endpoint page, like [Get Corpus](/docs/rest-api/get-corpus), you manually
- enter your API Key or OAuth Bearer Token, `customer_id`, and then any
- required body parameters like the `corpusID` before sending the API
- request.
-
- :::note
-
- Vectara supports two primary methods of authentication: API keys and OAuth
- 2.0, which are applicable to all endpoints. Query API Keys are used for
- read-only querying operations, while Index API Keys provide read and write
- access. The OAuth 2.0 operations authenticate with a Bearer Token via the
- OAuth 2.0 client credentials grant. Review the [**OAuth 2.0 section**](https://docs.vectara.com/docs/learn/authentication/oauth-2) about
- how to generate the token.
+ description: "Vectara provides an end-to-end platform for creating GenAI products\
+ \ using \na simple to use API.\n\nYou can [sign up for an account](https://console.vectara.com/signup)\
+ \ and \nthen view several [API Recipes](https://docs.vectara.com/docs/api-recipes)\
+ \ with example queries \nand parameter values.\n\nThe Vectara API Playground lets\
+ \ you experiment with REST endpoints from \nyour browser. Select an endpoint to\
+ \ view its definition, including the \nrequired or optional headers, body, responses,\
+ \ and sample commands. On the \nright side of each endpoint page, like [Get Corpus](/docs/rest-api/get-corpus),\
+ \ you manually \nenter your API Key or OAuth Bearer Token, `customer_id`, and\
+ \ then any \nrequired body parameters like the `corpusID` before sending the API\
+ \ \nrequest.\n\n:::note\n\nVectara supports two primary methods of authentication:\
+ \ API keys and OAuth \n2.0, which are applicable to all endpoints. Query API Keys\
+ \ are used for \nread-only querying operations, while Index API Keys provide read\
+ \ and write \naccess. The OAuth 2.0 operations authenticate with a Bearer Token\
+ \ via the \nOAuth 2.0 client credentials grant. Review the [**OAuth 2.0 section**](https://docs.vectara.com/docs/learn/authentication/oauth-2)\
+ \ about \nhow to generate the token.\n"
version: 2.0.0
termsOfService: https://vectara.com/legal/terms-of-service/
x-logo:
@@ -36,1990 +27,2132 @@ info:
contact:
email: feedback@vectara.com
tags:
- - name: Queries
- description: Perform search and Retrieval Augmented Generation (RAG) operations on one or more corpora
- - name: Upload
- description: Upload files to a corpus for automatic parsing, text extraction, chunking, and indexing
- - name: Index
- description: Index and manage both core and structured documents to enable efficient search and retrieval
- - name: Corpora
- description: Create, manage, and update corpora and their associated settings
- - name: Documents
- description: Retrieve and manage documents stored in a corpus for administrative tasks
- - name: Chats
- description: Create, manage, and interact with chat sessions for conversational AI
- - name: Large Language Models
- description: List LLMs for text summarization, chat, and other generation tasks
- - name: Encoders
- description: List available encoders (such as Boomerang) that turn text into vectors
- - name: Rerankers
- description: List rerankers for reranking search results
- - name: Jobs
- description: Monitor background jobs such as rebuilding indexes or updating corpus settings
- - name: Users
- description: Create, manage, and authenticate users within the platform for user administration
- - name: Application Clients
- description: Manage app clients, and perform authentication operations for admin-level access control
- - name: API Keys
- description: Manage API keys for the account
+- name: Queries
+ description: Perform search and Retrieval Augmented Generation (RAG) operations
+ on one or more corpora
+- name: Upload
+ description: Upload files to a corpus for automatic parsing, text extraction, chunking,
+ and indexing
+- name: Index
+ description: Index and manage both core and structured documents to enable efficient
+ search and retrieval
+- name: Corpora
+ description: Create, manage, and update corpora and their associated settings
+- name: Documents
+ description: Retrieve and manage documents stored in a corpus for administrative
+ tasks
+- name: Chats
+ description: Create, manage, and interact with chat sessions for conversational
+ AI
+- name: Large Language Models
+ description: List LLMs for text summarization, chat, and other generation tasks
+- name: Encoders
+ description: List available encoders (such as Boomerang) that turn text into vectors
+- name: Rerankers
+ description: List rerankers for reranking search results
+- name: Jobs
+ description: Monitor background jobs such as rebuilding indexes or updating corpus
+ settings
+- name: Users
+ description: Create, manage, and authenticate users within the platform for user
+ administration
+- name: Application Clients
+ description: Manage app clients, and perform authentication operations for admin-level
+ access control
+- name: API Keys
+ description: Manage API keys for the account
servers:
- - url: https://api.vectara.io
+- url: https://api.vectara.io
paths:
/v2/corpora:
post:
summary: Create a corpus
- description: |
- Create a corpus, which is a container to store documents and associated metadata. Here, you
- define the unique `corpus_key` that identifies the corpus. The `corpus_key` can be custom-defined
- following your preferred naming convention, allowing you to easily manage the corpus's data and
- reference it in queries. For more information, see
- [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).
+ description: "Create a corpus, which is a container to store documents and associated\
+ \ metadata. Here, you \ndefine the unique `corpus_key` that identifies the\
+ \ corpus. The `corpus_key` can be custom-defined \nfollowing your preferred\
+ \ naming convention, allowing you to easily manage the corpus's data and \n\
+ reference it in queries. For more information, see \n[Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).\n"
operationId: createCorpus
tags:
- - Corpora
+ - Corpora
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/CreateCorpusRequest"
+ $ref: '#/components/schemas/CreateCorpusRequest'
responses:
- "201":
+ '201':
description: The corpus has been created.
content:
application/json:
schema:
- $ref: "#/components/schemas/Corpus"
- "400":
+ $ref: '#/components/schemas/Corpus'
+ '400':
description: Invalid request body in the create corpus request.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
description: Permissions do not allow creating a corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
get:
summary: List corpora
- description: |
- List corpora in the account. The returned corpus objects contain less
+ description: 'List corpora in the account. The returned corpus objects contain
+ less
+
detail compared to those retrieved the direct corpus retrieval operation.
+
+ '
operationId: listCorpora
tags:
- - Corpora
+ - Corpora
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: limit
- in: query
- description: The maximum number of corpora to return at one time.
- required: false
- schema:
- type: integer
- format: int32
- minimum: 1
- maximum: 100
- default: 10
- - name: filter
- in: query
- description: A regular expression to filter the corpora by their name or summary.
- required: false
- schema:
- type: string
- - name: page_key
- in: query
- description: Used to retrieve the next page of corpora after the limit has been reached.
- required: false
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: limit
+ in: query
+ description: The maximum number of corpora to return at one time.
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 100
+ default: 10
+ - name: filter
+ in: query
+ description: A regular expression to filter the corpora by their name or summary.
+ required: false
+ schema:
+ type: string
+ - name: page_key
+ in: query
+ description: Used to retrieve the next page of corpora after the limit has
+ been reached.
+ required: false
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: List of corpora.
content:
application/json:
schema:
- $ref: "#/components/schemas/ListCorporaResponse"
- "403":
+ $ref: '#/components/schemas/ListCorporaResponse'
+ '403':
description: Permissions do not allow listing corpora.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "/v2/corpora/{corpus_key}":
+ $ref: '#/components/schemas/Error'
+ /v2/corpora/{corpus_key}:
get:
tags:
- - Corpora
+ - Corpora
summary: Retrieve metadata about a corpus
- description: |
- Get metadata about a corpus. This operation does not search the corpus contents.
- Specify the `corpus_key` to identify the corpus whose metadata you want to
- retrieve. The `corpus_key` is created when the corpus is set up, either through
- the Vectara Console UI or the Create Corpus API. For more information,
- see [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).
+ description: "Get metadata about a corpus. This operation does not search the\
+ \ corpus contents. \nSpecify the `corpus_key` to identify the corpus whose\
+ \ metadata you want to \nretrieve. The `corpus_key` is created when the corpus\
+ \ is set up, either through\nthe Vectara Console UI or the Create Corpus API.\
+ \ For more information, \nsee [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).\n"
operationId: getCorpus
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: corpus_key
- description: The unique key identifying the corpus to retrieve.
- required: true
- schema:
- $ref: "#/components/schemas/CorpusKey"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: corpus_key
+ description: The unique key identifying the corpus to retrieve.
+ required: true
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
responses:
- "200":
+ '200':
description: A corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Corpus"
- "403":
+ $ref: '#/components/schemas/Corpus'
+ '403':
description: Permissions do not allow retrieving the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
delete:
tags:
- - Corpora
+ - Corpora
summary: Delete a corpus and all its data
- description: |
- Permanently delete a corpus and all its associated data. The `corpus_key` uniquely identifies
- the corpus. For more information, see [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).
+ description: "Permanently delete a corpus and all its associated data. The `corpus_key`\
+ \ uniquely identifies \nthe corpus. For more information, see [Corpus Key\
+ \ Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).\n"
operationId: deleteCorpus
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: corpus_key
- description: The unique key identifying the corpus to delete.
- required: true
- schema:
- $ref: "#/components/schemas/CorpusKey"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: corpus_key
+ description: The unique key identifying the corpus to delete.
+ required: true
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
responses:
- "204":
+ '204':
description: Successfully deleted a corpus.
- "403":
+ '403':
description: Permissions do not allow deleting the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
patch:
tags:
- - Corpora
+ - Corpora
summary: Update a corpus
- description: |
- Enable, disable, or update the name and description of a corpus. This lets you
- manage data availability without deleting the corpus, which is useful for
- maintenance and security purposes. The `corpus_key` uniquely identifies the corpus.
- For more information, see [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).
- Consider updating the name and description of a corpus dynamically to help keep your data
- aligned with changing business needs.
+ description: "Enable, disable, or update the name and description of a corpus.\
+ \ This lets you\nmanage data availability without deleting the corpus, which\
+ \ is useful for \nmaintenance and security purposes. The `corpus_key` uniquely\
+ \ identifies the corpus. \nFor more information, see [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).\
+ \ \nConsider updating the name and description of a corpus dynamically to\
+ \ help keep your data \naligned with changing business needs.\n"
operationId: updateCorpus
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: corpus_key
- description: The unique key identifying the corpus to update.
- required: true
- schema:
- $ref: "#/components/schemas/CorpusKey"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: corpus_key
+ description: The unique key identifying the corpus to update.
+ required: true
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/UpdateCorpusRequest"
+ $ref: '#/components/schemas/UpdateCorpusRequest'
responses:
- "200":
+ '200':
description: Successfully modified the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Corpus"
- "403":
+ $ref: '#/components/schemas/Corpus'
+ '403':
description: Permissions do not allow updating the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
- "/v2/corpora/{corpus_key}/reset":
+ $ref: '#/components/schemas/NotFoundError'
+ /v2/corpora/{corpus_key}/reset:
post:
tags:
- - Corpora
+ - Corpora
summary: Remove all documents and data in a corpus
- description: |
- Resets a corpus, which removes all documents and data from the specified corpus,
- while keeping the corpus itself. The `corpus_key` uniquely identifies the corpus.
- For more information, see [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).
+ description: "Resets a corpus, which removes all documents and data from the\
+ \ specified corpus, \nwhile keeping the corpus itself. The `corpus_key` uniquely\
+ \ identifies the corpus. \nFor more information, see [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).\n"
operationId: resetCorpus
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: corpus_key
- description: The unique key identifying the corpus to reset.
- required: true
- schema:
- $ref: "#/components/schemas/CorpusKey"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: corpus_key
+ description: The unique key identifying the corpus to reset.
+ required: true
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
responses:
- "204":
+ '204':
description: Successfully reset a corpus.
- "403":
+ '403':
description: Permissions do not allow resetting the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
- "/v2/corpora/{corpus_key}/replace_filter_attributes":
+ $ref: '#/components/schemas/NotFoundError'
+ /v2/corpora/{corpus_key}/replace_filter_attributes:
post:
tags:
- - Corpora
+ - Corpora
summary: Replace the filter attributes of a corpus
- description: |
- Replace the filter attributes of a corpus. This does not happen immediately, as
- this operation creates a job that completes asynchronously. These new filter
- attributes will not work until the job completes.
-
- You can monitor the status of the filter change using the returned job ID. The
- `corpus_key` uniquely identifies the corpus. For more information, see
- [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).
+ description: "Replace the filter attributes of a corpus. This does not happen\
+ \ immediately, as\nthis operation creates a job that completes asynchronously.\
+ \ These new filter \nattributes will not work until the job completes.\n\n\
+ You can monitor the status of the filter change using the returned job ID.\
+ \ The \n`corpus_key` uniquely identifies the corpus. For more information,\
+ \ see \n[Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).\n"
operationId: replaceFilterAttributes
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: corpus_key
- description: The unique key identifying the corpus having its filters replaced.
- required: true
- schema:
- $ref: "#/components/schemas/CorpusKey"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: corpus_key
+ description: The unique key identifying the corpus having its filters replaced.
+ required: true
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/ReplaceFilterAttributesRequest"
+ $ref: '#/components/schemas/ReplaceFilterAttributesRequest'
responses:
- "200":
+ '200':
description: Successfully created a job that will replace the filter attributes.
content:
application/json:
schema:
- $ref: "#/components/schemas/ReplaceFilterAttributesResponse"
- "403":
+ $ref: '#/components/schemas/ReplaceFilterAttributesResponse'
+ '403':
description: Permissions do not allow replacing filter attributes.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
- "/v2/corpora/{corpus_key}/query":
+ $ref: '#/components/schemas/NotFoundError'
+ /v2/corpora/{corpus_key}/query:
get:
tags:
- - Queries
+ - Queries
summary: Simple Single Corpus Query
- description: |
- Search a single corpus with a straightforward query request, specifying the corpus key and query parameters.
- * Specify the unique `corpus_key` identifying the corpus to query. The `corpus_key` is
- [created in the Vectara Console UI](https://docs.vectara.com/docs/console-ui/creating-a-corpus) or the [Create Corpus API definition](https://docs.vectara.com/docs/api-reference/admin-apis/create-corpus). When creating a new corpus, you have the option to assign a custom `corpus_key` following your preferred naming convention. This key serves as a unique identifier for the corpus, allowing it to be referenced in search requests. For more information, see [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).
- * Enter the search `query` string for the corpus, which is the question you want to ask.
- * Set the maximum number of results (`limit`) to return. **Default**: 10, **minimum**: 1
- * Define the `offset` position from which to start in the result set.
-
- For more detailed information, see this [Query API guide](https://docs.vectara.com/docs/api-reference/search-apis/search).
+ description: "Search a single corpus with a straightforward query request, specifying\
+ \ the corpus key and query parameters.\n* Specify the unique `corpus_key`\
+ \ identifying the corpus to query. The `corpus_key` is \n[created in the Vectara\
+ \ Console UI](https://docs.vectara.com/docs/console-ui/creating-a-corpus)\
+ \ or the [Create Corpus API definition](https://docs.vectara.com/docs/api-reference/admin-apis/create-corpus).\
+ \ When creating a new corpus, you have the option to assign a custom `corpus_key`\
+ \ following your preferred naming convention. This key serves as a unique\
+ \ identifier for the corpus, allowing it to be referenced in search requests.\
+ \ For more information, see [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).\n\
+ * Enter the search `query` string for the corpus, which is the question you\
+ \ want to ask.\n* Set the maximum number of results (`limit`) to return. **Default**:\
+ \ 10, **minimum**: 1\n* Define the `offset` position from which to start in\
+ \ the result set.\n\nFor more detailed information, see this [Query API guide](https://docs.vectara.com/docs/api-reference/search-apis/search).\n"
operationId: searchCorpus
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: corpus_key
- description: The unique key identifying the corpus to query.
- required: true
- schema:
- $ref: "#/components/schemas/CorpusKey"
- - in: query
- name: query
- description: The search query string for the corpus, which is the question the user is asking.
- required: true
- schema:
- type: string
- - in: query
- name: limit
- description: The maximum number of results to return.
- required: false
- schema:
- type: integer
- default: 10
- minimum: 1
- - in: query
- name: offset
- description: The position from which to start in the result set.
- required: false
- schema:
- type: integer
- default: 0
- minimum: 0
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: corpus_key
+ description: The unique key identifying the corpus to query.
+ required: true
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
+ - in: query
+ name: query
+ description: The search query string for the corpus, which is the question
+ the user is asking.
+ required: true
+ schema:
+ type: string
+ - in: query
+ name: limit
+ description: The maximum number of results to return.
+ required: false
+ schema:
+ type: integer
+ default: 10
+ minimum: 1
+ - in: query
+ name: offset
+ description: The position from which to start in the result set.
+ required: false
+ schema:
+ type: integer
+ default: 0
+ minimum: 0
responses:
- "200":
+ '200':
description: A response to a query.
content:
application/json:
schema:
- $ref: "#/components/schemas/QueryFullResponse"
- "400":
+ $ref: '#/components/schemas/QueryFullResponse'
+ '400':
description: Query request was malformed.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
description: Permissions do not allow querying the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
post:
tags:
- - Queries
+ - Queries
summary: Advanced Single Corpus Query
- description: |
- Perform an advanced query on a specific corpus to find relevant results, highlight relevant snippets, and use Retrieval Augmented Generation:
+ description: 'Perform an advanced query on a specific corpus to find relevant
+ results, highlight relevant snippets, and use Retrieval Augmented Generation:
+
+
+ * Specify the unique `corpus_key` identifying the corpus to query. The `corpus_key`
+ is [created in the Vectara Console UI](https://docs.vectara.com/docs/console-ui/creating-a-corpus)
+ or the [Create Corpus API definition](https://docs.vectara.com/docs/api-reference/admin-apis/create-corpus).
+ When creating a new corpus, you have the option to assign a custom `corpus_key`
+ following your preferred naming convention. This key serves as a unique identifier
+ for the corpus, allowing it to be referenced in search requests. For more
+ information, see [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).
+
+ * Customize your search by specifying the query text (`query`), pagination
+ details (`offset` and `limit`), and metadata filters (`metadata_filter`) to
+ tailor your search results. [Learn more](https://docs.vectara.com/docs/api-reference/search-apis/search#query-definition)
+
+ * Leverage advanced search capabilities like reranking (`reranker`) and Retrieval
+ Augmented Generation (RAG) (`generation`) for enhanced query performance.
+ Generation is opt in by setting the `generation` property. By excluding the
+ property or by setting it to null, the response
- * Specify the unique `corpus_key` identifying the corpus to query. The `corpus_key` is [created in the Vectara Console UI](https://docs.vectara.com/docs/console-ui/creating-a-corpus) or the [Create Corpus API definition](https://docs.vectara.com/docs/api-reference/admin-apis/create-corpus). When creating a new corpus, you have the option to assign a custom `corpus_key` following your preferred naming convention. This key serves as a unique identifier for the corpus, allowing it to be referenced in search requests. For more information, see [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).
- * Customize your search by specifying the query text (`query`), pagination details (`offset` and `limit`), and metadata filters (`metadata_filter`) to tailor your search results. [Learn more](https://docs.vectara.com/docs/api-reference/search-apis/search#query-definition)
- * Leverage advanced search capabilities like reranking (`reranker`) and Retrieval Augmented Generation (RAG) (`generation`) for enhanced query performance. Generation is opt in by setting the `generation` property. By excluding the property or by setting it to null, the response
will not include generation. [Learn more](https://docs.vectara.com/docs/learn/grounded-generation/configure-query-summarization).
- * Use hybrid search to achieve optimal results by setting different values for `lexical_interpolation` (e.g., `0.025`). [Learn more](https://docs.vectara.com/docs/learn/hybrid-search)
- * Specify Vectara's RAG-focused LLM (Mockingbird) for the `generation_preset_name`. [Learn more](https://docs.vectara.com/docs/learn/mockingbird-llm)
- * Use advanced summarization options that utilize detailed summarization parameters such as `max_response_characters`, `temperature`, and `frequency_penalty` for generating precise and relevant summaries. [Learn more](https://docs.vectara.com/docs/api-reference/search-apis/search#advanced-summarization-options)
+
+ * Use hybrid search to achieve optimal results by setting different values
+ for `lexical_interpolation` (e.g., `0.025`). [Learn more](https://docs.vectara.com/docs/learn/hybrid-search)
+
+ * Specify Vectara''s RAG-focused LLM (Mockingbird) for the `generation_preset_name`.
+ [Learn more](https://docs.vectara.com/docs/learn/mockingbird-llm)
+
+ * Use advanced summarization options that utilize detailed summarization parameters
+ such as `max_response_characters`, `temperature`, and `frequency_penalty`
+ for generating precise and relevant summaries. [Learn more](https://docs.vectara.com/docs/api-reference/search-apis/search#advanced-summarization-options)
+
For more detailed information, see [Query API guide](https://docs.vectara.com/docs/api-reference/search-apis/search).
+
+ '
operationId: queryCorpus
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: corpus_key
- description: The unique key identifying the corpus to query.
- required: true
- schema:
- $ref: "#/components/schemas/CorpusKey"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: corpus_key
+ description: The unique key identifying the corpus to query.
+ required: true
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/QueryCorpusRequest"
+ $ref: '#/components/schemas/QueryCorpusRequest'
x-stream-based-on-body: streamResponse()
responses:
- "200":
+ '200':
description: A response to a query.
content:
application/json:
schema:
- $ref: "#/components/schemas/QueryFullResponse"
+ $ref: '#/components/schemas/QueryFullResponse'
text/event-stream:
schema:
- $ref: "#/components/schemas/QueryStreamedResponse"
- "400":
+ $ref: '#/components/schemas/QueryStreamedResponse'
+ '400':
description: Query request was malformed.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
description: Permissions do not allow querying the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
/v2/query:
post:
tags:
- - Queries
+ - Queries
summary: Multiple Corpora Query
- description: |
- Perform a multipurpose query across to retrieve relevant information from one or more corpora and generate a response using Retrieval Augmented Generation (RAG).
+ description: 'Perform a multipurpose query across to retrieve relevant information
+ from one or more corpora and generate a response using Retrieval Augmented
+ Generation (RAG).
+
+
+ * Specify the unique `corpus_key` identifying the corpus to query. The `corpus_key`
+ is [created in the Vectara Console UI](https://docs.vectara.com/docs/console-ui/creating-a-corpus)
+ or the [Create Corpus API definition](https://docs.vectara.com/docs/api-reference/admin-apis/create-corpus).
+ When creating a new corpus, you have the option to assign a custom `corpus_key`
+ following your preferred naming convention. This key serves as a unique identifier
+ for the corpus, allowing it to be referenced in search requests. For more
+ information, see [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).
+
+ * Customize your search by specifying the query text (`query`), pagination
+ details (`offset` and `limit`), and metadata filters (`metadata_filter`) to
+ tailor your search results. [Learn more](https://docs.vectara.com/docs/api-reference/search-apis/search#query-definition)
+
+ * Leverage advanced search capabilities like reranking (`reranker`) and opt-in
+ Retrieval Augmented Generation (RAG) (`generation`) for enhanced query performance.
+ Generation is opt in by setting the `generation` property. By excluding the
+ property or by setting it to null, the response
- * Specify the unique `corpus_key` identifying the corpus to query. The `corpus_key` is [created in the Vectara Console UI](https://docs.vectara.com/docs/console-ui/creating-a-corpus) or the [Create Corpus API definition](https://docs.vectara.com/docs/api-reference/admin-apis/create-corpus). When creating a new corpus, you have the option to assign a custom `corpus_key` following your preferred naming convention. This key serves as a unique identifier for the corpus, allowing it to be referenced in search requests. For more information, see [Corpus Key Definition](https://docs.vectara.com/docs/api-reference/search-apis/search#corpus-key-definition).
- * Customize your search by specifying the query text (`query`), pagination details (`offset` and `limit`), and metadata filters (`metadata_filter`) to tailor your search results. [Learn more](https://docs.vectara.com/docs/api-reference/search-apis/search#query-definition)
- * Leverage advanced search capabilities like reranking (`reranker`) and opt-in Retrieval Augmented Generation (RAG) (`generation`) for enhanced query performance. Generation is opt in by setting the `generation` property. By excluding the property or by setting it to null, the response
will not include generation. [Learn more](https://docs.vectara.com/docs/learn/grounded-generation/configure-query-summarization)
- * Specify Vectara's RAG-focused LLM (Mockingbird) for the `generation_preset_name`. [Learn more](https://docs.vectara.com/docs/learn/mockingbird-llm)
- * Use advanced summarization options that utilize detailed summarization parameters such as `max_response_characters`, `temperature`, and `frequency_penalty` for generating precise and relevant summaries. [Learn more](https://docs.vectara.com/docs/api-reference/search-apis/search#advanced-summarization-customization-options)
- * Customize citation formats in summaries using the `citations` object to include numeric, HTML, or Markdown links. [Learn more](https://docs.vectara.com/docs/api-reference/search-apis/search#citation-format-in-summary)
+
+ * Specify Vectara''s RAG-focused LLM (Mockingbird) for the `generation_preset_name`.
+ [Learn more](https://docs.vectara.com/docs/learn/mockingbird-llm)
+
+ * Use advanced summarization options that utilize detailed summarization parameters
+ such as `max_response_characters`, `temperature`, and `frequency_penalty`
+ for generating precise and relevant summaries. [Learn more](https://docs.vectara.com/docs/api-reference/search-apis/search#advanced-summarization-customization-options)
+
+ * Customize citation formats in summaries using the `citations` object to
+ include numeric, HTML, or Markdown links. [Learn more](https://docs.vectara.com/docs/api-reference/search-apis/search#citation-format-in-summary)
+
For more detailed information, see this [Query API guide](https://docs.vectara.com/docs/api-reference/search-apis/search).
+
+ '
operationId: query
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/QueryRequest"
+ $ref: '#/components/schemas/QueryRequest'
x-stream-based-on-body: streamResponse()
responses:
- "200":
+ '200':
description: A response to a query.
content:
application/json:
schema:
- $ref: "#/components/schemas/QueryFullResponse"
+ $ref: '#/components/schemas/QueryFullResponse'
text/event-stream:
schema:
- $ref: "#/components/schemas/QueryStreamedResponse"
- "400":
+ $ref: '#/components/schemas/QueryStreamedResponse'
+ '400':
description: Query request was malformed.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
- description: Permissions do not allow querying one or more corpora in the request.
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
+ description: Permissions do not allow querying one or more corpora in the
+ request.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: One or more of the corpora were not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
- "/v2/corpora/{corpus_key}/upload_file":
+ $ref: '#/components/schemas/NotFoundError'
+ /v2/corpora/{corpus_key}/upload_file:
post:
tags:
- - Upload
+ - Upload
summary: Upload a file to the corpus
- description: |
- Upload files such as PDFs and Word Documents for automatic text extraction and metadata parsing.
- The request expects a `multipart/form-data` format containing the following parts:
- * `metadata` - (Optional) Specifies a JSON object representing any additional metadata to be associated with the extracted document. For example, `'metadata={"key": "value"};type=application/json'`
- * `chunking_strategy` - (Optional) Specifies the chunking strategy for the platform to use. If you do not set this option, the platform uses the default strategy, which creates one chunk per sentence. For example, `'chunking_strategy={"type":"max_chars_chunking_strategy","max_chars_per_chunk":200};type=application/json'`
+ description: 'Upload files such as PDFs and Word Documents for automatic text
+ extraction and metadata parsing.
+
+ The request expects a `multipart/form-data` format containing the following
+ parts:
+
+ * `metadata` - (Optional) Specifies a JSON object representing any additional
+ metadata to be associated with the extracted document. For example, `''metadata={"key":
+ "value"};type=application/json''`
+
+ * `chunking_strategy` - (Optional) Specifies the chunking strategy for the
+ platform to use. If you do not set this option, the platform uses the default
+ strategy, which creates one chunk per sentence. For example, `''chunking_strategy={"type":"max_chars_chunking_strategy","max_chars_per_chunk":200};type=application/json''`
+
* `file` - Specifies the file that you want to upload.
- * `filename` - Specified as part of the file field with the file name that you want to associate with the uploaded file. For a curl example, use the following syntax: `'file=@/path/to/file/file.pdf;filename=desired_filename.pdf'`
+
+ * `filename` - Specified as part of the file field with the file name that
+ you want to associate with the uploaded file. For a curl example, use the
+ following syntax: `''file=@/path/to/file/file.pdf;filename=desired_filename.pdf''`
+
For more detailed information, see this [File Upload API guide.](https://docs.vectara.com/docs/api-reference/indexing-apis/file-upload/file-upload)
+
+ '
operationId: uploadFile
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: corpus_key
- description: The unique key identifying the corpus of which to upload the file.
- required: true
- schema:
- $ref: "#/components/schemas/CorpusKey"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: corpus_key
+ description: The unique key identifying the corpus of which to upload the
+ file.
+ required: true
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
requestBody:
- description: |
- Upload a file for the Vectara platform to attempt to parse and turn into a document within the corpus.
- The first part of the multipart request can contain any document metadata to attach to the parsed
+ description: 'Upload a file for the Vectara platform to attempt to parse and
+ turn into a document within the corpus.
+
+ The first part of the multipart request can contain any document metadata
+ to attach to the parsed
+
document. Only one document may be uploaded at a time.
+
+ '
content:
multipart/form-data:
schema:
- $ref: "#/components/schemas/UploadFileRequest"
+ $ref: '#/components/schemas/UploadFileRequest'
encoding:
metadata:
contentType: application/json
chunking_strategy:
contentType: application/json
file:
- contentType: application/octet-stream, application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.oasis.opendocument.text, application/epub+zip, application/rtf, text/html, text/plain, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, text/markdown
+ contentType: application/octet-stream, application/pdf, application/msword,
+ application/vnd.openxmlformats-officedocument.wordprocessingml.document,
+ application/vnd.oasis.opendocument.text, application/epub+zip, application/rtf,
+ text/html, text/plain, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation,
+ text/markdown
filename:
contentType: text/plain
responses:
- "201":
+ '201':
description: The extracted document has been parsed and added to the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Document"
- "400":
+ $ref: '#/components/schemas/Document'
+ '400':
description: Upload file request was malformed.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
description: Permissions do not allow uploading a file to the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
- "/v2/corpora/{corpus_key}/documents":
+ $ref: '#/components/schemas/NotFoundError'
+ /v2/corpora/{corpus_key}/documents:
post:
tags:
- - Index
+ - Index
summary: Add a document to a corpus
- description: |
- Add a document to a corpus. This endpoint supports two document formats, structured and core.
-
- * **Structured** documents have a more conventional structure that provide document sections
- and parts in a format created by Vectara's proprietary strategy automatically. You provide
- a logical document structure, and Vectara handles the partitioning.
- * **Core** documents differ in that they follow an advanced, granular structure that
- explicitly defines each document part in an array. Each part becomes a distinct,
- searchable item in query results. You have precise control over the document structure
- and content.
-
- For more details, see [Indexing](https://docs.vectara.com/docs/learn/select-ideal-indexing-api).
+ description: "Add a document to a corpus. This endpoint supports two document\
+ \ formats, structured and core.\n\n* **Structured** documents have a more\
+ \ conventional structure that provide document sections\nand parts in a format\
+ \ created by Vectara's proprietary strategy automatically. You provide \n\
+ a logical document structure, and Vectara handles the partitioning.\n* **Core**\
+ \ documents differ in that they follow an advanced, granular structure that\
+ \ \nexplicitly defines each document part in an array. Each part becomes a\
+ \ distinct, \nsearchable item in query results. You have precise control over\
+ \ the document structure \nand content.\n\nFor more details, see [Indexing](https://docs.vectara.com/docs/learn/select-ideal-indexing-api).\
+ \ \n"
operationId: createCorpusDocument
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: corpus_key
- description: The unique key identifying the queried corpus.
- required: true
- schema:
- $ref: "#/components/schemas/CorpusKey"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: corpus_key
+ description: The unique key identifying the queried corpus.
+ required: true
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/CreateDocumentRequest"
+ $ref: '#/components/schemas/CreateDocumentRequest'
responses:
- "201":
+ '201':
description: Document added to the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Document"
- "400":
+ $ref: '#/components/schemas/Document'
+ '400':
description: Document creation request was malformed.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
description: Permissions do not allow adding a document to the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
get:
tags:
- - Documents
+ - Documents
summary: List the documents in the corpus
- description: |
- Retrieve a list of documents stored in a specifi corpus. This endpoint
- provides an overview of document metadata without returning the full content of
- each document.
+ description: "Retrieve a list of documents stored in a specifi corpus. This\
+ \ endpoint \nprovides an overview of document metadata without returning the\
+ \ full content of \neach document.\n"
operationId: listCorpusDocuments
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: corpus_key
- description: The unique key identifying the queried corpus.
- required: true
- schema:
- $ref: "#/components/schemas/CorpusKey"
- - name: limit
- in: query
- description: The maximum number of documents to return at one time.
- required: false
- schema:
- type: integer
- format: int32
- minimum: 1
- maximum: 100
- default: 10
- - name: metadata_filter
- in: query
- description: |
- Filter documents by metadata. Uses the same expression as a query metadata filter, but only
- allows filtering on document metadata.
- required: false
- schema:
- type: string
- - name: page_key
- in: query
- description: Used to retrieve the next page of documents after the limit has been reached.
- required: false
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: corpus_key
+ description: The unique key identifying the queried corpus.
+ required: true
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
+ - name: limit
+ in: query
+ description: The maximum number of documents to return at one time.
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 100
+ default: 10
+ - name: metadata_filter
+ in: query
+ description: 'Filter documents by metadata. Uses the same expression as a
+ query metadata filter, but only
+
+ allows filtering on document metadata.
+
+ '
+ required: false
+ schema:
+ type: string
+ - name: page_key
+ in: query
+ description: Used to retrieve the next page of documents after the limit has
+ been reached.
+ required: false
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: List of documents.
content:
application/json:
schema:
- $ref: "#/components/schemas/ListDocumentsResponse"
- "403":
+ $ref: '#/components/schemas/ListDocumentsResponse'
+ '403':
description: Permissions do not allow listing documents in the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
- "/v2/corpora/{corpus_key}/documents/{document_id}":
+ $ref: '#/components/schemas/NotFoundError'
+ /v2/corpora/{corpus_key}/documents/{document_id}:
delete:
tags:
- - Documents
+ - Documents
summary: Delete a document
- description: |
- Permanently delete a document identified by its unique `document_id` from a specific
- corpus. This operation cannot be undone, so use it with caution.
+ description: "Permanently delete a document identified by its unique `document_id`\
+ \ from a specific \ncorpus. This operation cannot be undone, so use it with\
+ \ caution.\n"
operationId: deleteCorpusDocument
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: corpus_key
- description: The unique key identifying the corpus with the document to delete.
- required: true
- schema:
- $ref: "#/components/schemas/CorpusKey"
- - in: path
- name: document_id
- description: |
- The document ID of the document to delete.
- This `document_id` must be percent encoded.
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: corpus_key
+ description: The unique key identifying the corpus with the document to delete.
+ required: true
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
+ - in: path
+ name: document_id
+ description: 'The document ID of the document to delete.
+
+ This `document_id` must be percent encoded.
+
+ '
+ required: true
+ schema:
+ type: string
responses:
- "204":
+ '204':
description: Successfully deleted the document.
- "403":
+ '403':
description: Permissions do not allow deleting a document in the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus or document not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
get:
tags:
- - Documents
+ - Documents
summary: Retrieve a document
- description: |
- Retrieve the content and metadata of a specific document, identified by its
- unique `document_id` from a specific corpus.
+ description: "Retrieve the content and metadata of a specific document, identified\
+ \ by its \nunique `document_id` from a specific corpus.\n"
operationId: getCorpusDocument
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: corpus_key
- description: The unique key identifying the corpus containing the document to retrieve.
- required: true
- schema:
- $ref: "#/components/schemas/CorpusKey"
- - in: path
- name: document_id
- description: |
- The document ID of the document to retrieve.
- This `document_id` must be percent encoded.
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: corpus_key
+ description: The unique key identifying the corpus containing the document
+ to retrieve.
+ required: true
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
+ - in: path
+ name: document_id
+ description: 'The document ID of the document to retrieve.
+
+ This `document_id` must be percent encoded.
+
+ '
+ required: true
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: Successfully retrieved the document.
content:
application/json:
schema:
- $ref: "#/components/schemas/Document"
- "403":
+ $ref: '#/components/schemas/Document'
+ '403':
description: Permissions do not allow retrieving a document from the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus or document not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
/v2/chats:
post:
tags:
- - Chats
+ - Chats
summary: Start a chat
- description: Create a chat while specifying the default retrieval parameters used by the prompt.
+ description: Create a chat while specifying the default retrieval parameters
+ used by the prompt.
operationId: createChat
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/ChatRequest"
+ $ref: '#/components/schemas/ChatRequest'
x-stream-based-on-body: streamResponse()
responses:
- "200":
+ '200':
description: A response to a chat request.
content:
application/json:
schema:
- $ref: "#/components/schemas/ChatFullResponse"
+ $ref: '#/components/schemas/ChatFullResponse'
text/event-stream:
schema:
- $ref: "#/components/schemas/ChatStreamedResponse"
- "400":
+ $ref: '#/components/schemas/ChatStreamedResponse'
+ '400':
description: Chat creation request was malformed.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
description: Permissions do not allow creating a chat in the corpus.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
get:
tags:
- - Chats
+ - Chats
summary: List chats
description: Retrieve a list of previous chats in the Vectara account.
operationId: listChats
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: query
- name: limit
- description: The maximum number of results to return in the list.
- schema:
- type: integer
- format: int32
- minimum: 1
- maximum: 10000
- default: 1000
- - in: query
- name: page_key
- description: Used to retrieve the next page of chats after the limit has been reached.
- required: false
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: query
+ name: limit
+ description: The maximum number of results to return in the list.
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 10000
+ default: 1000
+ - in: query
+ name: page_key
+ description: Used to retrieve the next page of chats after the limit has been
+ reached.
+ required: false
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: List of chats.
content:
application/json:
schema:
- $ref: "#/components/schemas/ListChatsResponse"
- "403":
+ $ref: '#/components/schemas/ListChatsResponse'
+ '403':
description: Permissions do not allow listing chats.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
/v2/llms:
get:
tags:
- - Large Language Models
+ - Large Language Models
summary: List LLMs
- description: |
- List LLMs that can be used with query and chat endpoints. The LLM is not directly specified in a query,
- but instead a `generation_preset_name` is used. The `generation_preset_name` property in generation parameters
- can be found as the `name` property on the Generations Presets retrieved from `/v2/generation_presets`.
+ description: 'List LLMs that can be used with query and chat endpoints. The
+ LLM is not directly specified in a query,
+
+ but instead a `generation_preset_name` is used. The `generation_preset_name`
+ property in generation parameters
+
+ can be found as the `name` property on the Generations Presets retrieved from
+ `/v2/generation_presets`.
+
+ '
operationId: listLLMs
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: filter
- in: query
- description: A regular expression to match names and descriptions of the LLMs.
- required: false
- schema:
- type: string
- - name: limit
- in: query
- description: The maximum number of results to return in the list.
- required: false
- schema:
- type: integer
- format: int32
- minimum: 1
- maximum: 100
- default: 10
- - name: page_key
- in: query
- description: |
- Used to retrieve the next page of LLMs after the limit has been reached.
- This parameter is not needed for the first page of results.
- required: false
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: filter
+ in: query
+ description: A regular expression to match names and descriptions of the LLMs.
+ required: false
+ schema:
+ type: string
+ - name: limit
+ in: query
+ description: The maximum number of results to return in the list.
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 100
+ default: 10
+ - name: page_key
+ in: query
+ description: 'Used to retrieve the next page of LLMs after the limit has been
+ reached.
+
+ This parameter is not needed for the first page of results.
+
+ '
+ required: false
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: List of LLMs.
content:
application/json:
schema:
- $ref: "#/components/schemas/ListLLMsResponse"
- "403":
+ $ref: '#/components/schemas/ListLLMsResponse'
+ '403':
description: Permissions do not allow listing summarizers.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
/v2/generation_presets:
get:
tags:
- - Generation Presets
+ - Generation Presets
summary: List generation presets
- description: |
- List generation presets used for query or chat requests. Generation presets are
+ description: 'List generation presets used for query or chat requests. Generation
+ presets are
+
the build of properties used to configure generation for a request. This includes
+
the template that renders the prompt, and various generation settings like
+
`temperature`.
+
+ '
operationId: listGenerationPresets
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: llm_name
- in: query
- description: Filter presets by the LLM name.
- required: false
- schema:
- type: string
- - name: limit
- in: query
- description: The maximum number of results to return in the list.
- required: false
- schema:
- type: integer
- format: int32
- minimum: 1
- maximum: 100
- default: 10
- - name: page_key
- in: query
- description: |
- Used to retrieve the next page of generation presets after the limit has been reached.
- This parameter is not needed for the first page of results.
- required: false
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: llm_name
+ in: query
+ description: Filter presets by the LLM name.
+ required: false
+ schema:
+ type: string
+ - name: limit
+ in: query
+ description: The maximum number of results to return in the list.
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 100
+ default: 10
+ - name: page_key
+ in: query
+ description: 'Used to retrieve the next page of generation presets after the
+ limit has been reached.
+
+ This parameter is not needed for the first page of results.
+
+ '
+ required: false
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: List of Generation Presets.
content:
application/json:
schema:
- $ref: "#/components/schemas/ListGenerationPresetsResponse"
- "403":
+ $ref: '#/components/schemas/ListGenerationPresetsResponse'
+ '403':
description: Permissions do not allow listing generation presets.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "/v2/chats/{chat_id}":
+ $ref: '#/components/schemas/Error'
+ /v2/chats/{chat_id}:
get:
tags:
- - Chats
+ - Chats
summary: Get a chat
- description: Get a chat summary to view what started the chat, but not subsequent turns.
+ description: Get a chat summary to view what started the chat, but not subsequent
+ turns.
operationId: getChat
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: chat_id
- description: The ID of the chat.
- required: true
- schema:
- type: string
- pattern: cht_.+$
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: chat_id
+ description: The ID of the chat.
+ required: true
+ schema:
+ type: string
+ pattern: cht_.+$
responses:
- "200":
+ '200':
description: A chat.
content:
application/json:
schema:
- $ref: "#/components/schemas/Chat"
- "403":
+ $ref: '#/components/schemas/Chat'
+ '403':
description: Permissions do not allow retrieving the chat.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus or chat not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
delete:
tags:
- - Chats
+ - Chats
summary: Delete a chat
description: Delete a chat and any turns it contains permanently.
operationId: deleteChat
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: chat_id
- description: The ID of the chat.
- required: true
- schema:
- type: string
- pattern: cht_.+$
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: chat_id
+ description: The ID of the chat.
+ required: true
+ schema:
+ type: string
+ pattern: cht_.+$
responses:
- "204":
+ '204':
description: Successfully deleted the chat.
- "403":
+ '403':
description: Permissions do not allow deleting the chat.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus or chat not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
- "/v2/chats/{chat_id}/turns":
+ $ref: '#/components/schemas/NotFoundError'
+ /v2/chats/{chat_id}/turns:
post:
tags:
- - Chats
+ - Chats
summary: Create a new turn in the chat
- description: Create a new turn in the chat. Each conversation has a series of `turn` objects, which are the sequence of message and response pairs that make up the dialog.
+ description: Create a new turn in the chat. Each conversation has a series of
+ `turn` objects, which are the sequence of message and response pairs that
+ make up the dialog.
operationId: createChatTurn
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: chat_id
- description: The ID of the chat.
- required: true
- schema:
- type: string
- pattern: cht_.+$
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: chat_id
+ description: The ID of the chat.
+ required: true
+ schema:
+ type: string
+ pattern: cht_.+$
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/ChatRequest"
+ $ref: '#/components/schemas/ChatRequest'
x-stream-based-on-body: streamResponse()
responses:
- "200":
+ '200':
description: A response to a chat request.
content:
application/json:
schema:
- $ref: "#/components/schemas/ChatFullResponse"
+ $ref: '#/components/schemas/ChatFullResponse'
text/event-stream:
schema:
- $ref: "#/components/schemas/ChatStreamedResponse"
- "400":
+ $ref: '#/components/schemas/ChatStreamedResponse'
+ '400':
description: Turn creation request was malformed.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
description: Permissions do not allow creating a turn in the chat.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus or chat not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
get:
tags:
- - Chats
+ - Chats
summary: List turns in a chat
- description: List all turns in a chat to see all message and response pairs that make up the dialog.
+ description: List all turns in a chat to see all message and response pairs
+ that make up the dialog.
operationId: listChatTurns
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: chat_id
- description: The ID of the chat.
- required: true
- schema:
- type: string
- pattern: cht_.+$
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: chat_id
+ description: The ID of the chat.
+ required: true
+ schema:
+ type: string
+ pattern: cht_.+$
responses:
- "200":
+ '200':
description: List of turns.
content:
application/json:
schema:
- $ref: "#/components/schemas/ListChatTurnsResponse"
- "403":
+ $ref: '#/components/schemas/ListChatTurnsResponse'
+ '403':
description: Permissions do not allow listing turns in the chat.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus or chat not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
- "/v2/chats/{chat_id}/turns/{turn_id}":
+ $ref: '#/components/schemas/NotFoundError'
+ /v2/chats/{chat_id}/turns/{turn_id}:
get:
tags:
- - Chats
+ - Chats
summary: Get a turn
- description: Get a specific turn from a chat, which is a message and response pair from the conversation.
+ description: Get a specific turn from a chat, which is a message and response
+ pair from the conversation.
operationId: getChatTurn
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: chat_id
- description: The ID of the chat.
- required: true
- schema:
- type: string
- pattern: cht_.+$
- - in: path
- name: turn_id
- description: The ID of the turn.
- required: true
- schema:
- type: string
- pattern: trn_.+$
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: chat_id
+ description: The ID of the chat.
+ required: true
+ schema:
+ type: string
+ pattern: cht_.+$
+ - in: path
+ name: turn_id
+ description: The ID of the turn.
+ required: true
+ schema:
+ type: string
+ pattern: trn_.+$
responses:
- "200":
+ '200':
description: The turn.
content:
application/json:
schema:
- $ref: "#/components/schemas/Turn"
- "403":
+ $ref: '#/components/schemas/Turn'
+ '403':
description: Permissions do not allow getting the turn.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus, chat, or turn not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
delete:
tags:
- - Chats
+ - Chats
summary: Delete a turn
- description: Delete a turn from a chat. This will delete all subsequent turns in the chat.
+ description: Delete a turn from a chat. This will delete all subsequent turns
+ in the chat.
operationId: deleteChatTurn
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: chat_id
- description: The ID of the chat.
- required: true
- schema:
- type: string
- pattern: cht_.+$
- - in: path
- name: turn_id
- description: The ID of the turn.
- required: true
- schema:
- type: string
- pattern: trn_.+$
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: chat_id
+ description: The ID of the chat.
+ required: true
+ schema:
+ type: string
+ pattern: cht_.+$
+ - in: path
+ name: turn_id
+ description: The ID of the turn.
+ required: true
+ schema:
+ type: string
+ pattern: trn_.+$
responses:
- "204":
+ '204':
description: Successfully deleted a turn.
- "403":
+ '403':
description: Permissions do not allow deleting the turn.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus, chat, or turn not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
patch:
tags:
- - Chats
+ - Chats
summary: Update a turn
description: Update a turn; used to disable or enable a chat.
operationId: updateChatTurn
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: path
- name: chat_id
- description: The ID of the chat.
- required: true
- schema:
- type: string
- pattern: cht_.+$
- - in: path
- name: turn_id
- description: The ID of the turn.
- required: true
- schema:
- type: string
- pattern: trn_.+$
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: path
+ name: chat_id
+ description: The ID of the chat.
+ required: true
+ schema:
+ type: string
+ pattern: cht_.+$
+ - in: path
+ name: turn_id
+ description: The ID of the turn.
+ required: true
+ schema:
+ type: string
+ pattern: trn_.+$
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/UpdateTurnRequest"
+ $ref: '#/components/schemas/UpdateTurnRequest'
responses:
- "200":
+ '200':
description: Successfully modified the turn.
content:
application/json:
schema:
- $ref: "#/components/schemas/Turn"
- "403":
+ $ref: '#/components/schemas/Turn'
+ '403':
description: Permissions do not allow updating the turn.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Corpus, chat, or turn not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
/v2/encoders:
get:
tags:
- - Encoders
+ - Encoders
summary: List encoders
description: Encoders are used to store and retrieve from a corpus.
operationId: listEncoders
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: query
- name: filter
- description: A regular expression against encoder names and descriptions.
- required: false
- schema:
- type: string
- example: vectara.*
- - in: query
- name: limit
- description: The maximum number of results to return in the list.
- required: false
- schema:
- type: integer
- format: int32
- minimum: 1
- maximum: 100
- default: 10
- - name: page_key
- in: query
- description: Used to retrieve the next page of encoders after the limit has been reached.
- required: false
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: query
+ name: filter
+ description: A regular expression against encoder names and descriptions.
+ required: false
+ schema:
+ type: string
+ example: vectara.*
+ - in: query
+ name: limit
+ description: The maximum number of results to return in the list.
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 100
+ default: 10
+ - name: page_key
+ in: query
+ description: Used to retrieve the next page of encoders after the limit has
+ been reached.
+ required: false
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: List of encoders.
content:
application/json:
schema:
- $ref: "#/components/schemas/ListEncodersResponse"
- "403":
+ $ref: '#/components/schemas/ListEncodersResponse'
+ '403':
description: Permissions do not allow listing encoders.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
/v2/rerankers:
get:
tags:
- - Rerankers
+ - Rerankers
summary: List rerankers
- description: Rerankers are used to improve the ranking (ordering) of search results.
+ description: Rerankers are used to improve the ranking (ordering) of search
+ results.
operationId: listRerankers
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - in: query
- name: filter
- description: A regular expression against reranker names and descriptions.
- required: false
- schema:
- type: string
- example: vectara.*
- - in: query
- name: limit
- description: The maximum number of rerankers to return in the list.
- required: false
- schema:
- type: integer
- format: int32
- minimum: 1
- maximum: 100
- default: 10
- - name: page_key
- in: query
- description: Used to retrieve the next page of rerankers after the limit has been reached.
- required: false
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - in: query
+ name: filter
+ description: A regular expression against reranker names and descriptions.
+ required: false
+ schema:
+ type: string
+ example: vectara.*
+ - in: query
+ name: limit
+ description: The maximum number of rerankers to return in the list.
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 100
+ default: 10
+ - name: page_key
+ in: query
+ description: Used to retrieve the next page of rerankers after the limit has
+ been reached.
+ required: false
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: List of rerankers.
content:
application/json:
schema:
- $ref: "#/components/schemas/ListRerankersResponse"
- "403":
+ $ref: '#/components/schemas/ListRerankersResponse'
+ '403':
description: Permissions do not allow listing rerankers.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
/v2/jobs:
get:
tags:
- - Jobs
+ - Jobs
summary: List jobs
- description: List jobs for the account. Jobs are background processes like replacing the filterable metadata attributes.
+ description: List jobs for the account. Jobs are background processes like replacing
+ the filterable metadata attributes.
operationId: listJobs
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: corpus_key
- in: query
- description: The unique key identifying the corpus with the job.
- required: false
- schema:
- type: array
- items:
- $ref: "#/components/schemas/CorpusKey"
- - name: after
- in: query
- description: Filter by jobs created after a particular date-time.
- required: false
- schema:
- type: string
- format: date-time
- - name: state
- in: query
- description: Filter by jobs in particular states.
- required: false
- schema:
- type: array
- items:
- $ref: "#/components/schemas/JobState"
- - name: limit
- in: query
- description: The maximum number of jobs to return at one time.
- required: false
- schema:
- type: integer
- format: int32
- minimum: 1
- maximum: 100
- default: 10
- - name: page_key
- in: query
- description: Used to retrieve the next page of jobs after the limit has been reached.
- required: false
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: corpus_key
+ in: query
+ description: The unique key identifying the corpus with the job.
+ required: false
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/CorpusKey'
+ - name: after
+ in: query
+ description: Filter by jobs created after a particular date-time.
+ required: false
+ schema:
+ type: string
+ format: date-time
+ - name: state
+ in: query
+ description: Filter by jobs in particular states.
+ required: false
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/JobState'
+ - name: limit
+ in: query
+ description: The maximum number of jobs to return at one time.
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 100
+ default: 10
+ - name: page_key
+ in: query
+ description: Used to retrieve the next page of jobs after the limit has been
+ reached.
+ required: false
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: List of jobs.
content:
application/json:
schema:
- $ref: "#/components/schemas/ListJobsResponse"
- "403":
+ $ref: '#/components/schemas/ListJobsResponse'
+ '403':
description: Permissions do not allow listing jobs.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "/v2/jobs/{job_id}":
+ $ref: '#/components/schemas/Error'
+ /v2/jobs/{job_id}:
get:
tags:
- - Jobs
+ - Jobs
summary: Get a job by ID
- description: Get a job by a specific ID. Jobs are background processes like replacing the filterable metadata attributes.
+ description: Get a job by a specific ID. Jobs are background processes like
+ replacing the filterable metadata attributes.
operationId: getJob
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: job_id
- in: path
- description: The ID of the job to get.
- required: true
- schema:
- type: string
- pattern: job_.+$
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: job_id
+ in: path
+ description: The ID of the job to get.
+ required: true
+ schema:
+ type: string
+ pattern: job_.+$
responses:
- "200":
+ '200':
description: A job.
content:
application/json:
schema:
- $ref: "#/components/schemas/Job"
- "403":
+ $ref: '#/components/schemas/Job'
+ '403':
description: Permissions do not allow retrieving a job.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: Job not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
/v2/users:
post:
tags:
- - Users
+ - Users
summary: Create a user in the current customer account
description: Create a user for the current customer account.
operationId: createUser
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/CreateUserRequest"
+ $ref: '#/components/schemas/CreateUserRequest'
responses:
- "201":
+ '201':
description: The created user.
content:
application/json:
schema:
- $ref: "#/components/schemas/User"
- "400":
+ $ref: '#/components/schemas/User'
+ '400':
description: User creation request was malformed.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
description: Permissions do not allow retrieving a user.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
get:
tags:
- - Users
+ - Users
summary: List users in the account
description: Lists all users in the account.
operationId: listUsers
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: limit
- in: query
- description: The maximum number of users to return at one time.
- required: false
- schema:
- type: integer
- format: int32
- minimum: 1
- maximum: 100
- default: 10
- - name: page_key
- in: query
- description: Used to retrieve the next page of users after the limit has been reached.
- required: false
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: limit
+ in: query
+ description: The maximum number of users to return at one time.
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 100
+ default: 10
+ - name: page_key
+ in: query
+ description: Used to retrieve the next page of users after the limit has been
+ reached.
+ required: false
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: List of users.
content:
application/json:
schema:
- $ref: "#/components/schemas/ListUsersResponse"
- "403":
+ $ref: '#/components/schemas/ListUsersResponse'
+ '403':
description: Permissions do not allow listing users.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "/v2/users/{username}":
+ $ref: '#/components/schemas/Error'
+ /v2/users/{username}:
get:
tags:
- - Users
+ - Users
summary: Get a user
- description: |
- Get a user and view details like the email, username, and associated roles.
+ description: 'Get a user and view details like the email, username, and associated
+ roles.
+
+ '
operationId: getUser
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: username
- in: path
- description: |
- Specifies the user ID that to retrieve.
- Note that the username must be percent encoded.
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: username
+ in: path
+ description: 'Specifies the user ID that to retrieve.
+
+ Note that the username must be percent encoded.
+
+ '
+ required: true
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: A user.
content:
application/json:
schema:
- $ref: "#/components/schemas/User"
- "403":
+ $ref: '#/components/schemas/User'
+ '403':
description: Permissions do not allow retrieving the user.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: User not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
patch:
tags:
- - Users
+ - Users
summary: Update a user
description: Update details about a user such as role names.
operationId: updateUser
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: username
- in: path
- description: |
- Specifies the user ID to update.
- Note that the username must be percent encoded.
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: username
+ in: path
+ description: 'Specifies the user ID to update.
+
+ Note that the username must be percent encoded.
+
+ '
+ required: true
+ schema:
+ type: string
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/UpdateUserRequest"
+ $ref: '#/components/schemas/UpdateUserRequest'
responses:
- "200":
+ '200':
description: New user after modification.
content:
application/json:
schema:
- $ref: "#/components/schemas/User"
- "403":
+ $ref: '#/components/schemas/User'
+ '403':
description: Permissions do not allow updating the user.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: User not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
delete:
tags:
- - Users
+ - Users
summary: Delete a user
description: Delete a user from the account.
operationId: deleteUser
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: username
- in: path
- description: |
- Specifies the user ID to delete.
- Note that the username must be percent encoded.
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: username
+ in: path
+ description: 'Specifies the user ID to delete.
+
+ Note that the username must be percent encoded.
+
+ '
+ required: true
+ schema:
+ type: string
responses:
- "204":
+ '204':
description: User was successfully deleted.
- "403":
+ '403':
description: Permissions do not allow deleting the user.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: User not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
- "/v2/users/{username}/reset_password":
+ $ref: '#/components/schemas/NotFoundError'
+ /v2/users/{username}/reset_password:
post:
tags:
- - Users
+ - Users
summary: Reset the password for a user
description: Reset the password for a user.
operationId: resetUserPassword
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: username
- in: path
- description: |
- Specifies the user ID to update.
- Note that the username must be percent encoded and URI safe.
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: username
+ in: path
+ description: 'Specifies the user ID to update.
+
+ Note that the username must be percent encoded and URI safe.
+
+ '
+ required: true
+ schema:
+ type: string
responses:
- "204":
+ '204':
description: User was sent the password reset email.
- "403":
+ '403':
description: Permissions do not allow resetting the user password.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "404":
+ $ref: '#/components/schemas/Error'
+ '404':
description: User not found.
content:
application/json:
schema:
- $ref: "#/components/schemas/NotFoundError"
+ $ref: '#/components/schemas/NotFoundError'
/v2/api_keys:
post:
tags:
- - API Keys
+ - API Keys
summary: Create an API key
description: An API key is to authenticate when calling Vectara APIs.
operationId: createApiKey
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/CreateApiKeyRequest"
+ $ref: '#/components/schemas/CreateApiKeyRequest'
responses:
- "201":
- description: An API key object, used to query the Vectara API with the assigned roles.
+ '201':
+ description: An API key object, used to query the Vectara API with the assigned
+ roles.
content:
application/json:
schema:
- $ref: "#/components/schemas/ApiKey"
- "400":
+ $ref: '#/components/schemas/ApiKey'
+ '400':
description: API key creation request was malformed.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
description: Permissions do not allow creating the API key.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
get:
tags:
- - API Keys
+ - API Keys
summary: List API keys
operationId: listApiKeys
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: limit
- in: query
- description: Max number of API keys to return at one time.
- required: false
- schema:
- type: integer
- format: int32
- minimum: 1
- maximum: 100
- default: 10
- - name: page_key
- in: query
- description: Used to retrieve the next page of API keys after the limit has been reached.
- required: false
- schema:
- type: string
- - name: corpus_key
- in: query
- description: Filters the API keys to only those with permissions on the specified corpus key.
- required: false
- schema:
- $ref: "#/components/schemas/CorpusKey"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: limit
+ in: query
+ description: Max number of API keys to return at one time.
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 100
+ default: 10
+ - name: page_key
+ in: query
+ description: Used to retrieve the next page of API keys after the limit has
+ been reached.
+ required: false
+ schema:
+ type: string
+ - name: corpus_key
+ in: query
+ description: Filters the API keys to only those with permissions on the specified
+ corpus key.
+ required: false
+ schema:
+ $ref: '#/components/schemas/CorpusKey'
responses:
- "200":
+ '200':
description: An array of API keys.
content:
application/json:
schema:
- $ref: "#/components/schemas/ListApiKeysResponse"
- "400":
+ $ref: '#/components/schemas/ListApiKeysResponse'
+ '400':
description: API key list request was malformed.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
description: Permissions do not allow listing API keys.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "/v2/api_keys/{api_key_id}":
+ $ref: '#/components/schemas/Error'
+ /v2/api_keys/{api_key_id}:
get:
tags:
- - API Keys
+ - API Keys
summary: Get an API key
operationId: getApiKey
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: api_key_id
- in: path
- description: The ID of the API key.
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: api_key_id
+ in: path
+ description: The ID of the API key.
+ required: true
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: The API key.
content:
application/json:
schema:
- $ref: "#/components/schemas/ApiKey"
- "403":
+ $ref: '#/components/schemas/ApiKey'
+ '403':
description: Permissions do not allow getting this API key.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
patch:
tags:
- - API Keys
+ - API Keys
summary: Update an API key
description: Update an API key such as the roles attached to the key.
operationId: updateApiKey
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: api_key_id
- in: path
- description: The ID of the API key.
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: api_key_id
+ in: path
+ description: The ID of the API key.
+ required: true
+ schema:
+ type: string
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/UpdateApiKeyRequest"
+ $ref: '#/components/schemas/UpdateApiKeyRequest'
responses:
- "200":
+ '200':
description: The API key.
content:
application/json:
schema:
- $ref: "#/components/schemas/ApiKey"
- "403":
+ $ref: '#/components/schemas/ApiKey'
+ '403':
description: Permissions do not allow getting this API key.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
delete:
tags:
- - API Keys
+ - API Keys
summary: Delete an API key
- description: Delete API keys to help you manage the security and lifecycle of API keys in your application.
+ description: Delete API keys to help you manage the security and lifecycle of
+ API keys in your application.
operationId: deleteApiKey
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: api_key_id
- in: path
- description: The ID of the API key.
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: api_key_id
+ in: path
+ description: The ID of the API key.
+ required: true
+ schema:
+ type: string
responses:
- "204":
+ '204':
description: The API key was deleted.
- "403":
+ '403':
description: Permissions do not allow deleting this API key.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
/v2/app_clients:
post:
tags:
- - Application Clients
+ - Application Clients
summary: Create an App Client
- description: An App Client is used for OAuth 2.0 authentication when calling Vectara APIs.
+ description: An App Client is used for OAuth 2.0 authentication when calling
+ Vectara APIs.
operationId: createAppClient
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/CreateAppClientRequest"
+ $ref: '#/components/schemas/CreateAppClientRequest'
responses:
- "201":
- description: An App Client object, used to query the Vectara API with the assigned roles.
+ '201':
+ description: An App Client object, used to query the Vectara API with the
+ assigned roles.
content:
application/json:
schema:
- $ref: "#/components/schemas/AppClient"
- "400":
+ $ref: '#/components/schemas/AppClient'
+ '400':
description: App Client creation request was malformed.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
description: Permissions do not allow creating the App Client.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
get:
tags:
- - Application Clients
+ - Application Clients
summary: List App Clients
operationId: listAppClient
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: limit
- in: query
- description: The maximum number of App Clients to return at one time.
- required: false
- schema:
- type: integer
- format: int32
- minimum: 1
- maximum: 100
- default: 10
- - name: filter
- in: query
- description: Regular expression to filter the names of the App Clients.
- required: false
- schema:
- type: string
- - name: page_key
- in: query
- description: Used to retrieve the next page of App Clients after the limit has been reached.
- required: false
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: limit
+ in: query
+ description: The maximum number of App Clients to return at one time.
+ required: false
+ schema:
+ type: integer
+ format: int32
+ minimum: 1
+ maximum: 100
+ default: 10
+ - name: filter
+ in: query
+ description: Regular expression to filter the names of the App Clients.
+ required: false
+ schema:
+ type: string
+ - name: page_key
+ in: query
+ description: Used to retrieve the next page of App Clients after the limit
+ has been reached.
+ required: false
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: An array of App Clients.
content:
application/json:
schema:
- $ref: "#/components/schemas/ListAppClientsResponse"
- "400":
+ $ref: '#/components/schemas/ListAppClientsResponse'
+ '400':
description: App Clients list request was malformed.
content:
application/json:
schema:
- $ref: "#/components/schemas/BadRequestError"
- "403":
+ $ref: '#/components/schemas/BadRequestError'
+ '403':
description: Permissions do not allow listing App Clients.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
- "/v2/app_clients/{app_client_id}":
+ $ref: '#/components/schemas/Error'
+ /v2/app_clients/{app_client_id}:
get:
tags:
- - Application Clients
+ - Application Clients
summary: Get an App Client
operationId: getAppClient
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: app_client_id
- in: path
- description: The ID of the App Client.
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: app_client_id
+ in: path
+ description: The ID of the App Client.
+ required: true
+ schema:
+ type: string
responses:
- "200":
+ '200':
description: The App Client.
content:
application/json:
schema:
- $ref: "#/components/schemas/AppClient"
- "403":
+ $ref: '#/components/schemas/AppClient'
+ '403':
description: Permissions do not allow getting this App Client.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
patch:
tags:
- - Application Clients
+ - Application Clients
summary: Update an App Client
operationId: updateAppClient
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: app_client_id
- in: path
- description: The name of App Client.
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: app_client_id
+ in: path
+ description: The name of App Client.
+ required: true
+ schema:
+ type: string
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/UpdateAppClientRequest"
+ $ref: '#/components/schemas/UpdateAppClientRequest'
responses:
- "200":
+ '200':
description: The App Client.
content:
application/json:
schema:
- $ref: "#/components/schemas/AppClient"
- "403":
+ $ref: '#/components/schemas/AppClient'
+ '403':
description: Permissions do not allow updating this App Client.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
delete:
tags:
- - Application Clients
+ - Application Clients
summary: Delete an App Client
operationId: deleteAppClient
parameters:
- - $ref: "#/components/parameters/RequestTimeout"
- - $ref: "#/components/parameters/RequestTimeoutMillis"
- - name: app_client_id
- in: path
- description: The name of App Client.
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/RequestTimeout'
+ - $ref: '#/components/parameters/RequestTimeoutMillis'
+ - name: app_client_id
+ in: path
+ description: The name of App Client.
+ required: true
+ schema:
+ type: string
responses:
- "204":
+ '204':
description: The App Client was deleted.
- "403":
+ '403':
description: Permissions do not allow deleting this App Client.
content:
application/json:
schema:
- $ref: "#/components/schemas/Error"
+ $ref: '#/components/schemas/Error'
components:
schemas:
CreateCorpusRequest:
type: object
properties:
key:
- $ref: "#/components/schemas/CorpusKey"
+ $ref: '#/components/schemas/CorpusKey'
name:
description: The name for the corpus. This value defaults to the key.
type: string
@@ -2029,16 +2162,19 @@ components:
type: string
example: Documents with important information for my prompt.
queries_are_answers:
- description: Queries made to this corpus are considered answers, and not questions.
+ description: Queries made to this corpus are considered answers, and not
+ questions.
type: boolean
default: false
documents_are_questions:
- description: Documents inside this corpus are considered questions, and not answers.
+ description: Documents inside this corpus are considered questions, and
+ not answers.
type: boolean
default: false
encoder_id:
- description: |
- *Deprecated*: Use `encoder_name` instead.
+ description: '*Deprecated*: Use `encoder_name` instead.
+
+ '
type: string
pattern: enc_[0-9]+$
example: enc_1
@@ -2048,39 +2184,47 @@ components:
type: string
example: boomerang
filter_attributes:
- description: |
- The new filter attributes of the corpus.
- If unset then the corpus will not have filter attributes.
+ description: "The new filter attributes of the corpus. \nIf unset then the\
+ \ corpus will not have filter attributes.\n"
type: array
default: []
items:
- $ref: "#/components/schemas/FilterAttribute"
+ $ref: '#/components/schemas/FilterAttribute'
custom_dimensions:
- description: |
- A custom dimension is an additional numerical field attached to a document part. You
- can then multiply this numerical field with a query time custom dimension of the same
+ description: 'A custom dimension is an additional numerical field attached
+ to a document part. You
+
+ can then multiply this numerical field with a query time custom dimension
+ of the same
+
name. This allows boosting (or burying) document parts for arbitrary reasons.
- This feature is only enabled for Scale customers.
+
+ This feature is only enabled for Pro and Enterprise customers.
+
+ '
type: array
default: []
items:
- $ref: "#/components/schemas/CorpusCustomDimension"
+ $ref: '#/components/schemas/CorpusCustomDimension'
required:
- - key
+ - key
UpdateCorpusRequest:
type: object
description: Corpus properties that are modifiable after creation.
properties:
enabled:
- description: Set whether or not the corpus is enabled. If unset then the corpus will remain in the same state.
+ description: Set whether or not the corpus is enabled. If unset then the
+ corpus will remain in the same state.
type: boolean
example: false
name:
- description: The name for the corpus. If unset or null, then the corpus will remain in the same state.
+ description: The name for the corpus. If unset or null, then the corpus
+ will remain in the same state.
type: string
example: new-name
description:
- description: Description of the corpus. If unset or null, then the corpus will remain in the same state.
+ description: Description of the corpus. If unset or null, then the corpus
+ will remain in the same state.
type: string
example: New description of the corpus.
ReplaceFilterAttributesRequest:
@@ -2090,9 +2234,9 @@ components:
description: The new filter attributes.
type: array
items:
- $ref: "#/components/schemas/FilterAttribute"
+ $ref: '#/components/schemas/FilterAttribute'
required:
- - filter_attributes
+ - filter_attributes
ReplaceFilterAttributesResponse:
type: object
properties:
@@ -2101,12 +2245,12 @@ components:
type: string
pattern: job_.+$
required:
- - job_id
+ - job_id
CorpusKey:
description: A user-provided key for a corpus.
type: string
example: my-corpus
- pattern: "[a-zA-Z0-9_\\=\\-]+$"
+ pattern: '[a-zA-Z0-9_\=\-]+$'
maxLength: 50
Corpus:
type: object
@@ -2116,7 +2260,7 @@ components:
type: string
pattern: crp_[0-9]+$
key:
- $ref: "#/components/schemas/CorpusKey"
+ $ref: '#/components/schemas/CorpusKey'
name:
description: Name for the corpus. This value defaults to the key.
type: string
@@ -2127,24 +2271,33 @@ components:
description: Specifies whether the corpus is enabled or not.
type: boolean
chat_history_corpus:
- description: Indicates that this corpus does not store documents and stores chats instead.
+ description: Indicates that this corpus does not store documents and stores
+ chats instead.
type: boolean
queries_are_answers:
- description: |
- Queries made to this corpus are considered answers, and not questions.
+ description: 'Queries made to this corpus are considered answers, and not
+ questions.
+
This swaps the semantics of the encoder used at query time.
+
+ '
type: boolean
default: false
documents_are_questions:
- description: |
- Documents inside this corpus are considered questions, and not answers.
+ description: 'Documents inside this corpus are considered questions, and
+ not answers.
+
This swaps the semantics of the encoder used at indexing.
+
+ '
type: boolean
default: false
encoder_id:
- description: |
- The encoder used by the corpus.
- *Deprecated*: use `encoder_name` instead
+ description: 'The encoder used by the corpus.
+
+ *Deprecated*: Use `encoder_name` instead
+
+ '
type: string
pattern: enc_[0-9]+$
deprecated: true
@@ -2156,43 +2309,54 @@ components:
description: The new filter attributes of the corpus.
type: array
items:
- $ref: "#/components/schemas/FilterAttribute"
+ $ref: '#/components/schemas/FilterAttribute'
custom_dimensions:
description: The custom dimensions of all document parts inside the corpus.
type: array
items:
- $ref: "#/components/schemas/CorpusCustomDimension"
+ $ref: '#/components/schemas/CorpusCustomDimension'
limits:
type: object
title: CorpusLimits
properties:
used_docs:
- description: |
- The number of documents contained in the corpus.
+ description: 'The number of documents contained in the corpus.
+
+ '
type: integer
format: int64
used_parts:
- description: |
- The number of document parts contained in the corpus.
+ description: 'The number of document parts contained in the corpus.
+
+ '
type: integer
format: int64
used_bytes:
- description: |
- NOTE: This field is currently not populated by the system.
- The number of bytes contained in the corpus. This includes the document metadata,
+ description: 'NOTE: This field is currently not populated by the system.
+
+ The number of bytes contained in the corpus. This includes the document
+ metadata,
+
document part metadata, and document contents.
+
+ '
type: integer
format: int64
used_characters:
- description: |
- The number of characters contained in the corpus. This includes the document metadata,
+ description: 'The number of characters contained in the corpus. This
+ includes the document metadata,
+
document part metadata, and document contents.
+
+ '
type: integer
format: int64
max_bytes:
- description: |
- NOTE: This field is currently not populated by the system.
+ description: 'NOTE: This field is currently not populated by the system.
+
The maximum number of bytes the corpus can be.
+
+ '
type: integer
format: int64
max_metadata_bytes:
@@ -2200,9 +2364,11 @@ components:
type: integer
format: int64
index_rate:
- description: |
- NOTE: This field is currently not populated by the system.
+ description: 'NOTE: This field is currently not populated by the system.
+
The maximum per-second addition of new documents to corpus.
+
+ '
type: integer
format: int64
created_at:
@@ -2211,9 +2377,12 @@ components:
format: date-time
CorpusCustomDimension:
type: object
- description: |
- Custom dimensions attached to all document parts in a corpus. Allows arbitrary
+ description: 'Custom dimensions attached to all document parts in a corpus.
+ Allows arbitrary
+
modification of the score for many purposes.
+
+ '
properties:
name:
description: The name of the custom dimension.
@@ -2224,80 +2393,91 @@ components:
type: string
example: Product importance.
indexing_default:
- description: |
- Default value of a custom dimension on a document part if the custom
+ description: 'Default value of a custom dimension on a document part if
+ the custom
+
dimension value is not specified when the document part is indexed.
+
A value of 0 means that custom dimension is not considered.
+
+ '
type: number
format: double
example: 0
default: 0
querying_default:
- description: |
- Default value of a custom dimension for a query if the value
+ description: 'Default value of a custom dimension for a query if the value
+
of the custom dimension is not specified when querying the corpus.
+
A value of 0 means that custom dimension is not considered.
+
+ '
type: number
format: double
example: 0
default: 0
required:
- - name
+ - name
FilterAttribute:
type: object
properties:
name:
- description: The JSON path of the filter attribute in a document or document part metadata.
+ description: The JSON path of the filter attribute in a document or document
+ part metadata.
type: string
example: Title
level:
- description: Indicates whether this is a document or document part metadata filter.
+ description: Indicates whether this is a document or document part metadata
+ filter.
type: string
enum:
- - document
- - part
+ - document
+ - part
example: document
description:
description: Description of the filter. May be omitted.
type: string
example: The title of the document.
indexed:
- description: Indicates whether an index should be created for the filter. Creating an index will improve query latency when using the filter.
+ description: Indicates whether an index should be created for the filter.
+ Creating an index will improve query latency when using the filter.
type: boolean
default: true
type:
description: The value type of the filter.
type: string
enum:
- - integer
- - real_number
- - text
- - boolean
- - list[integer]
- - list[real_number]
- - list[text]
+ - integer
+ - real_number
+ - text
+ - boolean
+ - list[integer]
+ - list[real_number]
+ - list[text]
example: text
required:
- - name
- - level
- - type
+ - name
+ - level
+ - type
ListCorporaResponse:
type: object
properties:
corpora:
type: array
items:
- $ref: "#/components/schemas/Corpus"
+ $ref: '#/components/schemas/Corpus'
metadata:
- $ref: "#/components/schemas/ListMetadata"
+ $ref: '#/components/schemas/ListMetadata'
SearchParameters:
type: object
description: Search parameters to retrieve knowledge for the query.
properties:
offset:
- description: Specifies how many results into the result to skip. This is useful for pagination.
+ description: Specifies how many results into the result to skip. This is
+ useful for pagination.
type: integer
format: int32
default: 0
@@ -2309,69 +2489,78 @@ components:
minimum: 1
default: 10
context_configuration:
- $ref: "#/components/schemas/ContextConfiguration"
+ $ref: '#/components/schemas/ContextConfiguration'
reranker:
- $ref: "#/components/schemas/SearchReranker"
+ $ref: '#/components/schemas/SearchReranker'
ContextConfiguration:
type: object
- description: Configuration on the presentation of each document part in the result set.
+ description: Configuration on the presentation of each document part in the
+ result set.
properties:
characters_before:
- description: |
- The number of characters that are shown before the matching document part.
+ description: 'The number of characters that are shown before the matching
+ document part.
+
This is useful to show the context of the document part in the wider document.
+
Ignored if `sentences_before` is set.
+
Vectara will capture the full sentence that contains the captured characters,
+
to not lose the meaning caused by a truncated word or sentence.
+
+ '
type: integer
format: int32
default: 0
minimum: 0
example: 30
characters_after:
- description: |
- The number of characters that are shown after the matching document part.
- This is useful to show the context of the document part in the wider document.
- Ignored if `sentences_after` is set.
- Vectara will capture the full sentence that contains the captured characters,
- to not lose the meaning caused by a truncated word or sentence.
+ description: "The number of characters that are shown after the matching\
+ \ document part. \nThis is useful to show the context of the document\
+ \ part in the wider document.\nIgnored if `sentences_after` is set.\n\
+ Vectara will capture the full sentence that contains the captured characters,\n\
+ to not lose the meaning caused by a truncated word or sentence.\n"
type: integer
format: int32
default: 0
minimum: 0
example: 30
sentences_before:
- description: |
- The number of sentences that are shown before the matching document part.
+ description: 'The number of sentences that are shown before the matching
+ document part.
+
This is useful to show the context of the document part in the wider document.
+
+ '
type: integer
format: int32
default: 0
minimum: 0
example: 3
sentences_after:
- description: |
- The number of sentences that are shown after the matching document part.
- This is useful to show the context of the document part in the wider document.
+ description: "The number of sentences that are shown after the matching\
+ \ document part. \nThis is useful to show the context of the document\
+ \ part in the wider document.\n"
type: integer
format: int32
default: 0
minimum: 0
example: 3
start_tag:
- description: |
- The tag that wraps the document part at the start. This is often used to
- provide a start HTML/XML tag or some other delimiter you can use in an
- application to understand where to provide highlighting in your UI and
- understand where the context before ends and the document part begins.
+ description: "The tag that wraps the document part at the start. This is\
+ \ often used to \nprovide a start HTML/XML tag or some other delimiter\
+ \ you can use in an \napplication to understand where to provide highlighting\
+ \ in your UI and \nunderstand where the context before ends and the document\
+ \ part begins.\n"
type: string
example:
end_tag:
- description: |
- The tag that wraps the document part at the end. This is often used to
- provide a start HTML/XML tag or some other delimiter you can use in an
- application to understand where to provide highlighting in your UI and
- understand where the context before ends and the document part begins.
+ description: "The tag that wraps the document part at the end. This is often\
+ \ used to \nprovide a start HTML/XML tag or some other delimiter you can\
+ \ use in an \napplication to understand where to provide highlighting\
+ \ in your UI and \nunderstand where the context before ends and the document\
+ \ part begins.\n"
type: string
example:
GenerationParameters:
@@ -2379,93 +2568,103 @@ components:
type: object
properties:
generation_preset_name:
- description: |
- The preset values to use to feed the query results and other context to the model.
-
- A `generation_preset` is an object with a bundle of properties that specifies:
- * The `prompt_template` that is rendered and then sent to the LLM.
- * The LLM used.
- * `model_parameter`s such as temperature.
-
- All of these properties except the model can be overridden by setting them in this
- object. Even when a `prompt_template` is set, the `generation_preset_name` is used to set
- the model used.
-
- If `generation_preset_name` is not set, the Vectara platform will use the default model and
- prompt.
+ description: "The preset values to use to feed the query results and other\
+ \ context to the model.\n\nA `generation_preset` is an object with a bundle\
+ \ of properties that specifies:\n * The `prompt_template` that is rendered\
+ \ and then sent to the LLM.\n * The LLM used.\n * `model_parameter`s\
+ \ such as temperature.\n \nAll of these properties except the model can\
+ \ be overridden by setting them in this\nobject. Even when a `prompt_template`\
+ \ is set, the `generation_preset_name` is used to set \nthe model used.\n\
+ \nIf `generation_preset_name` is not set, the Vectara platform will use\
+ \ the default model and\nprompt.\n"
type: string
minLength: 1
example: vectara-summary-ext-v1.2.0
prompt_name:
- description: |
- Use `generation_preset_name` instead of `prompt_name`.
+ description: 'Use `generation_preset_name` instead of `prompt_name`.
+
+ '
type: string
minLength: 1
example: vectara-summary-ext-v1.2.0
deprecated: true
max_used_search_results:
- description: The maximum number of search results to be available to the prompt.
+ description: The maximum number of search results to be available to the
+ prompt.
type: integer
format: int32
minimum: 0
default: 5
prompt_template:
- description: |
- Vectara manages both system and user roles and prompts for the generative
- LLM out of the box by default. However, Scale customers can override the
- `prompt_template` via this variable. The `prompt_template` is in the form of an
+ description: 'Vectara manages both system and user roles and prompts for
+ the generative
+
+ LLM out of the box by default. However, users can override the
+
+ `prompt_template` via this variable. The `prompt_template` is in the form
+ of an
+
Apache Velocity template. For more details on how to configure the
+
`prompt_template`, see the [long-form documentation](https://docs.vectara.com/docs/prompts/vectara-prompt-engine).
- See [pricing](https://vectara.com/pricing/) for more details on becoming a Scale customer.
- type: string
- example: |
- [
- {"role": "system", "content": "You are a helpful search assistant."},
- #foreach ($qResult in $vectaraQueryResults)
- {"role": "user", "content": "Given the $vectaraIdxWord[$foreach.index] search result."},
- {"role": "assistant", "content": "${qResult.getText()}" },
- #end
- {"role": "user", "content": "Generate a summary for the query '${vectaraQuery}' based on the above results."}
- ]
+
+ '
+ type: string
+ example: "[\n {\"role\": \"system\", \"content\": \"You are a helpful search\
+ \ assistant.\"},\n #foreach ($qResult in $vectaraQueryResults)\n \
+ \ {\"role\": \"user\", \"content\": \"Given the $vectaraIdxWord[$foreach.index]\
+ \ search result.\"},\n {\"role\": \"assistant\", \"content\": \"${qResult.getText()}\"\
+ \ },\n #end\n {\"role\": \"user\", \"content\": \"Generate a summary\
+ \ for the query '${vectaraQuery}' based on the above results.\"}\n]\n"
prompt_text:
- description: |
- This property is deprecated in favor of clearer naming. Use `prompt_template`. This property will be
+ description: 'This property is deprecated in favor of clearer naming. Use
+ `prompt_template`. This property will be
+
ignored if `prompt_template` is set.
- type: string
- example: |
- [
- {"role": "system", "content": "You are a helpful search assistant."},
- #foreach ($qResult in $vectaraQueryResults)
- {"role": "user", "content": "Given the $vectaraIdxWord[$foreach.index] search result."},
- {"role": "assistant", "content": "${qResult.getText()}" },
- #end
- {"role": "user", "content": "Generate a summary for the query '${vectaraQuery}' based on the above results."}
- ]
+
+ '
+ type: string
+ example: "[\n {\"role\": \"system\", \"content\": \"You are a helpful search\
+ \ assistant.\"},\n #foreach ($qResult in $vectaraQueryResults)\n \
+ \ {\"role\": \"user\", \"content\": \"Given the $vectaraIdxWord[$foreach.index]\
+ \ search result.\"},\n {\"role\": \"assistant\", \"content\": \"${qResult.getText()}\"\
+ \ },\n #end\n {\"role\": \"user\", \"content\": \"Generate a summary\
+ \ for the query '${vectaraQuery}' based on the above results.\"}\n]\n"
deprecated: true
max_response_characters:
- description: |
- Controls the length of the generated output.
- This is a rough estimate and not a hard limit: the end output can be longer or shorter
- than this value. This is generally implemented by including the `max_response_characters` in the
- prompt, and the LLM's instruction following capability dictates how closely the generated output
+ description: 'Controls the length of the generated output.
+
+ This is a rough estimate and not a hard limit: the end output can be longer
+ or shorter
+
+ than this value. This is generally implemented by including the `max_response_characters`
+ in the
+
+ prompt, and the LLM''s instruction following capability dictates how closely
+ the generated output
+
is limited.
- This is currently a Scale-only feature.
- See [pricing](https://vectara.com/pricing/) for more details on becoming a Scale customer.
+ '
type: integer
format: int32
example: 300
minimum: 0
response_language:
- $ref: "#/components/schemas/Language"
+ $ref: '#/components/schemas/Language'
model_parameters:
title: ModelParameters
- description: |
- The parameters for the model. These are currently a Scale-only feature.
- See [pricing](https://vectara.com/pricing/) for more details on becoming a Scale customer.
- WARNING: This is an experimental feature, and breakable at any point with virtually no
- notice. It is meant for experimentation to converge on optimal parameters that can then
+ description: 'The parameters for the model.
+
+ WARNING: This is an experimental feature, and breakable at any point with
+ virtually no
+
+ notice. It is meant for experimentation to converge on optimal parameters
+ that can then
+
be set in the prompt definitions.
+
+ '
type: object
properties:
max_tokens:
@@ -2474,25 +2673,34 @@ components:
format: int32
minimum: 1
temperature:
- description: |
- The sampling temperature to use. Higher values make the output more random, while lower
+ description: 'The sampling temperature to use. Higher values make the
+ output more random, while lower
+
values make it more focused and deterministic.
+
+ '
type: number
format: float
frequency_penalty:
- description: |
- Higher values penalize new tokens based on their existing frequency in the text so far,
- decreasing the model's likelihood to repeat the same line verbatim.
+ description: 'Higher values penalize new tokens based on their existing
+ frequency in the text so far,
+
+ decreasing the model''s likelihood to repeat the same line verbatim.
+
+ '
type: number
format: float
presence_penalty:
- description: |
- Higher values penalize new tokens based on whether they appear in the text so far,
- increasing the model's likelihood to talk about new topics.
+ description: 'Higher values penalize new tokens based on whether they
+ appear in the text so far,
+
+ increasing the model''s likelihood to talk about new topics.
+
+ '
type: number
format: float
citations:
- $ref: "#/components/schemas/CitationParameters"
+ $ref: '#/components/schemas/CitationParameters'
enable_factual_consistency_score:
description: Enable returning the factual consistency score with query results.
type: boolean
@@ -2502,216 +2710,278 @@ components:
type: object
properties:
style:
- description: |
- The citation style to be used in summary.
+ description: 'The citation style to be used in summary.
+
Can be one of:
+
* `numeric` - Citations formatted as simple numerals: \[1\], \[2\] ...
+
* `none` - Citations removed from text.
+
* `html` - Citation formatted as a URL like `
text_pattern`.
+
* `markdown` - Formatted as `[text_pattern](url_pattern)`.
+
+ '
type: string
enum:
- - none
- - numeric
- - html
- - markdown
+ - none
+ - numeric
+ - html
+ - markdown
url_pattern:
- description: |
- The URL pattern if the citation_style is set to `html` or `markdown`.
+ description: 'The URL pattern if the citation_style is set to `html` or
+ `markdown`.
+
The pattern can access metadata attributes in the document or part.
+
e.g. `https://my.doc/foo/{doc.id}/{part.id}`
+
The default `url_pattern` is an empty string.
+
+ '
type: string
example: https://vectara.com/documents/{doc.id}
text_pattern:
- description: |
- The text pattern if the citation_style is set to `html` or `markdown`.
+ description: 'The text pattern if the citation_style is set to `html` or
+ `markdown`.
+
This pattern sets the href for HTML or the text within `[]` in markdown,
+
and defaults to N being the index of result if it is not set.
+
The default citation style looks like `[N](
)` for markdown.
+
You can use metadata attributes in the `text_pattern`. For example,
+
the pattern `{doc.title}` with citation style `markdown` would result
+
in final citation output like `[Title]()` when
- the document's metadata includes `{"title":"Title"}`.
+
+ the document''s metadata includes `{"title":"Title"}`.
+
+ '
type: string
- example: "{doc.title}"
+ example: '{doc.title}'
QueryRequest:
description: Query one or more corpora.
type: object
properties:
query:
- description: The search query string, which is the question the user is asking.
+ description: The search query string, which is the question the user is
+ asking.
type: string
example: Am I allowed to bring pets to work?
search:
- $ref: "#/components/schemas/SearchCorporaParameters"
+ $ref: '#/components/schemas/SearchCorporaParameters'
generation:
- $ref: "#/components/schemas/GenerationParameters"
+ $ref: '#/components/schemas/GenerationParameters'
stream_response:
description: Indicates whether the response should be streamed or not.
type: boolean
default: false
required:
- - query
- - search
+ - query
+ - search
SearchCorporaParameters:
description: The parameters to search one or more corpora.
allOf:
- - type: object
- properties:
- corpora:
- description: The corpora that you want to search.
- type: array
- items:
- $ref: "#/components/schemas/KeyedSearchCorpus"
- minItems: 1
- - $ref: "#/components/schemas/SearchParameters"
+ - type: object
+ properties:
+ corpora:
+ description: The corpora that you want to search.
+ type: array
+ items:
+ $ref: '#/components/schemas/KeyedSearchCorpus'
+ minItems: 1
+ - $ref: '#/components/schemas/SearchParameters'
required:
- - corpora
+ - corpora
QueryCorpusRequest:
type: object
properties:
query:
- description: The search query string, which is the question the user is asking.
+ description: The search query string, which is the question the user is
+ asking.
type: string
search:
title: SearchCorpusParameters
description: The parameters to search one corpus.
allOf:
- - $ref: "#/components/schemas/SearchCorpus"
- - $ref: "#/components/schemas/SearchParameters"
+ - $ref: '#/components/schemas/SearchCorpus'
+ - $ref: '#/components/schemas/SearchParameters'
generation:
- $ref: "#/components/schemas/GenerationParameters"
+ $ref: '#/components/schemas/GenerationParameters'
stream_response:
description: Indicates whether the response should be streamed or not.
type: boolean
default: false
required:
- - query
+ - query
SearchCorpus:
type: object
properties:
custom_dimensions:
- $ref: "#/components/schemas/CustomDimensions"
+ $ref: '#/components/schemas/CustomDimensions'
metadata_filter:
- description: |
- The filter string used to narrow the search based on metadata attributes. The query against this
- corpus will be confined to document parts that match the `metadata_filter`. Only metadata fields
- set as `filter_attributes` on the corpus can be filtered. Filter syntax is similar to
+ description: 'The filter string used to narrow the search based on metadata
+ attributes. The query against this
+
+ corpus will be confined to document parts that match the `metadata_filter`.
+ Only metadata fields
+
+ set as `filter_attributes` on the corpus can be filtered. Filter syntax
+ is similar to
+
a SQL WHERE clause. See [metadata filters documentation](https://docs.vectara.com/docs/learn/metadata-search-filtering/filter-overview)
+
for more information.
+
+ '
type: string
example: doc.title = 'Charlotte''s Web'
lexical_interpolation:
- description: How much to weigh lexical scores compared to the embedding score. 0 means lexical search is not used at all, and 1 means only lexical search is used.
+ description: How much to weigh lexical scores compared to the embedding
+ score. 0 means lexical search is not used at all, and 1 means only lexical
+ search is used.
type: number
format: float
minimum: 0
maximum: 1
example: 0.025
semantics:
- $ref: "#/components/schemas/SearchSemantics"
+ $ref: '#/components/schemas/SearchSemantics'
SearchSemantics:
- description: Indicates whether to consider a query against this corpus as a query or a response.
+ description: Indicates whether to consider a query against this corpus as a
+ query or a response.
type: string
enum:
- - default
- - query
- - response
+ - default
+ - query
+ - response
default: default
KeyedSearchCorpus:
allOf:
- - $ref: "#/components/schemas/SearchCorpus"
- - type: object
- properties:
- corpus_key:
- $ref: "#/components/schemas/CorpusKey"
+ - $ref: '#/components/schemas/SearchCorpus'
+ - type: object
+ properties:
+ corpus_key:
+ $ref: '#/components/schemas/CorpusKey'
required:
- - corpus_key
+ - corpus_key
SearchReranker:
type: object
- description: |
- Rerank results of the search. Rerankers are very powerful tools to improve the order of search results.
- By default the search will use the most powerful reranker available to the customer's plan.
+ description: 'Rerank results of the search. Rerankers are very powerful tools
+ to improve the order of search results.
+
+ By default the search will use the most powerful reranker available to the
+ customer''s plan.
+
To disable reranking, set the reranker `type` to `"none"`.
+
+ '
discriminator:
propertyName: type
mapping:
- customer_reranker: "#/components/schemas/CustomerSpecificReranker"
- userfn: "#/components/schemas/UserFunctionReranker"
- mmr: "#/components/schemas/MMRReranker"
- chain: "#/components/schemas/ChainReranker"
- none: "#/components/schemas/NoneReranker"
+ customer_reranker: '#/components/schemas/CustomerSpecificReranker'
+ userfn: '#/components/schemas/UserFunctionReranker'
+ mmr: '#/components/schemas/MMRReranker'
+ chain: '#/components/schemas/ChainReranker'
+ none: '#/components/schemas/NoneReranker'
oneOf:
- - $ref: "#/components/schemas/CustomerSpecificReranker"
- - $ref: "#/components/schemas/UserFunctionReranker"
- - $ref: "#/components/schemas/MMRReranker"
- - $ref: "#/components/schemas/ChainReranker"
- - $ref: "#/components/schemas/NoneReranker"
+ - $ref: '#/components/schemas/CustomerSpecificReranker'
+ - $ref: '#/components/schemas/UserFunctionReranker'
+ - $ref: '#/components/schemas/MMRReranker'
+ - $ref: '#/components/schemas/ChainReranker'
+ - $ref: '#/components/schemas/NoneReranker'
CustomerSpecificReranker:
description: Reranker that is specific to the customer.
type: object
properties:
type:
- description: |
- When the type is `customer_reranker`, you can specify the `reranker_name` of a reranker. `reranker_id` is deprecated.
+ description: 'When the type is `customer_reranker`, you can specify the
+ `reranker_name` of a reranker. `reranker_id` is deprecated.
+
The retrieval engine will then rerank results using that reranker.
+
+ '
type: string
default: customer_reranker
reranker_id:
- description: |
- The ID of the reranker. The multilingual reranker that may be used by Scale customers is rnk_272725719.
- Do not specify the MMR reranker ID here, and instead, use the MMR reranker object type.
+ description: 'The ID of the reranker. The multilingual reranker that may
+ be specified is rnk_272725719.
+
+ Do not specify the MMR reranker ID here, and instead, use the MMR reranker
+ object type.
+
**Deprecated**: Use `reranker_name` instead.
+
+ '
type: string
pattern: rnk_(?!272725718)\d+
example: rnk_272725719
deprecated: true
reranker_name:
- description: |
- The name of the reranker. Do not specify the MMR reranker name here. Instead, use the MMR reranker object type.
+ description: 'The name of the reranker. Do not specify the MMR reranker
+ name here. Instead, use the MMR reranker object type.
+
+ '
type: string
example: Rerank_Multilingual_v1
limit:
type: integer
- description: |
- Specifies the maximum number of results to be returned after the reranking process.
- When a reranker is applied, it performs the following steps:
- 1. Reranks all input results according to its algorithm.
- 2. Sorts the reranked results based on their new scores.
- 3. Returns the top N results, where N is the value specified by this limit.
-
- Note: This limit is applied per reranking stage. In a chain of rerankers,
- each reranker can have its own limit, potentially reducing the number of
- results at each stage.
+ description: "Specifies the maximum number of results to be returned after\
+ \ the reranking process. \nWhen a reranker is applied, it performs the\
+ \ following steps:\n1. Reranks all input results according to its algorithm.\n\
+ 2. Sorts the reranked results based on their new scores.\n3. Returns the\
+ \ top N results, where N is the value specified by this limit.\n\nNote:\
+ \ This limit is applied per reranking stage. In a chain of rerankers,\
+ \ \neach reranker can have its own limit, potentially reducing the number\
+ \ of \nresults at each stage.\n"
format: int32
minimum: 1
cutoff:
type: number
- description: |
- Specifies the minimum score threshold for results to be included after the reranking process.
+ description: 'Specifies the minimum score threshold for results to be included
+ after the reranking process.
+
When a reranker is applied with a cutoff, it performs the following steps:
+
1. Reranks all input results according to its algorithm.
- 2. Applies the cutoff, removing any results with scores below the specified threshold.
+
+ 2. Applies the cutoff, removing any results with scores below the specified
+ threshold.
+
3. Returns the remaining results, sorted by their new scores.
+
Note: This cutoff is applied per reranking stage. In a chain of rerankers,
- each reranker can have its own cutoff, potentially further reducing the number of
- results at each stage. If both 'limit' and 'cutoff' are specified, the cutoff
+
+ each reranker can have its own cutoff, potentially further reducing the
+ number of
+
+ results at each stage. If both ''limit'' and ''cutoff'' are specified,
+ the cutoff
+
is applied first, followed by the limit.
+
+ '
format: float
x-vectaraParents:
- - SearchReranker
+ - SearchReranker
UserFunctionReranker:
type: object
properties:
type:
- description: |
- When the type is `userfn`, you can define custom reranking functions using document-level metadata,
+ description: 'When the type is `userfn`, you can define custom reranking
+ functions using document-level metadata,
+
part-level metadata, or scores generated from the request-level metadata.
+
+ '
type: string
default: userfn
user_function:
@@ -2720,41 +2990,55 @@ components:
example: get('$.score') * get('$.document_metadata.boost')
limit:
type: integer
- description: |
- Specifies the maximum number of results to be returned after the reranking process.
- When a reranker is applied, it performs the following steps:
- 1. Reranks all input results according to its algorithm.
- 2. Sorts the reranked results based on their new scores.
- 3. Returns the top N results, where N is the value specified by this limit.
-
- Note: This limit is applied per reranking stage. In a chain of rerankers,
- each reranker can have its own limit, potentially reducing the number of
- results at each stage.
+ description: "Specifies the maximum number of results to be returned after\
+ \ the reranking process. \nWhen a reranker is applied, it performs the\
+ \ following steps:\n1. Reranks all input results according to its algorithm.\n\
+ 2. Sorts the reranked results based on their new scores.\n3. Returns the\
+ \ top N results, where N is the value specified by this limit.\n\nNote:\
+ \ This limit is applied per reranking stage. In a chain of rerankers,\
+ \ \neach reranker can have its own limit, potentially reducing the number\
+ \ of \nresults at each stage.\n"
format: int32
minimum: 1
cutoff:
type: number
- description: |
- Specifies the minimum score threshold for results to be included after the reranking process.
+ description: 'Specifies the minimum score threshold for results to be included
+ after the reranking process.
+
When a reranker is applied with a cutoff, it performs the following steps:
+
1. Reranks all input results according to its algorithm.
- 2. Applies the cutoff, removing any results with scores below the specified threshold.
+
+ 2. Applies the cutoff, removing any results with scores below the specified
+ threshold.
+
3. Returns the remaining results, sorted by their new scores.
+
Note: This cutoff is applied per reranking stage. In a chain of rerankers,
- each reranker can have its own cutoff, potentially further reducing the number of
- results at each stage. If both 'limit' and 'cutoff' are specified, the cutoff
+
+ each reranker can have its own cutoff, potentially further reducing the
+ number of
+
+ results at each stage. If both ''limit'' and ''cutoff'' are specified,
+ the cutoff
+
is applied first, followed by the limit.
+
+ '
format: float
x-vectaraParents:
- - SearchReranker
+ - SearchReranker
MMRReranker:
type: object
properties:
type:
- description: |
- When the type is `mmr`, you can specify the `diversity_bias`, and the
+ description: 'When the type is `mmr`, you can specify the `diversity_bias`,
+ and the
+
retrieval engine will use the MMR reranker.
+
+ '
type: string
default: mmr
diversity_bias:
@@ -2764,77 +3048,89 @@ components:
example: 0.3
limit:
type: integer
- description: |
- Specifies the maximum number of results to be returned after the reranking process.
- When a reranker is applied, it performs the following steps:
- 1. Reranks all input results according to its algorithm.
- 2. Sorts the reranked results based on their new scores.
- 3. Returns the top N results, where N is the value specified by this limit.
-
- Note: This limit is applied per reranking stage. In a chain of rerankers,
- each reranker can have its own limit, potentially reducing the number of
- results at each stage.
+ description: "Specifies the maximum number of results to be returned after\
+ \ the reranking process. \nWhen a reranker is applied, it performs the\
+ \ following steps:\n1. Reranks all input results according to its algorithm.\n\
+ 2. Sorts the reranked results based on their new scores.\n3. Returns the\
+ \ top N results, where N is the value specified by this limit.\n\nNote:\
+ \ This limit is applied per reranking stage. In a chain of rerankers,\
+ \ \neach reranker can have its own limit, potentially reducing the number\
+ \ of \nresults at each stage.\n"
format: int32
minimum: 1
cutoff:
type: number
- description: |
- Specifies the minimum score threshold for results to be included after the reranking process.
+ description: 'Specifies the minimum score threshold for results to be included
+ after the reranking process.
+
When a reranker is applied with a cutoff, it performs the following steps:
+
1. Reranks all input results according to its algorithm.
- 2. Applies the cutoff, removing any results with scores below the specified threshold.
+
+ 2. Applies the cutoff, removing any results with scores below the specified
+ threshold.
+
3. Returns the remaining results, sorted by their new scores.
+
Note: This cutoff is applied per reranking stage. In a chain of rerankers,
- each reranker can have its own cutoff, potentially further reducing the number of
- results at each stage. If both 'limit' and 'cutoff' are specified, the cutoff
+
+ each reranker can have its own cutoff, potentially further reducing the
+ number of
+
+ results at each stage. If both ''limit'' and ''cutoff'' are specified,
+ the cutoff
+
is applied first, followed by the limit.
+
+ '
format: float
x-vectaraParents:
- - SearchReranker
+ - SearchReranker
ChainReranker:
type: object
properties:
type:
- description: |
- When the type is `chain`, you can then chain re-rankers together.
+ description: 'When the type is `chain`, you can then chain re-rankers together.
+
+ '
type: string
default: chain
rerankers:
type: array
- description: |
- Specify an array of rerankers to apply to search results consecutively.
+ description: 'Specify an array of rerankers to apply to search results consecutively.
+
+ '
items:
- $ref: "#/components/schemas/SearchReranker"
+ $ref: '#/components/schemas/SearchReranker'
maxItems: 50
required:
- - rerankers
+ - rerankers
x-vectaraParents:
- - SearchReranker
+ - SearchReranker
NoneReranker:
type: object
properties:
type:
- description: |
- When the type is `none`, no reranking will be done.
+ description: 'When the type is `none`, no reranking will be done.
+
+ '
type: string
default: none
limit:
type: integer
- description: |
- Specifies the maximum number of results to be returned after the reranking process.
- When a reranker is applied, it performs the following steps:
- 1. Reranks all input results according to its algorithm.
- 2. Sorts the reranked results based on their new scores.
- 3. Returns the top N results, where N is the value specified by this limit.
-
- Note: This limit is applied per reranking stage. In a chain of rerankers,
- each reranker can have its own limit, potentially reducing the number of
- results at each stage.
+ description: "Specifies the maximum number of results to be returned after\
+ \ the reranking process. \nWhen a reranker is applied, it performs the\
+ \ following steps:\n1. Reranks all input results according to its algorithm.\n\
+ 2. Sorts the reranked results based on their new scores.\n3. Returns the\
+ \ top N results, where N is the value specified by this limit.\n\nNote:\
+ \ This limit is applied per reranking stage. In a chain of rerankers,\
+ \ \neach reranker can have its own limit, potentially reducing the number\
+ \ of \nresults at each stage.\n"
format: int32
minimum: 1
x-vectaraParents:
- - SearchReranker
+ - SearchReranker
QueryFullResponse:
description: The full response to a RAG query when the result is not streamed.
type: object
@@ -2843,28 +3139,32 @@ components:
description: The summary of the search results.
type: string
response_language:
- $ref: "#/components/schemas/Language"
+ $ref: '#/components/schemas/Language'
search_results:
description: The ranked search results.
type: array
items:
- $ref: "#/components/schemas/IndividualSearchResult"
+ $ref: '#/components/schemas/IndividualSearchResult'
factual_consistency_score:
- description: |
- The probability that the summary is factually consistent with the results.
+ description: 'The probability that the summary is factually consistent with
+ the results.
+
+ '
type: number
format: float
rendered_prompt:
- description: |
- The rendered prompt sent to the LLM. Useful when creating customer `prompt_text` templates. Only available
- to Scale customers.
+ description: 'The rendered prompt sent to the LLM. Useful when creating
+ customer `prompt_template` templates.
+
+ '
type: string
IndividualSearchResult:
description: An individual ranked search result from a query.
type: object
properties:
text:
- description: The document part altered by the context configuration that matches the query.
+ description: The document part altered by the context configuration that
+ matches the query.
type: string
score:
description: The score of the individual result.
@@ -2882,121 +3182,138 @@ components:
description: The ID of the document that contains the document part.
type: string
request_corpora_index:
- description: |
- A query request can search over multiple corpora at a time. This property
- is set to the index in the list of corpora in the original search request that this
- search result originated from.
-
- If the query request is only over one corpus, this property is 0.
+ description: "A query request can search over multiple corpora at a time.\
+ \ This property \nis set to the index in the list of corpora in the original\
+ \ search request that this\nsearch result originated from.\n\nIf the query\
+ \ request is only over one corpus, this property is 0.\n"
type: integer
format: int32
example: 0
minimum: 0
QueryStreamedResponse:
- description: An individual event sent with Server-sent Events (SSE) when the query request is streamed.
+ description: An individual event sent with Server-sent Events (SSE) when the
+ query request is streamed.
type: object
discriminator:
propertyName: type
mapping:
- search_results: "#/components/schemas/StreamSearchResponse"
- generation_chunk: "#/components/schemas/StreamGenerationChunk"
- generation_end: "#/components/schemas/StreamGenerationEnd"
- factual_consistency_score: "#/components/schemas/FactualConsistencyScore"
- generation_info: "#/components/schemas/GenerationInfo"
- error: "#/components/schemas/StreamError"
- end: "#/components/schemas/StreamResponseEnd"
+ search_results: '#/components/schemas/StreamSearchResponse'
+ generation_chunk: '#/components/schemas/StreamGenerationChunk'
+ generation_end: '#/components/schemas/StreamGenerationEnd'
+ factual_consistency_score: '#/components/schemas/FactualConsistencyScore'
+ generation_info: '#/components/schemas/GenerationInfo'
+ error: '#/components/schemas/StreamError'
+ end: '#/components/schemas/StreamResponseEnd'
oneOf:
- - $ref: "#/components/schemas/StreamSearchResponse"
- - $ref: "#/components/schemas/StreamGenerationChunk"
- - $ref: "#/components/schemas/StreamGenerationEnd"
- - $ref: "#/components/schemas/StreamResponseEnd"
- - $ref: "#/components/schemas/FactualConsistencyScore"
- - $ref: "#/components/schemas/GenerationInfo"
- - $ref: "#/components/schemas/StreamError"
+ - $ref: '#/components/schemas/StreamSearchResponse'
+ - $ref: '#/components/schemas/StreamGenerationChunk'
+ - $ref: '#/components/schemas/StreamGenerationEnd'
+ - $ref: '#/components/schemas/StreamResponseEnd'
+ - $ref: '#/components/schemas/FactualConsistencyScore'
+ - $ref: '#/components/schemas/GenerationInfo'
+ - $ref: '#/components/schemas/StreamError'
StreamSearchResponse:
description: The search response results.
type: object
properties:
type:
- description: |
- When the streaming event has the search results, the
+ description: 'When the streaming event has the search results, the
+
type will be `search_results`.
+
+ '
type: string
default: search_results
search_results:
description: The ranked search results.
type: array
items:
- $ref: "#/components/schemas/IndividualSearchResult"
+ $ref: '#/components/schemas/IndividualSearchResult'
x-vectaraParents:
- - QueryStreamedResponse
- - ChatStreamedResponse
+ - QueryStreamedResponse
+ - ChatStreamedResponse
StreamGenerationChunk:
- description: The chunk response from the generation, which may be a partial generation.
+ description: The chunk response from the generation, which may be a partial
+ generation.
type: object
properties:
type:
- description: |
- When the streaming event contains the next chunk of generator output, the
+ description: 'When the streaming event contains the next chunk of generator
+ output, the
+
type will be `generation_chunk`.
+
+ '
type: string
default: generation_chunk
generation_chunk:
- description: |
- Part of the message from the generator. All summary chunks must be appended together in order
+ description: 'Part of the message from the generator. All summary chunks
+ must be appended together in order
+
to get the full summary.
+
+ '
type: string
x-vectaraParents:
- - QueryStreamedResponse
- - ChatStreamedResponse
+ - QueryStreamedResponse
+ - ChatStreamedResponse
FactualConsistencyScore:
description: Event containing the factual consistency score.
type: object
properties:
type:
- description: |
- When the streaming event contains the factual consistency score, the
+ description: 'When the streaming event contains the factual consistency
+ score, the
+
type will be `factual_consistency_score`.
+
+ '
type: string
default: factual_consistency_score
factual_consistency_score:
- description: The probability that the summary is factually consistent with the results.
+ description: The probability that the summary is factually consistent with
+ the results.
type: number
format: float
x-vectaraParents:
- - QueryStreamedResponse
- - ChatStreamedResponse
+ - QueryStreamedResponse
+ - ChatStreamedResponse
GenerationInfo:
description: Event containing information on how the generation was accomplished.
type: object
properties:
type:
- description: |
- When the streaming event contains the generation information
+ description: 'When the streaming event contains the generation information
+
type will be `generation_info`.
+
+ '
type: string
default: generation_info
rendered_prompt:
- description: |
- The rendered prompt sent to the LLM. Useful when creating customer `prompt_text` templates. Only available
- to Scale customers.
+ description: 'The rendered prompt sent to the LLM. Useful when creating
+ customer `prompt_template` templates.
+
+ '
type: string
rephrased_query:
- description: |
- If you are on the Scale plan, you can view the actual query made to backend that was rephrased
- by the LLM from the input query.
+ description: "View the actual query made to backend that was rephrased \n\
+ by the LLM from the input query.\n"
type: string
x-vectaraParents:
- - QueryStreamedResponse
- - ChatStreamedResponse
+ - QueryStreamedResponse
+ - ChatStreamedResponse
StreamError:
- description: |
- Event signaling there was an error with the request.
+ description: 'Event signaling there was an error with the request.
+
+ '
properties:
type:
- description: |
- If the stream errors, an event with type `error` will
+ description: 'If the stream errors, an event with type `error` will
+
be sent.
+
+ '
type: string
default: error
messages:
@@ -3005,111 +3322,145 @@ components:
items:
type: string
x-vectaraParents:
- - QueryStreamedResponse
- - ChatStreamedResponse
+ - QueryStreamedResponse
+ - ChatStreamedResponse
StreamGenerationEnd:
- description: |
- The end of generation. There may still be more information such as the
+ description: 'The end of generation. There may still be more information such
+ as the
+
factual consistency score, but generation has stopped.
+
+ '
type: object
properties:
type:
- description: |
- Then end of generation will be denoted with an object
+ description: 'Then end of generation will be denoted with an object
+
with the type `generation_end`.
+
+ '
type: string
default: generation_end
x-vectaraParents:
- - QueryStreamedResponse
- - ChatStreamedResponse
+ - QueryStreamedResponse
+ - ChatStreamedResponse
StreamResponseEnd:
description: The end of a query response stream.
type: object
properties:
type:
- description: |
- Then end of stream will be denoted with an object
+ description: 'Then end of stream will be denoted with an object
+
with the type `end`.
+
+ '
type: string
default: end
x-vectaraParents:
- - QueryStreamedResponse
- - ChatStreamedResponse
+ - QueryStreamedResponse
+ - ChatStreamedResponse
UploadFileRequest:
type: object
properties:
metadata:
- description: Arbitrary object that will be attached as document metadata to the extracted document.
+ description: Arbitrary object that will be attached as document metadata
+ to the extracted document.
type: object
additionalProperties: true
chunking_strategy:
- $ref: "#/components/schemas/ChunkingStrategy"
+ $ref: '#/components/schemas/ChunkingStrategy'
filename:
description: Optional multipart section to override the filename.
type: string
file:
- description: Binary file contents. The file name of the file will be used as the document ID.
+ description: Binary file contents. The file name of the file will be used
+ as the document ID.
type: string
format: binary
required:
- - file
+ - file
ChunkingStrategy:
type: object
- description: |
- (Optional) Choose how to split documents into chunks during indexing. If you do not set a chunking strategy,
- the platform uses the default strategy which creates one chunk (docpart) per sentence.
+ description: '(Optional) Choose how to split documents into chunks during indexing.
+ If you do not set a chunking strategy,
+
+ the platform uses the default strategy which creates one chunk (docpart) per
+ sentence.
+
+ '
discriminator:
propertyName: type
mapping:
- max_chars_chunking_strategy: "#/components/schemas/MaxCharsChunkingStrategy"
+ max_chars_chunking_strategy: '#/components/schemas/MaxCharsChunkingStrategy'
oneOf:
- - $ref: "#/components/schemas/MaxCharsChunkingStrategy"
+ - $ref: '#/components/schemas/MaxCharsChunkingStrategy'
MaxCharsChunkingStrategy:
type: object
- description: |
- Sets a chunking strategy that limits the number of maximum characters per chunk.
+ description: 'Sets a chunking strategy that limits the number of maximum characters
+ per chunk.
+
The chunks do not cross section boundaries.
+
+ '
properties:
type:
- description: |
- When setting the type to max_chars_chunking_strategy, you can control the size of chunks (docparts).
+ description: 'When setting the type to max_chars_chunking_strategy, you
+ can control the size of chunks (docparts).
+
+ '
type: string
default: max_chars_chunking_strategy
max_chars_per_chunk:
- description: |
- Specifies the maximum number of characters per chunk.
+ description: 'Specifies the maximum number of characters per chunk.
+
+
+ The platform adds sentences to a chunk until the total number of characters
+ exceeds the limit.
+
- The platform adds sentences to a chunk until the total number of characters exceeds the limit.
+ If a single sentence exceeds the limit, it splits the sentence across
+ chunks.
- If a single sentence exceeds the limit, it splits the sentence across chunks.
- Note: This is the only case where the chunk may not contain a complete sentence.
+ Note: This is the only case where the chunk may not contain a complete
+ sentence.
+
+ '
type: integer
format: int32
minimum: 100
required:
- - max_chars_per_chunk
+ - max_chars_per_chunk
x-vectaraParents:
- - ChunkingStrategy
+ - ChunkingStrategy
CreateDocumentRequest:
- description: |
- Creating a document using this endpoint can take multiple forms depending on how much
+ description: 'Creating a document using this endpoint can take multiple forms
+ depending on how much
+
control of the resulting document parts you desire. You can create a document
- with natural structure, and Vectara will use its proprietary strategy to create document parts.
- Otherwise, you can create a document with all the document parts explicitly specified.
+ with natural structure, and Vectara will use its proprietary strategy to create
+ document parts.
+
+
+ Otherwise, you can create a document with all the document parts explicitly
+ specified.
- A document part is the search result item in search and Retrieval Augmented Generation endpoints.
+
+ A document part is the search result item in search and Retrieval Augmented
+ Generation endpoints.
+
+ '
type: object
discriminator:
propertyName: type
mapping:
- core: "#/components/schemas/CoreDocument"
- structured: "#/components/schemas/StructuredDocument"
+ core: '#/components/schemas/CoreDocument'
+ structured: '#/components/schemas/StructuredDocument'
oneOf:
- - $ref: "#/components/schemas/CoreDocument"
- - $ref: "#/components/schemas/StructuredDocument"
+ - $ref: '#/components/schemas/CoreDocument'
+ - $ref: '#/components/schemas/StructuredDocument'
required:
- - type
+ - type
StructuredDocument:
description: A document with layout features.
type: object
@@ -3118,11 +3469,17 @@ components:
description: The document ID must be unique within the corpus.
type: string
type:
- description: |
- When the type of the indexed document is `structured` the rest of
- the object is expected to follow this schema. It allows you to create a document
+ description: 'When the type of the indexed document is `structured` the
+ rest of
+
+ the object is expected to follow this schema. It allows you to create
+ a document
+
that follows normal document conventions. The Vectara platform will then
+
create document parts using its internal algorithm.
+
+ '
default: structured
type: string
title:
@@ -3132,27 +3489,30 @@ components:
description: The description of the document.
type: string
metadata:
- description: |
- The metadata for a document as an arbitrary JSON object. Properties of this object
+ description: 'The metadata for a document as an arbitrary JSON object. Properties
+ of this object
+
can be used by document level filter attributes.
+
+ '
type: object
additionalProperties: true
custom_dimensions:
- $ref: "#/components/schemas/CustomDimensions"
+ $ref: '#/components/schemas/CustomDimensions'
sections:
description: The subsection of the document.
type: array
minItems: 1
items:
- $ref: "#/components/schemas/StructuredDocumentSection"
+ $ref: '#/components/schemas/StructuredDocumentSection'
chunking_strategy:
- $ref: "#/components/schemas/ChunkingStrategy"
+ $ref: '#/components/schemas/ChunkingStrategy'
required:
- - id
- - type
- - sections
+ - id
+ - type
+ - sections
x-vectaraParents:
- - CreateDocumentRequest
+ - CreateDocumentRequest
StructuredDocumentSection:
description: A logical section within a structured document.
type: object
@@ -3168,10 +3528,10 @@ components:
description: The text of the section.
type: string
metadata:
- description: |
- Arbitrary object that becomes document part level metadata on any document part created
- by this section. Properties of this object can be used by document part level
- filters if defined as a corpus filter attribute.
+ description: "Arbitrary object that becomes document part level metadata\
+ \ on any document part created \nby this section. Properties of this object\
+ \ can be used by document part level \nfilters if defined as a corpus\
+ \ filter attribute.\n"
type: object
properties: {}
additionalProperties: true
@@ -3179,11 +3539,12 @@ components:
description: The sections that this section contains.
type: array
items:
- $ref: "#/components/schemas/StructuredDocumentSection"
+ $ref: '#/components/schemas/StructuredDocumentSection'
required:
- - text
+ - text
CoreDocument:
- description: The document structure that most closely corresponds to Vectara's internal document data model.
+ description: The document structure that most closely corresponds to Vectara's
+ internal document data model.
type: object
properties:
id:
@@ -3191,17 +3552,24 @@ components:
type: string
example: my-doc-id
type:
- description: |
- When the type of the indexed document is `core` the rest of
+ description: 'When the type of the indexed document is `core` the rest of
+
the object is expected to follow this schema. This schema allows
+
precise specification of document chunks that get directly translated
+
to retrieve search results.
+
+ '
default: core
type: string
metadata:
- description: |
- Arbitrary object of document level metadata. Properties of this object
+ description: 'Arbitrary object of document level metadata. Properties of
+ this object
+
can be used by document filters if defined as a corpus filter attribute.
+
+ '
type: object
properties: {}
additionalProperties: true
@@ -3213,15 +3581,16 @@ components:
type: array
minItems: 1
items:
- $ref: "#/components/schemas/CoreDocumentPart"
+ $ref: '#/components/schemas/CoreDocumentPart'
required:
- - id
- - type
- - document_parts
+ - id
+ - type
+ - document_parts
x-vectaraParents:
- - CreateDocumentRequest
+ - CreateDocumentRequest
DocumentPart:
- description: A part of a document. This section gets converted into an embedding and directly maps to a search result. Usually a sentence.
+ description: A part of a document. This section gets converted into an embedding
+ and directly maps to a search result. Usually a sentence.
type: object
properties:
text:
@@ -3229,7 +3598,8 @@ components:
type: string
example: I'm a nice document part.
metadata:
- description: The metadata for a document part. These may be used in metadata filters at query time if filter attributes are configured on the corpus.
+ description: The metadata for a document part. These may be used in metadata
+ filters at query time if filter attributes are configured on the corpus.
type: object
additionalProperties: true
example:
@@ -3238,11 +3608,12 @@ components:
description: The context text for the document part.
type: string
custom_dimensions:
- $ref: "#/components/schemas/CustomDimensions"
+ $ref: '#/components/schemas/CustomDimensions'
required:
- - text
+ - text
CoreDocumentPart:
- description: A part of a document. This section gets converted into an embedding and directly maps to a search result. Usually this is a sentence.
+ description: A part of a document. This section gets converted into an embedding
+ and directly maps to a search result. Usually this is a sentence.
type: object
properties:
text:
@@ -3250,7 +3621,8 @@ components:
type: string
example: I'm a nice document part.
metadata:
- description: The metadata for a document part. These may be used in metadata filters at query time if filter attributes are configured on the corpus.
+ description: The metadata for a document part. These may be used in metadata
+ filters at query time if filter attributes are configured on the corpus.
type: object
additionalProperties: true
example:
@@ -3259,9 +3631,9 @@ components:
description: The context text for the document part.
type: string
custom_dimensions:
- $ref: "#/components/schemas/CustomDimensions"
+ $ref: '#/components/schemas/CustomDimensions'
required:
- - text
+ - text
CustomDimensions:
description: The custom dimensions as additional weights.
type: object
@@ -3280,31 +3652,43 @@ components:
type: object
additionalProperties: true
parts:
- description: |
- Parts of the document that make up the document. However, parts are not available when
- retrieving a list of documents or when creating a document. This property is only available
+ description: 'Parts of the document that make up the document. However,
+ parts are not available when
+
+ retrieving a list of documents or when creating a document. This property
+ is only available
+
when retrieving a document by ID.
+
+ '
type: array
items:
- $ref: "#/components/schemas/DocumentPart"
+ $ref: '#/components/schemas/DocumentPart'
storage_usage:
- $ref: "#/components/schemas/DocumentStorageUsage"
+ $ref: '#/components/schemas/DocumentStorageUsage'
DocumentStorageUsage:
type: object
- description: |
- How much storage the document used. This information is currently not returned when
+ description: 'How much storage the document used. This information is currently
+ not returned when
+
retrieving the document, and only returned when indexing a document.
+
+ '
properties:
bytes_used:
- description: |
- Number of bytes used by document counting towards maximum corpus size, and
+ description: 'Number of bytes used by document counting towards maximum
+ corpus size, and
+
towards any billing plans.
+
+ '
type: integer
format: int64
minimum: 0
metadata_bytes_used:
- description: |
- Number of metadata bytes used by a document.
+ description: 'Number of metadata bytes used by a document.
+
+ '
type: integer
format: int64
minimum: 0
@@ -3315,13 +3699,16 @@ components:
description: List of documents.
type: array
items:
- $ref: "#/components/schemas/Document"
+ $ref: '#/components/schemas/Document'
metadata:
- $ref: "#/components/schemas/ListMetadata"
+ $ref: '#/components/schemas/ListMetadata'
LLM:
- description: |
- A LLM can be used to enhance query results with a response, and be used as
+ description: 'A LLM can be used to enhance query results with a response, and
+ be used as
+
the responder during a chat.
+
+ '
type: object
properties:
id:
@@ -3338,20 +3725,29 @@ components:
description: Indicates whether the LLM is enabled.
type: boolean
default:
- description: |
- If this is the default LLM, it is used in queries when the generator
+ description: 'If this is the default LLM, it is used in queries when the
+ generator
+
is not specified.
+
+ '
type: boolean
prompts:
- description: List of prompts that the model can use. This is deprecated; see `/v2/generation_presets` instead.
+ description: List of prompts that the model can use. This is deprecated;
+ see `/v2/generation_presets` instead.
items:
- $ref: "#/components/schemas/Prompt"
+ $ref: '#/components/schemas/Prompt'
deprecated: true
Prompt:
- description: |
- A prompt that can be used with a LLM. A prompt is the template that is used to render
- the text sent to the LLM. It also contains various default model settings such as
+ description: 'A prompt that can be used with a LLM. A prompt is the template
+ that is used to render
+
+ the text sent to the LLM. It also contains various default model settings
+ such as
+
temperature.
+
+ '
type: object
properties:
id:
@@ -3359,7 +3755,8 @@ components:
type: string
pattern: pmt_.*
name:
- description: Name of the prompt. This is used as the `prompt_name` in a query.
+ description: Name of the prompt. This is used as the `prompt_name` in a
+ query.
type: string
description:
description: The description of the prompt.
@@ -3368,7 +3765,8 @@ components:
description: Indicates whether the prompt is enabled.
type: boolean
default:
- description: Indicates if this prompt is the default prompt used with the LLM.
+ description: Indicates if this prompt is the default prompt used with the
+ LLM.
type: boolean
ListLLMsResponse:
type: object
@@ -3377,13 +3775,16 @@ components:
description: List of LLMs.
type: array
items:
- $ref: "#/components/schemas/LLM"
+ $ref: '#/components/schemas/LLM'
metadata:
- $ref: "#/components/schemas/ListMetadata"
+ $ref: '#/components/schemas/ListMetadata'
GenerationPreset:
- description: |
- Bundle of default values used when calling generation. All values except
+ description: 'Bundle of default values used when calling generation. All values
+ except
+
model name can be overridden at generation time.
+
+ '
type: object
properties:
name:
@@ -3399,7 +3800,8 @@ components:
description: Preset template used to render the prompt sent to generation.
type: string
max_used_search_results:
- description: Preset maximum number of search results that will be available to the prompt.
+ description: Preset maximum number of search results that will be available
+ to the prompt.
type: integer
format: int32
minimum: 1
@@ -3409,28 +3811,38 @@ components:
format: int32
minimum: 1
temperature:
- description: |
- The sampling temperature to use. Higher values make the output more random, while lower
+ description: 'The sampling temperature to use. Higher values make the output
+ more random, while lower
+
values make it more focused and deterministic.
+
+ '
type: number
format: float
frequency_penalty:
- description: |
- Higher values penalize new tokens based on their existing frequency in the generation so far,
- decreasing the model's likelihood to repeat the same line verbatim.
+ description: 'Higher values penalize new tokens based on their existing
+ frequency in the generation so far,
+
+ decreasing the model''s likelihood to repeat the same line verbatim.
+
+ '
type: number
format: float
presence_penalty:
- description: |
- Higher values penalize new tokens based on whether they appear in the generation so far,
- increasing the model's likelihood to talk about new topics.
+ description: 'Higher values penalize new tokens based on whether they appear
+ in the generation so far,
+
+ increasing the model''s likelihood to talk about new topics.
+
+ '
type: number
format: float
enabled:
description: Indicates whether the prompt is enabled.
type: boolean
default:
- description: Indicates if this prompt is the default prompt used with the LLM.
+ description: Indicates if this prompt is the default prompt used with the
+ LLM.
type: boolean
ListGenerationPresetsResponse:
type: object
@@ -3439,9 +3851,9 @@ components:
description: List of generation presets.
type: array
items:
- $ref: "#/components/schemas/GenerationPreset"
+ $ref: '#/components/schemas/GenerationPreset'
metadata:
- $ref: "#/components/schemas/ListMetadata"
+ $ref: '#/components/schemas/ListMetadata'
ChatRequest:
type: object
properties:
@@ -3450,18 +3862,18 @@ components:
type: string
example: How can I use the Vectara platform?
search:
- $ref: "#/components/schemas/SearchCorporaParameters"
+ $ref: '#/components/schemas/SearchCorporaParameters'
generation:
- $ref: "#/components/schemas/GenerationParameters"
+ $ref: '#/components/schemas/GenerationParameters'
chat:
- $ref: "#/components/schemas/ChatParameters"
+ $ref: '#/components/schemas/ChatParameters'
stream_response:
description: Indicates whether the response should be streamed or not.
type: boolean
default: false
required:
- - query
- - search
+ - query
+ - search
ChatParameters:
type: object
description: Parameters to control chat behavior.
@@ -3485,26 +3897,26 @@ components:
type: string
response_language:
description: The language that the answer is expected to be.
- $ref: "#/components/schemas/Language"
+ $ref: '#/components/schemas/Language'
search_results:
description: The ranked search results that the chat model used.
type: array
items:
- $ref: "#/components/schemas/IndividualSearchResult"
+ $ref: '#/components/schemas/IndividualSearchResult'
factual_consistency_score:
- description: |
- The probability that the summary is factually consistent with the results.
+ description: 'The probability that the summary is factually consistent with
+ the results.
+
+ '
type: number
format: float
rendered_prompt:
- description: |
- The rendered prompt sent to the LLM. Useful when creating customer `prompt_text` templates. Only available
- to Scale customers.
+ description: "The rendered prompt sent to the LLM. Useful when creating\
+ \ customer `prompt_template` templates. \n"
type: string
rephrased_query:
- description: |
- If you are on the Scale plan, you can view the actual query made to backend that was rephrased
- by the LLM from the input query.
+ description: "View the actual query made to backend that was rephrased \n\
+ by the LLM from the input query.\n"
type: string
ChatStreamedResponse:
description: An individual event when the response is streamed.
@@ -3512,31 +3924,33 @@ components:
discriminator:
propertyName: type
mapping:
- search_results: "#/components/schemas/StreamSearchResponse"
- chat_info: "#/components/schemas/ChatInfoResponse"
- generation_chunk: "#/components/schemas/StreamGenerationChunk"
- generation_end: "#/components/schemas/StreamGenerationEnd"
- generation_info: "#/components/schemas/GenerationInfo"
- factual_consistency_score: "#/components/schemas/FactualConsistencyScore"
- end: "#/components/schemas/StreamResponseEnd"
- error: "#/components/schemas/StreamError"
+ search_results: '#/components/schemas/StreamSearchResponse'
+ chat_info: '#/components/schemas/ChatInfoResponse'
+ generation_chunk: '#/components/schemas/StreamGenerationChunk'
+ generation_end: '#/components/schemas/StreamGenerationEnd'
+ generation_info: '#/components/schemas/GenerationInfo'
+ factual_consistency_score: '#/components/schemas/FactualConsistencyScore'
+ end: '#/components/schemas/StreamResponseEnd'
+ error: '#/components/schemas/StreamError'
oneOf:
- - $ref: "#/components/schemas/StreamSearchResponse"
- - $ref: "#/components/schemas/ChatInfoResponse"
- - $ref: "#/components/schemas/StreamGenerationChunk"
- - $ref: "#/components/schemas/StreamGenerationEnd"
- - $ref: "#/components/schemas/FactualConsistencyScore"
- - $ref: "#/components/schemas/StreamResponseEnd"
- - $ref: "#/components/schemas/GenerationInfo"
- - $ref: "#/components/schemas/StreamError"
+ - $ref: '#/components/schemas/StreamSearchResponse'
+ - $ref: '#/components/schemas/ChatInfoResponse'
+ - $ref: '#/components/schemas/StreamGenerationChunk'
+ - $ref: '#/components/schemas/StreamGenerationEnd'
+ - $ref: '#/components/schemas/FactualConsistencyScore'
+ - $ref: '#/components/schemas/StreamResponseEnd'
+ - $ref: '#/components/schemas/GenerationInfo'
+ - $ref: '#/components/schemas/StreamError'
ChatInfoResponse:
description: Information about the chat.
type: object
properties:
type:
- description: |
- This will be `chat_info` when the stream event contains information
+ description: 'This will be `chat_info` when the stream event contains information
+
about how the chat is stored.
+
+ '
type: string
default: chat_info
chat_id:
@@ -3548,7 +3962,7 @@ components:
type: string
pattern: trn_.+$
x-vectaraParents:
- - ChatStreamedResponse
+ - ChatStreamedResponse
Chat:
type: object
properties:
@@ -3563,7 +3977,8 @@ components:
description: The first answer of the chat.
type: string
enabled:
- description: Indicates whether this chat is enabled and can have further turns.
+ description: Indicates whether this chat is enabled and can have further
+ turns.
type: boolean
example: true
created_at:
@@ -3577,9 +3992,9 @@ components:
description: List of chats.
type: array
items:
- $ref: "#/components/schemas/Chat"
+ $ref: '#/components/schemas/Chat'
metadata:
- $ref: "#/components/schemas/ListMetadata"
+ $ref: '#/components/schemas/ListMetadata'
Turn:
type: object
properties:
@@ -3600,7 +4015,8 @@ components:
type: string
example: The widget turns counter clockwise.
enabled:
- description: Indicates whether the turn is enabled and shown in future turns of the chat.
+ description: Indicates whether the turn is enabled and shown in future turns
+ of the chat.
type: boolean
example: true
created_at:
@@ -3614,14 +4030,17 @@ components:
description: List of turns.
type: array
items:
- $ref: "#/components/schemas/Turn"
+ $ref: '#/components/schemas/Turn'
UpdateTurnRequest:
type: object
properties:
enabled:
- description: |
- Indicates whether to disable a turn. It will disable this turn and all subsequent turns.
+ description: 'Indicates whether to disable a turn. It will disable this
+ turn and all subsequent turns.
+
Enabling a turn is not implemented.
+
+ '
type: boolean
example: false
ListEncodersResponse:
@@ -3630,9 +4049,9 @@ components:
encoders:
type: array
items:
- $ref: "#/components/schemas/Encoder"
+ $ref: '#/components/schemas/Encoder'
metadata:
- $ref: "#/components/schemas/ListMetadata"
+ $ref: '#/components/schemas/ListMetadata'
CreateApiKeyRequest:
type: object
properties:
@@ -3640,18 +4059,22 @@ components:
description: The human-readable name of the API key.
type: string
api_key_role:
- $ref: "#/components/schemas/ApiKeyRole"
+ $ref: '#/components/schemas/ApiKeyRole'
corpus_keys:
- description: |
- Corpora this API key has roles on if it is not a Personal API key.
+ description: 'Corpora this API key has roles on if it is not a Personal
+ API key.
+
This property should be null or missing if this `api_key_role` is
+
`personal`.
+
+ '
type: array
items:
- $ref: "#/components/schemas/CorpusKey"
+ $ref: '#/components/schemas/CorpusKey'
required:
- - name
- - api_key_role
+ - name
+ - api_key_role
ApiKey:
type: object
properties:
@@ -3669,20 +4092,19 @@ components:
description: If this API key is enabled.
type: boolean
api_key_role:
- $ref: "#/components/schemas/ApiKeyRole"
+ $ref: '#/components/schemas/ApiKeyRole'
api_policy:
- $ref: "#/components/schemas/ApiPolicy"
+ $ref: '#/components/schemas/ApiPolicy'
ApiKeyRole:
- description: |
- Role of the API key.
- A serving API key can only perform query type requests on its corpora. A serving and
- indexing key can perform both indexing and query type requests on its corpora.
- A personal API key has all the same permissions as the creator of the API key.
+ description: "Role of the API key. \nA serving API key can only perform query\
+ \ type requests on its corpora. A serving and\nindexing key can perform both\
+ \ indexing and query type requests on its corpora.\nA personal API key has\
+ \ all the same permissions as the creator of the API key.\n"
type: string
enum:
- - serving
- - serving_and_indexing
- - personal
+ - serving
+ - serving_and_indexing
+ - personal
UpdateApiKeyRequest:
type: object
properties:
@@ -3696,21 +4118,22 @@ components:
description: List of API keys.
type: array
items:
- $ref: "#/components/schemas/ApiKey"
+ $ref: '#/components/schemas/ApiKey'
metadata:
- $ref: "#/components/schemas/ListMetadata"
+ $ref: '#/components/schemas/ListMetadata'
CreateAppClientRequest:
type: object
discriminator:
propertyName: type
mapping:
- client_credentials: "#/components/schemas/CreateClientCredentialsRequest"
+ client_credentials: '#/components/schemas/CreateClientCredentialsRequest'
oneOf:
- - $ref: "#/components/schemas/CreateClientCredentialsRequest"
+ - $ref: '#/components/schemas/CreateClientCredentialsRequest'
required:
- - type
+ - type
CreateClientCredentialsRequest:
- description: Create an App Client which allows you to call Vectara APIs using OAuth 2.0 client credentials.
+ description: Create an App Client which allows you to call Vectara APIs using
+ OAuth 2.0 client credentials.
type: object
properties:
name:
@@ -3727,19 +4150,21 @@ components:
description: API roles that the client credentials will have.
type: array
items:
- $ref: "#/components/schemas/ApiRole"
+ $ref: '#/components/schemas/ApiRole'
required:
- - name
- - type
+ - name
+ - type
x-vectaraParents:
- - CreateAppClientRequest
+ - CreateAppClientRequest
AppClient:
type: object
properties:
id:
- description: |
- The Vectara App Client ID. This ID is not used during an OAuth
+ description: 'The Vectara App Client ID. This ID is not used during an OAuth
+
flow. However, the ID used within the Vectara API.
+
+ '
type: string
pattern: app_.+$
name:
@@ -3752,15 +4177,16 @@ components:
description: The client ID used with the OAuth flow.
type: string
client_secret:
- description: The client secret used in API requests. The secret should be kept secure.
+ description: The client secret used in API requests. The secret should
+ be kept secure.
type: string
api_roles:
description: The API roles attached to the App Client.
type: array
items:
- $ref: "#/components/schemas/ApiRole"
+ $ref: '#/components/schemas/ApiRole'
api_policy:
- $ref: "#/components/schemas/ApiPolicy"
+ $ref: '#/components/schemas/ApiPolicy'
UpdateAppClientRequest:
type: object
properties:
@@ -3768,10 +4194,11 @@ components:
description: The new App Client description.
type: string
api_roles:
- description: The new roles attached to the App Client. These roles will replace the current roles.
+ description: The new roles attached to the App Client. These roles will
+ replace the current roles.
type: array
items:
- $ref: "#/components/schemas/ApiRole"
+ $ref: '#/components/schemas/ApiRole'
ListAppClientsResponse:
type: object
properties:
@@ -3779,9 +4206,9 @@ components:
description: List of App Clients.
type: array
items:
- $ref: "#/components/schemas/AppClient"
+ $ref: '#/components/schemas/AppClient'
metadata:
- $ref: "#/components/schemas/ListMetadata"
+ $ref: '#/components/schemas/ListMetadata'
Encoder:
type: object
properties:
@@ -3795,10 +4222,15 @@ components:
type: string
example: boomerang
output_dimensions:
- description: |
- When this encoder is used to create an embedding, it shows the count of dimensions for the output embedding.
- A high dimensionality will consume more storage space, but it allows for an increase in the quality of
+ description: 'When this encoder is used to create an embedding, it shows
+ the count of dimensions for the output embedding.
+
+ A high dimensionality will consume more storage space, but it allows for
+ an increase in the quality of
+
the embedding.
+
+ '
type: integer
format: int32
example: 768
@@ -3806,7 +4238,8 @@ components:
description: The encoder description.
type: string
default:
- description: Indicates whether the default encoder is used when creating a corpus.
+ description: Indicates whether the default encoder is used when creating
+ a corpus.
type: boolean
example: true
enabled:
@@ -3814,8 +4247,10 @@ components:
type: boolean
example: true
Reranker:
- description: |
- A reranker can be used in query or chat endpoints to reorder the search results.
+ description: 'A reranker can be used in query or chat endpoints to reorder the
+ search results.
+
+ '
type: object
properties:
id:
@@ -3838,9 +4273,9 @@ components:
description: An array of rerankers.
type: array
items:
- $ref: "#/components/schemas/Reranker"
+ $ref: '#/components/schemas/Reranker'
metadata:
- $ref: "#/components/schemas/ListMetadata"
+ $ref: '#/components/schemas/ListMetadata'
Job:
type: object
properties:
@@ -3852,16 +4287,17 @@ components:
description: The type of job.
type: string
enum:
- - rebuild_vector_index
- - replace_filter_attributes
- - unknown
+ - rebuild_vector_index
+ - replace_filter_attributes
+ - unknown
corpus_keys:
- description: The corpora that this job belongs to. It may not belong to any corpora.
+ description: The corpora that this job belongs to. It may not belong to
+ any corpora.
type: array
items:
- $ref: "#/components/schemas/CorpusKey"
+ $ref: '#/components/schemas/CorpusKey'
state:
- $ref: "#/components/schemas/JobState"
+ $ref: '#/components/schemas/JobState'
created_at:
description: Specifies when the job was created.
type: string
@@ -3875,18 +4311,19 @@ components:
type: string
format: date-time
created_by_username:
- description: The username of the user who created the job. This property may be missing, e.g., if the job was created by the system, not a user.
+ description: The username of the user who created the job. This property
+ may be missing, e.g., if the job was created by the system, not a user.
type: string
JobState:
type: string
enum:
- - unknown
- - queued
- - started
- - completed
- - failed
- - failed_will_retry
- - aborted
+ - unknown
+ - queued
+ - started
+ - completed
+ - failed
+ - failed_will_retry
+ - aborted
ListJobsResponse:
type: object
properties:
@@ -3894,9 +4331,9 @@ components:
description: An array of jobs.
type: array
items:
- $ref: "#/components/schemas/Job"
+ $ref: '#/components/schemas/Job'
metadata:
- $ref: "#/components/schemas/ListMetadata"
+ $ref: '#/components/schemas/ListMetadata'
CreateUserRequest:
type: object
properties:
@@ -3914,9 +4351,9 @@ components:
description: The role names assigned to the user.
type: array
items:
- $ref: "#/components/schemas/ApiRole"
+ $ref: '#/components/schemas/ApiRole'
required:
- - email
+ - email
UpdateUserRequest:
type: object
properties:
@@ -3927,7 +4364,7 @@ components:
description: The new role names of the user.
type: array
items:
- $ref: "#/components/schemas/ApiRole"
+ $ref: '#/components/schemas/ApiRole'
User:
type: object
properties:
@@ -3960,9 +4397,9 @@ components:
description: The role names of the user.
type: array
items:
- $ref: "#/components/schemas/ApiRole"
+ $ref: '#/components/schemas/ApiRole'
api_policy:
- $ref: "#/components/schemas/ApiPolicy"
+ $ref: '#/components/schemas/ApiPolicy'
ListUsersResponse:
type: object
properties:
@@ -3970,17 +4407,17 @@ components:
description: List of users.
type: array
items:
- $ref: "#/components/schemas/User"
+ $ref: '#/components/schemas/User'
metadata:
- $ref: "#/components/schemas/ListMetadata"
+ $ref: '#/components/schemas/ListMetadata'
ApiRole:
description: Roles that a user or an app client can take on.
type: string
enum:
- - owner
- - administrator
- - billing_administrator
- - corpus_administrator
+ - owner
+ - administrator
+ - billing_administrator
+ - corpus_administrator
ApiPolicy:
description: What actions a principal can take on the Vectara platform.
type: object
@@ -3989,19 +4426,24 @@ components:
description: The name of the API role.
type: string
allowed_operations:
- description: |
- Operations that are allowed by the API role. Each operation may only allow
+ description: 'Operations that are allowed by the API role. Each operation
+ may only allow
+
certain resources that are described by a resource path to resource value
+
map. If the value is null, then the operation is allowed on any resource.
+
+ '
type: object
additionalProperties:
- $ref: "#/components/schemas/ApiOperationPolicy"
+ $ref: '#/components/schemas/ApiOperationPolicy'
required:
- - name
- - allowed_operations
+ - name
+ - allowed_operations
ApiOperationPolicy:
- description: |
- Policy to allow operations if only using the specified resource.
+ description: 'Policy to allow operations if only using the specified resource.
+
+ '
type: object
properties:
allow_any_resource:
@@ -4009,58 +4451,63 @@ components:
type: boolean
default: true
allowed_resources:
- description: |
- Object with keys of resource paths to a list of allowed resources.
+ description: 'Object with keys of resource paths to a list of allowed resources.
+
A resource path starts with either body, path, or implicit.
+
A body or path resource is within the operation body, and an implicit
+
resource is a resource implied by the request.
+
+ '
type: object
additionalProperties:
type: array
items:
type: string
required:
- - allow_any_resource
+ - allow_any_resource
Language:
description: Languages that the Vectara platform supports.
type: string
enum:
- - auto
- - eng
- - deu
- - fra
- - zho
- - kor
- - ara
- - rus
- - tha
- - nld
- - ita
- - por
- - spa
- - jpn
- - pol
- - tur
- - vie
- - ind
- - ces
- - ukr
- - ell
- - heb
- - fas
- - hin
- - urd
- - swe
- - ben
- - msa
- - ron
+ - auto
+ - eng
+ - deu
+ - fra
+ - zho
+ - kor
+ - ara
+ - rus
+ - tha
+ - nld
+ - ita
+ - por
+ - spa
+ - jpn
+ - pol
+ - tur
+ - vie
+ - ind
+ - ces
+ - ukr
+ - ell
+ - heb
+ - fas
+ - hin
+ - urd
+ - swe
+ - ben
+ - msa
+ - ron
default: auto
ListMetadata:
type: object
description: The standard metadata in the response of a list operation.
properties:
page_key:
- description: When requesting the next page of this list, this is needed as a query parameter.
+ description: When requesting the next page of this list, this is needed
+ as a query parameter.
type: string
NotFoundError:
type: object
@@ -4074,7 +4521,8 @@ components:
title: message
type: string
request_id:
- description: ID of the request that can be used to help Vectara support debug what went wrong.
+ description: ID of the request that can be used to help Vectara support
+ debug what went wrong.
type: string
BadRequestError:
type: object
@@ -4090,7 +4538,8 @@ components:
title: message
type: string
request_id:
- description: The ID of the request that can be used to help Vectara support debug what went wrong.
+ description: The ID of the request that can be used to help Vectara support
+ debug what went wrong.
type: string
Error:
type: object
@@ -4103,7 +4552,8 @@ components:
type: string
example: Internal server error.
request_id:
- description: The ID of the request that can be used to help Vectara support debug what went wrong.
+ description: The ID of the request that can be used to help Vectara support
+ debug what went wrong.
type: string
securitySchemes:
OAuth2:
@@ -4121,7 +4571,8 @@ components:
RequestTimeout:
in: header
name: Request-Timeout
- description: The API will make a best effort to complete the request in the specified seconds or time out.
+ description: The API will make a best effort to complete the request in the
+ specified seconds or time out.
schema:
type: integer
minimum: 1
@@ -4129,10 +4580,11 @@ components:
RequestTimeoutMillis:
in: header
name: Request-Timeout-Millis
- description: The API will make a best effort to complete the request in the specified milliseconds or time out.
+ description: The API will make a best effort to complete the request in the
+ specified milliseconds or time out.
schema:
type: integer
minimum: 1
security:
- - ApiKeyAuth: []
- - OAuth2: []
+- ApiKeyAuth: []
+- OAuth2: []