client.chat({ ...params }) -> Vectara.ChatFullResponse
-
-
-
Create a chat while specifying the default retrieval parameters used by the prompt.
-
-
-
await client.chat({ query: "What is a hallucination?", search: { corpora: [ { corpusKey: "corpus_key", metadataFilter: "", lexicalInterpolation: 0.005, }, ], contextConfiguration: { sentencesBefore: 2, sentencesAfter: 2, }, reranker: { type: "customer_reranker", rerankerId: "rnk_272725719", }, }, generation: { responseLanguage: "eng", enableFactualConsistencyScore: true, citations: { style: "none", }, }, chat: { store: true, }, });
-
-
-
request:
Vectara.ChatRequest
-
requestOptions:
VectaraClient.RequestOptions
-
-
client.corpora.list({ ...params }) -> core.Page
-
-
-
List corpora in the account. The returned corpus objects contain less detail compared to those retrieved the direct corpus retrieval operation.
-
-
-
const response = await client.corpora.list(); for await (const item of response) { console.log(item); } // Or you can manually iterate page-by-page const page = await client.corpora.list(); while (page.hasNextPage()) { page = page.getNextPage(); }
-
-
-
request:
Vectara.CorporaListRequest
-
requestOptions:
Corpora.RequestOptions
-
-
client.corpora.create({ ...params }) -> Vectara.Corpus
-
-
-
Create a corpus, which is a container to store documents and associated metadata. Here, you define the unique
corpus_key
that identifies the corpus. Thecorpus_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.
-
-
-
await client.corpora.create({ key: "my-corpus", });
-
-
-
request:
Vectara.CreateCorpusRequest
-
requestOptions:
Corpora.RequestOptions
-
-
client.corpora.get(corpusKey, { ...params }) -> Vectara.Corpus
-
-
-
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. Thecorpus_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.
-
-
-
await client.corpora.get("my-corpus");
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the corpus to retrieve.
-
request:
Vectara.CorporaGetRequest
-
requestOptions:
Corpora.RequestOptions
-
-
client.corpora.delete(corpusKey, { ...params }) -> void
-
-
-
Permanently delete a corpus and all its associated data. The
corpus_key
uniquely identifies the corpus. For more information, see Corpus Key Definition.
-
-
-
await client.corpora.delete("my-corpus");
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the corpus to delete.
-
request:
Vectara.CorporaDeleteRequest
-
requestOptions:
Corpora.RequestOptions
-
-
client.corpora.update(corpusKey, { ...params }) -> Vectara.Corpus
-
-
-
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. Consider updating the name and description of a corpus dynamically to help keep your data aligned with changing business needs.
-
-
-
await client.corpora.update("my-corpus");
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the corpus to update.
-
request:
Vectara.UpdateCorpusRequest
-
requestOptions:
Corpora.RequestOptions
-
-
client.corpora.reset(corpusKey, { ...params }) -> void
-
-
-
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.
-
-
-
await client.corpora.reset("my-corpus");
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the corpus to reset.
-
request:
Vectara.CorporaResetRequest
-
requestOptions:
Corpora.RequestOptions
-
-
client.corpora.replaceFilterAttributes(corpusKey, { ...params }) -> Vectara.ReplaceFilterAttributesResponse
-
-
-
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.
-
-
-
await client.corpora.replaceFilterAttributes("my-corpus", { filterAttributes: [ { name: "Title", level: "document", type: "integer", }, ], });
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the corpus having its filters replaced.
-
request:
Vectara.ReplaceFilterAttributesRequest
-
requestOptions:
Corpora.RequestOptions
-
-
client.corpora.search(corpusKey, { ...params }) -> Vectara.QueryFullResponse
-
-
-
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. Thecorpus_key
is created in the Vectara Console UI or the Create Corpus API definition. When creating a new corpus, you have the option to assign a customcorpus_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. - 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.
- Specify the unique
-
-
-
await client.corpora.search("my-corpus", { query: "query", });
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the corpus to query.
-
request:
Vectara.CorporaSearchRequest
-
requestOptions:
Corpora.RequestOptions
-
-
client.corpora.queryStream(corpusKey, { ...params }) -> core.Stream
-
-
-
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. Thecorpus_key
is created in the Vectara Console UI or the Create Corpus API definition. When creating a new corpus, you have the option to assign a customcorpus_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. - Customize your search by specifying the query text (
query
), pagination details (offset
andlimit
), and metadata filters (metadata_filter
) to tailor your search results. Learn more - Leverage advanced search capabilities like reranking (
reranker
) and Retrieval Augmented Generation (RAG) (generation
) for enhanced query performance. Generation is opt in by setting thegeneration
property. By excluding the property or by setting it to null, the response will not include generation. Learn more. - Use hybrid search to achieve optimal results by setting different values for
lexical_interpolation
(e.g.,0.025
). Learn more - Specify Vectara's RAG-focused LLM (Mockingbird) for the
generation_preset_name
. Learn more - Use advanced summarization options that utilize detailed summarization parameters such as
max_response_characters
,temperature
, andfrequency_penalty
for generating precise and relevant summaries. Learn more
For more detailed information, see Query API guide.
- Specify the unique
-
-
-
const response = await client.corpora.queryStream("my-corpus", { query: "query", }); for await (const item of response) { console.log(item); }
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the corpus to query.
-
request:
Vectara.CorporaQueryStreamRequest
-
requestOptions:
Corpora.RequestOptions
-
-
client.corpora.query(corpusKey, { ...params }) -> Vectara.QueryFullResponse
-
-
-
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. Thecorpus_key
is created in the Vectara Console UI or the Create Corpus API definition. When creating a new corpus, you have the option to assign a customcorpus_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. - Customize your search by specifying the query text (
query
), pagination details (offset
andlimit
), and metadata filters (metadata_filter
) to tailor your search results. Learn more - Leverage advanced search capabilities like reranking (
reranker
) and Retrieval Augmented Generation (RAG) (generation
) for enhanced query performance. Generation is opt in by setting thegeneration
property. By excluding the property or by setting it to null, the response will not include generation. Learn more. - Use hybrid search to achieve optimal results by setting different values for
lexical_interpolation
(e.g.,0.025
). Learn more - Specify Vectara's RAG-focused LLM (Mockingbird) for the
generation_preset_name
. Learn more - Use advanced summarization options that utilize detailed summarization parameters such as
max_response_characters
,temperature
, andfrequency_penalty
for generating precise and relevant summaries. Learn more
For more detailed information, see Query API guide.
- Specify the unique
-
-
-
await client.corpora.query("my-corpus", { query: "query", });
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the corpus to query.
-
request:
Vectara.CorporaQueryRequest
-
requestOptions:
Corpora.RequestOptions
-
-
client.upload.file(file, corpusKey, { ...params }) -> Vectara.Document
-
-
-
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'
table_extraction_config
- (Optional) Specifies whether to extract table data from the uploaded file. If you do not set this option, the platform does not extract tables from PDF files. Example config,'table_extraction_config={"extract_tables":true};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'
For more detailed information, see this File Upload API guide.
-
-
-
await client.upload.file(fs.createReadStream("/path/to/your/file"), "my-corpus", {});
-
-
-
file:
File | fs.ReadStream | Blob
-
corpusKey:
Vectara.CorpusKey
-
request:
Vectara.UploadFileRequest
-
requestOptions:
Upload.RequestOptions
-
-
client.documents.list(corpusKey, { ...params }) -> core.Page
-
-
-
Retrieve a list of documents stored in a specific corpus. This endpoint provides an overview of document metadata without returning the full content of each document.
-
-
-
const response = await client.documents.list("my-corpus"); for await (const item of response) { console.log(item); } // Or you can manually iterate page-by-page const page = await client.documents.list("my-corpus"); while (page.hasNextPage()) { page = page.getNextPage(); }
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the queried corpus.
-
request:
Vectara.DocumentsListRequest
-
requestOptions:
Documents.RequestOptions
-
-
client.documents.create(corpusKey, { ...params }) -> Vectara.Document
-
-
-
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.
-
-
-
await client.documents.create("my-corpus-key", { body: { id: "my-doc-id", type: "structured", sections: [ { id: 1, title: "A nice title.", text: "I'm a nice document section.", metadata: { section: "1.1", }, }, { id: 2, title: "Another nice title.", text: "I'm another document section on something else.", metadata: { section: "1.2", }, }, ], metadata: { url: "https://example.com", }, }, });
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the queried corpus.
-
request:
Vectara.DocumentsCreateRequest
-
requestOptions:
Documents.RequestOptions
-
-
client.documents.getCorpusDocument(corpusKey, documentId, { ...params }) -> Vectara.Document
-
-
-
Retrieve the content and metadata of a specific document, identified by its unique
document_id
from a specific corpus.
-
-
-
await client.documents.getCorpusDocument("my-corpus", "document_id");
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the corpus containing the document to retrieve.
-
documentId:
string
The document ID of the document to retrieve. This
document_id
must be percent encoded.
-
request:
Vectara.GetCorpusDocumentRequest
-
requestOptions:
Documents.RequestOptions
-
-
client.documents.delete(corpusKey, documentId, { ...params }) -> void
-
-
-
Permanently delete a document identified by its unique
document_id
from a specific corpus. This operation cannot be undone, so use it with caution.
-
-
-
await client.documents.delete("my-corpus", "document_id");
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the corpus with the document to delete.
-
documentId:
string
The document ID of the document to delete. This
document_id
must be percent encoded.
-
request:
Vectara.DocumentsDeleteRequest
-
requestOptions:
Documents.RequestOptions
-
-
client.index.updateCorpusDocument(corpusKey, documentId, { ...params }) -> Vectara.Document
-
-
-
Updates document identified by its unique
document_id
from a specific corpus. The request body metadata is merged with the existing metadata, adding or modifying only the specified fields.
-
-
-
await client.index.updateCorpusDocument("my-corpus", "document_id", { body: {}, });
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the corpus with the document to update.
-
documentId:
string
The document ID of the document to update. This
document_id
must be percent encoded.
-
request:
Vectara.UpdateCorpusDocumentRequest
-
requestOptions:
Index.RequestOptions
-
-
client.index.replaceCorpusDocumentMetadata(corpusKey, documentId, { ...params }) -> Vectara.Document
-
-
-
Replaces metadata of a document identified by its unique
document_id
from a specific corpus.
-
-
-
await client.index.replaceCorpusDocumentMetadata("my-corpus", "document_id", { body: {}, });
-
-
-
corpusKey:
Vectara.CorpusKey
— The unique key identifying the corpus with the document to update.
-
documentId:
string
The document ID of the document to update. This
document_id
must be percent encoded.
-
request:
Vectara.ReplaceCorpusDocumentMetadataRequest
-
requestOptions:
Index.RequestOptions
-
-
client.chats.list({ ...params }) -> core.Page
-
-
-
Retrieve a list of previous chats in the Vectara account.
-
-
-
const response = await client.chats.list(); for await (const item of response) { console.log(item); } // Or you can manually iterate page-by-page const page = await client.chats.list(); while (page.hasNextPage()) { page = page.getNextPage(); }
-
-
-
request:
Vectara.ChatsListRequest
-
requestOptions:
Chats.RequestOptions
-
-
client.chats.get(chatId, { ...params }) -> Vectara.Chat
-
-
-
Get a chat summary to view what started the chat, but not subsequent turns.
-
-
-
await client.chats.get("chat_id");
-
-
-
chatId:
string
— The ID of the chat.
-
request:
Vectara.ChatsGetRequest
-
requestOptions:
Chats.RequestOptions
-
-
client.chats.delete(chatId, { ...params }) -> void
-
-
-
Delete a chat and any turns it contains permanently.
-
-
-
await client.chats.delete("chat_id");
-
-
-
chatId:
string
— The ID of the chat.
-
request:
Vectara.ChatsDeleteRequest
-
requestOptions:
Chats.RequestOptions
-
-
client.chats.listTurns(chatId, { ...params }) -> Vectara.ListChatTurnsResponse
-
-
-
List all turns in a chat to see all message and response pairs that make up the dialog.
-
-
-
await client.chats.listTurns("chat_id");
-
-
-
chatId:
string
— The ID of the chat.
-
request:
Vectara.ChatsListTurnsRequest
-
requestOptions:
Chats.RequestOptions
-
-
client.chats.createTurnsStream(chatId, { ...params }) -> core.Stream
-
-
-
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.
-
-
-
const response = await client.chats.createTurnsStream("chat_id", { query: "How can I use the Vectara platform?", search: {}, }); for await (const item of response) { console.log(item); }
-
-
-
chatId:
string
— The ID of the chat.
-
request:
Vectara.ChatsCreateTurnsStreamRequest
-
requestOptions:
Chats.RequestOptions
-
-
client.chats.createTurns(chatId, { ...params }) -> Vectara.ChatFullResponse
-
-
-
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.
-
-
-
await client.chats.createTurns("chat_id", { query: "How can I use the Vectara platform?", search: {}, });
-
-
-
chatId:
string
— The ID of the chat.
-
request:
Vectara.ChatsCreateTurnsRequest
-
requestOptions:
Chats.RequestOptions
-
-
client.chats.getTurn(chatId, turnId, { ...params }) -> Vectara.Turn
-
-
-
Get a specific turn from a chat, which is a message and response pair from the conversation.
-
-
-
await client.chats.getTurn("chat_id", "turn_id");
-
-
-
chatId:
string
— The ID of the chat.
-
turnId:
string
— The ID of the turn.
-
request:
Vectara.ChatsGetTurnRequest
-
requestOptions:
Chats.RequestOptions
-
-
client.chats.deleteTurn(chatId, turnId, { ...params }) -> void
-
-
-
Delete a turn from a chat. This will delete all subsequent turns in the chat.
-
-
-
await client.chats.deleteTurn("chat_id", "turn_id");
-
-
-
chatId:
string
— The ID of the chat.
-
turnId:
string
— The ID of the turn.
-
request:
Vectara.ChatsDeleteTurnRequest
-
requestOptions:
Chats.RequestOptions
-
-
client.chats.updateTurn(chatId, turnId, { ...params }) -> Vectara.Turn
-
-
-
Update a turn; used to disable or enable a chat.
-
-
-
await client.chats.updateTurn("chat_id", "turn_id");
-
-
-
chatId:
string
— The ID of the chat.
-
turnId:
string
— The ID of the turn.
-
request:
Vectara.UpdateTurnRequest
-
requestOptions:
Chats.RequestOptions
-
-
client.llms.list({ ...params }) -> core.Page
-
-
-
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. Thegeneration_preset_name
property in generation parameters can be found as thename
property on the Generations Presets retrieved from/v2/generation_presets
.
-
-
-
const response = await client.llms.list(); for await (const item of response) { console.log(item); } // Or you can manually iterate page-by-page const page = await client.llms.list(); while (page.hasNextPage()) { page = page.getNextPage(); }
-
-
-
request:
Vectara.LlmsListRequest
-
requestOptions:
Llms.RequestOptions
-
-
client.generationPresets.listGenerationPresets({ ...params }) -> Vectara.ListGenerationPresetsResponse
-
-
-
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
.
-
-
-
await client.generationPresets.listGenerationPresets();
-
-
-
request:
Vectara.ListGenerationPresetsRequest
-
requestOptions:
GenerationPresets.RequestOptions
-
-
client.encoders.list({ ...params }) -> core.Page
-
-
-
Encoders are used to store and retrieve from a corpus.
-
-
-
const response = await client.encoders.list({ filter: "vectara.*", }); for await (const item of response) { console.log(item); } // Or you can manually iterate page-by-page const page = await client.encoders.list({ filter: "vectara.*", }); while (page.hasNextPage()) { page = page.getNextPage(); }
-
-
-
request:
Vectara.EncodersListRequest
-
requestOptions:
Encoders.RequestOptions
-
-
client.rerankers.list({ ...params }) -> core.Page
-
-
-
Rerankers are used to improve the ranking (ordering) of search results.
-
-
-
const response = await client.rerankers.list({ filter: "vectara.*", }); for await (const item of response) { console.log(item); } // Or you can manually iterate page-by-page const page = await client.rerankers.list({ filter: "vectara.*", }); while (page.hasNextPage()) { page = page.getNextPage(); }
-
-
-
request:
Vectara.RerankersListRequest
-
requestOptions:
Rerankers.RequestOptions
-
-
client.jobs.list({ ...params }) -> core.Page
-
-
-
List jobs for the account. Jobs are background processes like replacing the filterable metadata attributes.
-
-
-
const response = await client.jobs.list(); for await (const item of response) { console.log(item); } // Or you can manually iterate page-by-page const page = await client.jobs.list(); while (page.hasNextPage()) { page = page.getNextPage(); }
-
-
-
request:
Vectara.JobsListRequest
-
requestOptions:
Jobs.RequestOptions
-
-
client.jobs.get(jobId, { ...params }) -> Vectara.Job
-
-
-
Get a job by a specific ID. Jobs are background processes like replacing the filterable metadata attributes.
-
-
-
await client.jobs.get("job_id");
-
-
-
jobId:
string
— The ID of the job to get.
-
request:
Vectara.JobsGetRequest
-
requestOptions:
Jobs.RequestOptions
-
-
client.users.list({ ...params }) -> core.Page
-
-
-
Lists all users in the account.
-
-
-
const response = await client.users.list(); for await (const item of response) { console.log(item); } // Or you can manually iterate page-by-page const page = await client.users.list(); while (page.hasNextPage()) { page = page.getNextPage(); }
-
-
-
request:
Vectara.UsersListRequest
-
requestOptions:
Users.RequestOptions
-
-
client.users.create({ ...params }) -> Vectara.User
-
-
-
Create a user for the current customer account.
-
-
-
await client.users.create({ email: "email", });
-
-
-
request:
Vectara.CreateUserRequest
-
requestOptions:
Users.RequestOptions
-
-
client.users.get(username, { ...params }) -> Vectara.User
-
-
-
Get a user and view details like the email, username, and associated roles.
-
-
-
await client.users.get("username");
-
-
-
username:
string
Specifies the user ID that to retrieve. Note that the username must be percent encoded.
-
request:
Vectara.UsersGetRequest
-
requestOptions:
Users.RequestOptions
-
-
client.users.delete(username, { ...params }) -> void
-
-
-
Delete a user from the account.
-
-
-
await client.users.delete("username");
-
-
-
username:
string
Specifies the user ID to delete. Note that the username must be percent encoded.
-
request:
Vectara.UsersDeleteRequest
-
requestOptions:
Users.RequestOptions
-
-
client.users.update(username, { ...params }) -> Vectara.User
-
-
-
Update details about a user such as role names.
-
-
-
await client.users.update("username");
-
-
-
username:
string
Specifies the user ID to update. Note that the username must be percent encoded.
-
request:
Vectara.UpdateUserRequest
-
requestOptions:
Users.RequestOptions
-
-
client.users.resetPassword(username, { ...params }) -> void
-
-
-
Reset the password for a user.
-
-
-
await client.users.resetPassword("username");
-
-
-
username:
string
Specifies the user ID to update. Note that the username must be percent encoded and URI safe.
-
request:
Vectara.UsersResetPasswordRequest
-
requestOptions:
Users.RequestOptions
-
-
client.apiKeys.list({ ...params }) -> core.Page
-
-
-
const response = await client.apiKeys.list({ corpusKey: "my-corpus", }); for await (const item of response) { console.log(item); } // Or you can manually iterate page-by-page const page = await client.apiKeys.list({ corpusKey: "my-corpus", }); while (page.hasNextPage()) { page = page.getNextPage(); }
-
-
-
request:
Vectara.ApiKeysListRequest
-
requestOptions:
ApiKeys.RequestOptions
-
-
client.apiKeys.create({ ...params }) -> Vectara.ApiKey
-
-
-
An API key is to authenticate when calling Vectara APIs.
-
-
-
await client.apiKeys.create({ name: "name", apiKeyRole: "serving", });
-
-
-
request:
Vectara.CreateApiKeyRequest
-
requestOptions:
ApiKeys.RequestOptions
-
-
client.apiKeys.get(apiKeyId, { ...params }) -> Vectara.ApiKey
-
-
-
await client.apiKeys.get("api_key_id");
-
-
-
apiKeyId:
string
— The ID of the API key.
-
request:
Vectara.ApiKeysGetRequest
-
requestOptions:
ApiKeys.RequestOptions
-
-
client.apiKeys.delete(apiKeyId, { ...params }) -> void
-
-
-
Delete API keys to help you manage the security and lifecycle of API keys in your application.
-
-
-
await client.apiKeys.delete("api_key_id");
-
-
-
apiKeyId:
string
— The ID of the API key.
-
request:
Vectara.ApiKeysDeleteRequest
-
requestOptions:
ApiKeys.RequestOptions
-
-
client.apiKeys.update(apiKeyId, { ...params }) -> Vectara.ApiKey
-
-
-
Update an API key such as the roles attached to the key.
-
-
-
await client.apiKeys.update("api_key_id");
-
-
-
apiKeyId:
string
— The ID of the API key.
-
request:
Vectara.UpdateApiKeyRequest
-
requestOptions:
ApiKeys.RequestOptions
-
-
client.appClients.list({ ...params }) -> core.Page
-
-
-
const response = await client.appClients.list(); for await (const item of response) { console.log(item); } // Or you can manually iterate page-by-page const page = await client.appClients.list(); while (page.hasNextPage()) { page = page.getNextPage(); }
-
-
-
request:
Vectara.AppClientsListRequest
-
requestOptions:
AppClients.RequestOptions
-
-
client.appClients.create({ ...params }) -> Vectara.AppClient
-
-
-
An App Client is used for OAuth 2.0 authentication when calling Vectara APIs.
-
-
-
await client.appClients.create({ body: { name: "name", type: "client_credentials", }, });
-
-
-
request:
Vectara.AppClientsCreateRequest
-
requestOptions:
AppClients.RequestOptions
-
-
client.appClients.get(appClientId, { ...params }) -> Vectara.AppClient
-
-
-
await client.appClients.get("app_client_id");
-
-
-
appClientId:
string
— The ID of the App Client.
-
request:
Vectara.AppClientsGetRequest
-
requestOptions:
AppClients.RequestOptions
-
-
client.appClients.delete(appClientId, { ...params }) -> void
-
-
-
await client.appClients.delete("app_client_id");
-
-
-
appClientId:
string
— The ID of App Client.
-
request:
Vectara.AppClientsDeleteRequest
-
requestOptions:
AppClients.RequestOptions
-
-
client.appClients.update(appClientId, { ...params }) -> Vectara.AppClient
-
-
-
await client.appClients.update("app_client_id");
-
-
-
appClientId:
string
— The name of App Client.
-
request:
Vectara.UpdateAppClientRequest
-
requestOptions:
AppClients.RequestOptions
-
-
client.queryHistory.getQueryHistory(queryId, { ...params }) -> Vectara.QueryHistory
-
-
-
Retrieve a detailed history of previously executed query.
-
-
-
await client.queryHistory.getQueryHistory("query_id");
-
-
-
queryId:
string
— The ID of the query history
-
request:
Vectara.GetQueryHistoryRequest
-
requestOptions:
QueryHistory.RequestOptions
-
-
client.queryHistory.getQueryHistories({ ...params }) -> Vectara.ListQueryHistoriesResponse
-
-
-
Retrieve query histories.
-
-
-
await client.queryHistory.getQueryHistories();
-
-
-
request:
Vectara.GetQueryHistoriesRequest
-
requestOptions:
QueryHistory.RequestOptions
-
-
client.auth.getToken({ ...params }) -> Vectara.GetTokenResponse
-
-
-
Obtain an OAuth2 access token using client credentials
-
-
-
await client.auth.getToken({ clientId: "client_id", clientSecret: "client_secret", });
-
-
-
request:
Vectara.AuthGetTokenRequest
-
requestOptions:
Auth.RequestOptions
-
-