Skip to content
Snippets Groups Projects
Unverified Commit f08c46c0 authored by Ofer Mendelevitch's avatar Ofer Mendelevitch Committed by GitHub
Browse files

Vectara - minor update (#7954)

parent 30d95daa
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,17 @@ See [Storage guide](https://gpt-index.readthedocs.io/en/latest/how_to/storage.ht ...@@ -99,6 +99,17 @@ See [Storage guide](https://gpt-index.readthedocs.io/en/latest/how_to/storage.ht
--- ---
#### Managed Index
A managed index is used to represent an index that's managed via an API, exposing API calls to index documents and query documents.
Currently we support the [VectaraIndex](https://github.com/run-llama/llama_index/tree/ca09272af000307762d301c99da46ddc70d3bfd2/llama_index/indices/managed/vectara).
Open to contributions!
See [Managed Index docs](https://gpt-index.readthedocs.io/en/stable/community/integrations/managed_indices.html) for details.
---
#### Vector Stores #### Vector Stores
Our vector store classes store embeddings and support lookup via similarity search. Our vector store classes store embeddings and support lookup via similarity search.
......
...@@ -14,8 +14,8 @@ Below we show how to use it. ...@@ -14,8 +14,8 @@ Below we show how to use it.
**Vectara Index Construction/Querying** **Vectara Index Construction/Querying**
Use the [Vectara Console](https://console.vectara.com/login) to create a corpus (aka Index), and add an API key for access. First, [sign up](https://vectara.com/integrations/llama_index) and use the Vectara Console to create a corpus (aka Index), and add an API key for access.
Then put the customer id, corpus id, and API key in your environment as shown below. Then put the customer id, corpus id, and API key in your environment.
Then construct the Vectara Index and query it as follows: Then construct the Vectara Index and query it as follows:
......
...@@ -113,6 +113,7 @@ class VectaraIndex(BaseManagedIndex): ...@@ -113,6 +113,7 @@ class VectaraIndex(BaseManagedIndex):
"x-api-key": self._vectara_api_key, "x-api-key": self._vectara_api_key,
"customer-id": self._vectara_customer_id, "customer-id": self._vectara_customer_id,
"Content-Type": "application/json", "Content-Type": "application/json",
"X-Source": "llama_index",
} }
def _delete_doc(self, doc_id: str) -> bool: def _delete_doc(self, doc_id: str) -> bool:
......
...@@ -57,6 +57,7 @@ class VectaraRetriever(BaseRetriever): ...@@ -57,6 +57,7 @@ class VectaraRetriever(BaseRetriever):
"x-api-key": self._index._vectara_api_key, "x-api-key": self._index._vectara_api_key,
"customer-id": self._index._vectara_customer_id, "customer-id": self._index._vectara_customer_id,
"Content-Type": "application/json", "Content-Type": "application/json",
"X-Source": "llama_index",
} }
def _retrieve( def _retrieve(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment