Vectara provides a way to add documents directly via their API. This API handles pre-processing and chunking internally in an optimal manner. This method is a wrapper to utilize that API within LangChain.
An array of VectaraFile objects representing the files and their respective file names to be uploaded to Vectara.
A Promise that resolves to the number of successfully uploaded files.
Optional
kOrFields: number | Partial<VectorStoreRetrieverInput<VectaraStore>>Optional
filter: VectaraFilterOptional
callbacks: CallbacksOptional
tags: string[]Optional
metadata: Record<string, unknown>Optional
verbose: booleanOptional
maxReturn documents selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to the query AND diversity among selected documents.
Text to look up documents similar to.
Performs a similarity search and returns documents.
The query string for the similarity search.
Optional
k: numberOptional. The number of results to return. Default is 10.
Optional
filter: VectaraFilterOptional. A VectaraFilter object to refine the search results.
A Promise that resolves to an array of Document objects.
Throws an error, as this method is not implemented. Use similaritySearch or similaritySearchWithScore instead.
Not used.
Not used.
Optional
_filter: VectaraFilterNot used.
Does not return a value.
Performs a similarity search and returns documents along with their scores.
The query string for the similarity search.
Optional
k: numberOptional. The number of results to return. Default is 10.
Optional
filter: VectaraFilterOptional. A VectaraFilter object to refine the search results.
A Promise that resolves to an array of tuples, each containing a Document and its score.
Performs a Vectara API call based on the arguments provided.
The query string for the similarity search.
Optional. The number of results to return. Default is 10.
A Promise that resolves to an array of tuples, each containing a Document and its score.
Static
fromCreates a VectaraStore instance from documents.
An array of Document objects.
Not used.
A VectaraLibArgs object for initializing the VectaraStore instance.
A Promise that resolves to a VectaraStore instance.
Static
fromCreates a VectaraStore instance from texts.
An array of text strings.
Metadata for the texts. Can be a single object or an array of objects.
Not used.
A VectaraLibArgs object for initializing the VectaraStore instance.
A Promise that resolves to a VectaraStore instance.
Class for interacting with the Vectara API. Extends the VectorStore class.