Skip to content

Latest commit

 

History

History
135 lines (87 loc) · 7.98 KB

File metadata and controls

135 lines (87 loc) · 7.98 KB

Beta.Rag.IngestionPipelineConfigurations

Overview

Available Operations

list

For the current workspace, lists all of the registered ingestion pipeline configurations.

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.rag.ingestion_pipeline_configurations.list()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

List[models.IngestionPipelineConfiguration]

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

register

Register an ingestion configuration.

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.rag.ingestion_pipeline_configurations.register(name="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
name str ✔️ N/A
pipeline_composition Dict[str, str] N/A
target_indexes List[models.IngestionPipelineTargetIndexRef] N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.IngestionPipelineConfiguration

Errors

Error Type Status Code Content Type
errors.HTTPValidationError 422 application/json
errors.SDKError 4XX, 5XX */*

update_run_info

Update Run Info

Example Usage

from mistralai.client import Mistral
from mistralai.client.utils import parse_datetime
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.beta.rag.ingestion_pipeline_configurations.update_run_info(id="6b630c1b-b57e-4237-a015-ff6247cbbcf8", execution_time=parse_datetime("2024-06-27T06:29:04.390Z"), chunks_count=983906)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
id str ✔️ N/A
execution_time date ✔️ N/A
chunks_count int ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.IngestionPipelineConfiguration

Errors

Error Type Status Code Content Type
errors.HTTPValidationError 422 application/json
errors.SDKError 4XX, 5XX */*