diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b48aa2e5b0673..e1739113aa280 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 6b418ac328d3b..dce4c382d303d 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 55c33726085e3..a757fb1d71fb1 100644 --- a/llama_index/indices/managed/vectara/base.py +++ b/llama_index/indices/managed/vectara/base.py @@ -113,6 +113,7 @@ def _get_post_headers(self) -> dict: "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 589084a60aa7e..d35f27c1bb5cc 100644 --- a/llama_index/indices/managed/vectara/retriever.py +++ b/llama_index/indices/managed/vectara/retriever.py @@ -57,6 +57,7 @@ def _get_post_headers(self) -> dict: "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(