Fetch all indexes available to a user
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.rag.search_indexes.get_deployment_summaries()
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.GetDeploymentSummariesResponse
| Error Type |
Status Code |
Content Type |
| errors.SDKError |
4XX, 5XX |
*/* |
Register (or re-register) a search index
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.rag.search_indexes.register_deployment(name="<value>", deployment={
"type": "vespa",
"vespa_version": "<value>",
"indexes": [],
"query_url": "https://joyful-granny.info",
}, status="offline")
# Handle response
print(res)
models.RegisterSearchIndexResponseIndex
| Error Type |
Status Code |
Content Type |
| errors.HTTPValidationError |
422 |
application/json |
| errors.SDKError |
4XX, 5XX |
*/* |
Delete all information about a deployment
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.rag.search_indexes.unregister_deployment(deployment_id="240a5e63-fd68-4806-8290-04cce22b4c37")
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
deployment_id |
str |
✔️ |
N/A |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
Any
| Error Type |
Status Code |
Content Type |
| errors.HTTPValidationError |
422 |
application/json |
| errors.SDKError |
4XX, 5XX |
*/* |
Update the metrics for a given index
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.beta.rag.search_indexes.update_index_metrics(deployment_id="b0c2f463-8aef-437d-83ac-d4bfae874584", request_body={
"status": "offline",
"clear_metrics": False,
})
# Handle response
print(res)
Any
| Error Type |
Status Code |
Content Type |
| errors.SDKError |
4XX, 5XX |
*/* |