diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b48aa2e5b06736ae522327c30e495b8b4c996235..e1739113aa2808872ddf7225aeab5642a79a6c99 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 Our vector store classes store embeddings and support lookup via similarity search. diff --git a/docs/community/integrations/managed_indices.md b/docs/community/integrations/managed_indices.md index 6b418ac328d3bbc3276a01383850e35961589c7a..dce4c382d303dcea69d52de7c88f733e4d5690d2 100644 --- a/docs/community/integrations/managed_indices.md +++ b/docs/community/integrations/managed_indices.md @@ -14,8 +14,8 @@ Below we show how to use it. **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. -Then put the customer id, corpus id, and API key in your environment as shown below. +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. Then construct the Vectara Index and query it as follows: diff --git a/llama_index/indices/managed/vectara/base.py b/llama_index/indices/managed/vectara/base.py index 55c33726085e34eb8b31f135312026cad5758960..a757fb1d71fb1159644314d85121c9e320d6c08a 100644 --- a/llama_index/indices/managed/vectara/base.py +++ b/llama_index/indices/managed/vectara/base.py @@ -113,6 +113,7 @@ class VectaraIndex(BaseManagedIndex): "x-api-key": self._vectara_api_key, "customer-id": self._vectara_customer_id, "Content-Type": "application/json", + "X-Source": "llama_index", } def _delete_doc(self, doc_id: str) -> bool: diff --git a/llama_index/indices/managed/vectara/retriever.py b/llama_index/indices/managed/vectara/retriever.py index 589084a60aa7ed590b545d797a51efd47e62a706..d35f27c1bb5ccb909309123ff6e646483d428c5c 100644 --- a/llama_index/indices/managed/vectara/retriever.py +++ b/llama_index/indices/managed/vectara/retriever.py @@ -57,6 +57,7 @@ class VectaraRetriever(BaseRetriever): "x-api-key": self._index._vectara_api_key, "customer-id": self._index._vectara_customer_id, "Content-Type": "application/json", + "X-Source": "llama_index", } def _retrieve(