Skip to content

Data model

Pipeline

V1DeletePipelineResponse

Bases: BaseModel

Response model for deleting a pipeline. This model contains fields to indicate the status of the delete operation, any errors that occurred, and a message providing additional information.

Attributes:

Name Type Description
status Optional[str]

Status of the delete operation.

Status Optional[str]

Alternative case for status of the delete operation.

Error Optional[Dict[Any, Any]]

Error message if the delete operation fails.

success Optional[bool]

Indicates if the delete operation was successful.

message Optional[str]

Message providing additional information about the operation.

Source code in pydi_client/data/pipeline.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
class V1DeletePipelineResponse(BaseModel):

    """
    Response model for deleting a pipeline.
    This model contains fields to indicate the status of the delete operation,
    any errors that occurred, and a message providing additional information.

    Attributes:
        status (Optional[str]): Status of the delete operation.
        Status (Optional[str]): Alternative case for status of the delete operation.
        Error (Optional[Dict[Any, Any]]): Error message if the delete operation fails.
        success (Optional[bool]): Indicates if the delete operation was successful.
        message (Optional[str]): Message providing additional information about the operation.
    """
    status: Optional[str] = Field(
        default_factory=str, description="Status of the delete operation"
    )
    Status: Optional[str] = Field(
        default_factory=str,
        description="Status of the delete operation (alternative case)",
    )
    Error: Optional[Dict[Any, Any]] = Field(
        default_factory=dict, description="Error message if the delete operation fails"
    )
    success: Optional[bool] = Field(
        default=None, description="Indicates if the delete operation was successful"
    )
    message: Optional[str] = Field(
        default=None, description="Message providing additional information about the operation"
    )

FilterItem

Bases: BaseModel

Represents a filter item used in event filtering for pipelines. Attributes: objectSuffix (List[str]): List of suffixes for objects to filter. maxObjectSize (int): Maximum size of the object to filter.

Source code in pydi_client/data/pipeline.py
39
40
41
42
43
44
45
46
47
class FilterItem(BaseModel):
    """
    Represents a filter item used in event filtering for pipelines.
    Attributes:
        objectSuffix (List[str]): List of suffixes for objects to filter.
        maxObjectSize (int): Maximum size of the object to filter.
    """
    objectSuffix: List[str]
    maxObjectSize: Optional[int] = Field(default=None)

V1CreatePipeline

Bases: BaseModel

Represents a request to create a pipeline. Attributes: name (str): Name of the pipeline. type (str): Type of the pipeline. model (Optional[str]): Optional model associated with the pipeline. eventFilter (FilterItem): Event filter criteria for the pipeline. schema (Optional[str]): Optional schema for the pipeline. customFunction (Optional[str]): Optional custom function for the pipeline.

Source code in pydi_client/data/pipeline.py
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
class V1CreatePipeline(BaseModel):
    """
    Represents a request to create a pipeline.
    Attributes:
        name (str): Name of the pipeline.
        type (str): Type of the pipeline.
        model (Optional[str]): Optional model associated with the pipeline.
        eventFilter (FilterItem): Event filter criteria for the pipeline.
        schema (Optional[str]): Optional schema for the pipeline.
        customFunction (Optional[str]): Optional custom function for the pipeline.
    """
    name: str
    type: str
    model: Optional[str]
    eventFilter: FilterItem
    schema: Optional[str]
    customFunction: Optional[str]

V1CreatePipelineResponse

Bases: BaseModel

Response model for creating a pipeline. This model contains fields to indicate the success of the creation operation and a message providing additional information.

Attributes:

Name Type Description
success bool

Indicates if the pipeline creation was successful.

message str

Message providing additional information about the operation.

Source code in pydi_client/data/pipeline.py
69
70
71
72
73
74
75
76
77
78
79
80
class V1CreatePipelineResponse(BaseModel):
    """
    Response model for creating a pipeline.
    This model contains fields to indicate the success of the creation operation
    and a message providing additional information.

    Attributes:
        success (bool): Indicates if the pipeline creation was successful.
        message (str): Message providing additional information about the operation.
    """
    success: bool
    message: str

BucketUpdateResponse

Bases: BaseModel

Response model for updating buckets in a collection. This model contains fields to indicate the success of the update operation and a message providing additional information. Attributes: success (bool): Indicates if the bucket update was successful. message (str): Message providing additional information about the operation.

Source code in pydi_client/data/pipeline.py
83
84
85
86
87
88
89
90
91
92
93
class BucketUpdateResponse(BaseModel):
    """
    Response model for updating buckets in a collection.
    This model contains fields to indicate the success of the update operation
    and a message providing additional information.
    Attributes:
        success (bool): Indicates if the bucket update was successful.
        message (str): Message providing additional information about the operation.
    """
    success: bool
    message: str

NodeWithScore

Bases: BaseModel

Represents a node with its associated score and metadata. Attributes: score (float): Score associated with the node. dataChunk (str): Data chunk associated with the node. chunkMetadata (Optional[Dict[str, Any]]): Optional metadata associated with the data chunk

Source code in pydi_client/data/pipeline.py
 96
 97
 98
 99
100
101
102
103
104
105
106
class NodeWithScore(BaseModel):
    """
    Represents a node with its associated score and metadata.
    Attributes:
        score (float): Score associated with the node.
        dataChunk (str): Data chunk associated with the node.
        chunkMetadata (Optional[Dict[str, Any]]): Optional metadata associated with the data chunk
    """
    score: float
    dataChunk: str
    chunkMetadata: Optional[Dict[str, Any]] = Field(default_factory=dict)

V1SimilaritySearchResponse

Bases: BaseModel

Response model for similarity search in a collection. This model contains fields to indicate the success of the search operation, a message providing additional information, and the results of the search. Attributes: success (bool): Indicates if the similarity search was successful. message (str): Message providing additional information about the operation. results (Optional[List[NodeWithScore]]): List of nodes with their scores returned by the search.

Source code in pydi_client/data/pipeline.py
109
110
111
112
113
114
115
116
117
118
119
120
121
class V1SimilaritySearchResponse(BaseModel):
    """
    Response model for similarity search in a collection.
    This model contains fields to indicate the success of the search operation,
    a message providing additional information, and the results of the search.
    Attributes:
        success (bool): Indicates if the similarity search was successful.
        message (str): Message providing additional information about the operation.
        results (Optional[List[NodeWithScore]]): List of nodes with their scores returned by the search.
    """
    success: bool
    message: str
    results: Optional[List[NodeWithScore]] = Field(default_factory=list)

Schema

SchemaItem

Bases: BaseModel

Represents a schema item with a name and type. Attributes: name (str): Name of the schema field. type (str): Type of the schema field.

Source code in pydi_client/data/schema.py
 7
 8
 9
10
11
12
13
14
15
class SchemaItem(BaseModel):
    """
    Represents a schema item with a name and type.
    Attributes:
        name (str): Name of the schema field.
        type (str): Type of the schema field.
    """
    name: str = Field(..., description="field name")
    type: str = Field(..., description="field type")

V1SchemasResponse

Bases: BaseModel

Represents a response containing schema information. This model contains fields to represent the schema name, type, and a list of schema items. Attributes: name (str): Name of the schema. type (str): Type of the schema. schema (List[SchemaItem]): List of schema fields.

Source code in pydi_client/data/schema.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class V1SchemasResponse(BaseModel):
    """
    Represents a response containing schema information.
    This model contains fields to represent the schema name, type, and a list of schema items.
    Attributes:
        name (str): Name of the schema.
        type (str): Type of the schema.
        schema (List[SchemaItem]): List of schema fields.
    """
    name: str = Field(..., description="schema name")
    type: str = Field(..., description="schema type")
    schema: List[SchemaItem] = Field(
        ..., alias="schema", description="list of schema fields"
    )

SchemaRecordSummary

Bases: BaseModel

Represents a summary of a schema record. Attributes: id (str): Unique identifier for the schema record. name (str): Name of the schema record.

Source code in pydi_client/data/schema.py
34
35
36
37
38
39
40
41
42
class SchemaRecordSummary(BaseModel):
    """
    Represents a summary of a schema record.
    Attributes:
        id (str): Unique identifier for the schema record.
        name (str): Name of the schema record.
    """
    id: str
    name: str

V1ListSchemasResponse

Bases: BaseModel

Response model for listing available schemas. This model contains a list of schema records. Attributes: schemas (List[SchemaRecordSummary]): List of schema records.

Source code in pydi_client/data/schema.py
45
46
47
48
49
50
51
52
class V1ListSchemasResponse(BaseModel):
    """
    Response model for listing available schemas.
    This model contains a list of schema records.
    Attributes:
        schemas (List[SchemaRecordSummary]): List of schema records.
    """
    schemas: List[SchemaRecordSummary]

Model

V1ModelsResponse

Bases: BaseModel

Response model for listing available models. This model contains fields to represent the system model name, model name, capabilities, dimensionality, maximum tokens supported by the model, and the version of the model. Attributes: name (str): System model name. modelName (str): Model name. capabilities (List[str]): List of capabilities such as embedding, large language model, etc. dimension (int): Model dimensionality. maximumTokens (int): Maximum token size supported by the model. version (str): Model version.

Source code in pydi_client/data/model.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class V1ModelsResponse(BaseModel):
    """
    Response model for listing available models.
    This model contains fields to represent the system model name, model name,
    capabilities, dimensionality, maximum tokens supported by the model, and the version of the model.
    Attributes:
        name (str): System model name.
        modelName (str): Model name.
        capabilities (List[str]): List of capabilities such as embedding, large language model, etc.
        dimension (int): Model dimensionality.
        maximumTokens (int): Maximum token size supported by the model.
        version (str): Model version.
    """

    name: str = Field(..., description="system model name")
    modelName: str = Field(..., description="model name")
    capabilities: List[str] = Field(...,
                                    description="embedding, large language model etc")
    dimension: int = Field(..., description="model dimensionality")
    maximumTokens: int = Field(...,
                               description="max token size supported by the model")
    version: str = Field(..., description="model version")

ModelRecordSummary

Bases: BaseModel

Represents a summary of a model record. Attributes: id (str): Unique identifier for the model record. name (str): Name of the model record.

Source code in pydi_client/data/model.py
31
32
33
34
35
36
37
38
39
class ModelRecordSummary(BaseModel):
    """
    Represents a summary of a model record.
    Attributes:
        id (str): Unique identifier for the model record.
        name (str): Name of the model record.
    """
    id: str
    name: str

V1ListModelsResponse

Bases: BaseModel

Response model for listing available models. This model contains a list of model records. Attributes: models (List[ModelRecordSummary]): List of model records.

Source code in pydi_client/data/model.py
42
43
44
45
46
47
48
49
class V1ListModelsResponse(BaseModel):
    """
    Response model for listing available models.
    This model contains a list of model records.
    Attributes:
        models (List[ModelRecordSummary]): List of model records.
    """
    models: List[ModelRecordSummary]

Collection Manager

V1DeleteCollectionResponse

Bases: BaseModel

Response model for deleting a collection. This model contains fields to indicate the status of the delete operation, any errors that occurred, and a message providing additional information. Attributes: status (Optional[str]): Status of the delete operation. Status (Optional[str]): Alternative case for status of the delete operation. Error (Optional[Dict[Any, Any]]): Error message if the delete operation fails. success (Optional[bool]): Indicates if the delete operation was successful. message (Optional[str]): Message providing additional information about the operation.

Source code in pydi_client/data/collection_manager.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
class V1DeleteCollectionResponse(BaseModel):
    """
    Response model for deleting a collection.
    This model contains fields to indicate the status of the delete operation,
    any errors that occurred, and a message providing additional information.
    Attributes:
        status (Optional[str]): Status of the delete operation.
        Status (Optional[str]): Alternative case for status of the delete operation.
        Error (Optional[Dict[Any, Any]]): Error message if the delete operation fails.
        success (Optional[bool]): Indicates if the delete operation was successful.
        message (Optional[str]): Message providing additional information about the operation.
    """
    status: Optional[str] = Field(
        default_factory=str, description="Status of the delete operation"
    )
    Status: Optional[str] = Field(
        default_factory=str,
        description="Status of the delete operation (alternative case)",
    )
    Error: Optional[Dict[Any, Any]] = Field(
        default_factory=dict, description="Error message if the delete operation fails"
    )
    success: Optional[bool] = Field(
        default=None, description="Indicates if the delete operation was successful"
    )
    message: Optional[str] = Field(
        default=None, description="Message providing additional information about the operation"
    )

V1CreateCollection

Bases: BaseModel

Represents a request to create a collection. Attributes: name (str): Name of the collection. pipeline (str): Pipeline associated with the collection. buckets (Optional[List[str]]): Optional list of buckets associated with the collection.

Source code in pydi_client/data/collection_manager.py
37
38
39
40
41
42
43
44
45
46
47
class V1CreateCollection(BaseModel):
    """
    Represents a request to create a collection.
    Attributes:
        name (str): Name of the collection.
        pipeline (str): Pipeline associated with the collection.
        buckets (Optional[List[str]]): Optional list of buckets associated with the collection.
    """
    name: str
    pipeline: str
    buckets: Optional[List[str]]

V1CollectionResponse

Bases: BaseModel

Represents a response containing collection information. This model contains fields to represent the collection name, pipeline, and an optional list of buckets associated with the collection. Attributes: name (str): Name of the collection. pipeline (str): Pipeline associated with the collection. buckets (Optional[List[str]]): Optional list of buckets associated with the collection.

Source code in pydi_client/data/collection_manager.py
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
class V1CollectionResponse(BaseModel):
    """
    Represents a response containing collection information.
    This model contains fields to represent the collection name, pipeline, and an optional list of buckets
    associated with the collection.
    Attributes:
        name (str): Name of the collection.
        pipeline (str): Pipeline associated with the collection.
        buckets (Optional[List[str]]): Optional list of buckets associated with the collection.
    """
    name: str
    pipeline: str
    buckets: Optional[List[str]] = Field(
        default_factory=list,
        description="List of buckets associated with the collection",
    )

BucketUpdateRequest

Bases: BaseModel

Represents a request to update the buckets of a collection. Attributes: name (str): Name of the collection. buckets (List[str]): List of buckets to be associated with the collection.

Source code in pydi_client/data/collection_manager.py
68
69
70
71
72
73
74
75
76
class BucketUpdateRequest(BaseModel):
    """
    Represents a request to update the buckets of a collection.
    Attributes:
        name (str): Name of the collection.
        buckets (List[str]): List of buckets to be associated with the collection.
    """
    name: str
    buckets: List[str]

V1PipelineResponse

Bases: BaseModel

Represents a response containing pipeline information. This model contains fields to represent the pipeline name, type, model, custom function, event filter criteria, and schema associated with the pipeline. Attributes: name (str): Name of the pipeline. type (str): Type of the pipeline. model (Optional[str]): Optional model associated with the pipeline. customFunction (Optional[str]): Optional custom function for the pipeline. eventFilter (Dict[str, Any]): Event filter criteria for the pipeline. schema (str): Schema associated with the pipeline.

Source code in pydi_client/data/collection_manager.py
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
class V1PipelineResponse(BaseModel):
    """
    Represents a response containing pipeline information.
    This model contains fields to represent the pipeline name, type, model, custom function,
    event filter criteria, and schema associated with the pipeline.
    Attributes:
        name (str): Name of the pipeline.
        type (str): Type of the pipeline.
        model (Optional[str]): Optional model associated with the pipeline.
        customFunction (Optional[str]): Optional custom function for the pipeline.
        eventFilter (Dict[str, Any]): Event filter criteria for the pipeline.
        schema (str): Schema associated with the pipeline.
    """
    name: str
    type: str
    model: Optional[str] = Field(default_factory=str)
    customFunction: Optional[str] = Field(default_factory=str)
    eventFilter: Dict[str, Any]
    schema: str

ListCollectionItem

Bases: BaseModel

Represents a summary of a collection item. Attributes: id (Optional[str]): Unique identifier for the collection item. name (Optional[str]): Name of the collection item.

Source code in pydi_client/data/collection_manager.py
100
101
102
103
104
105
106
107
108
class ListCollectionItem(BaseModel):
    """
    Represents a summary of a collection item.
    Attributes:
        id (Optional[str]): Unique identifier for the collection item.
        name (Optional[str]): Name of the collection item.
    """
    id: Optional[str] = Field(None, description="collection id")
    name: Optional[str] = Field(None, description="collection name")

ListCollection

Bases: RootModel[List[ListCollectionItem]]

Response model for listing available collections. This model contains a list of collection items. Attributes: root (List[ListCollectionItem]): List of collection items.

Source code in pydi_client/data/collection_manager.py
111
112
113
114
115
116
117
118
119
120
121
122
123
class ListCollection(RootModel[List[ListCollectionItem]]):
    """
    Response model for listing available collections.
    This model contains a list of collection items.
    Attributes:
        root (List[ListCollectionItem]): List of collection items.
    """
    root: List[ListCollectionItem] = Field(
        ...,
        examples=[
            [{"id": "1", "name": "collection1"}, {"id": "2", "name": "collection2"}]
        ],
    )

ListPipeline

Bases: BaseModel

Represents a summary of a pipeline. Attributes: id (Optional[str]): Unique identifier for the pipeline. name (Optional[str]): Name of the pipeline.

Source code in pydi_client/data/collection_manager.py
126
127
128
129
130
131
132
133
134
class ListPipeline(BaseModel):
    """
    Represents a summary of a pipeline.
    Attributes:
        id (Optional[str]): Unique identifier for the pipeline.
        name (Optional[str]): Name of the pipeline.
    """
    id: Optional[str] = Field(None, description="pipeline id")
    name: Optional[str] = Field(None, description="pipeline name")

ListPipelines

Bases: RootModel[List[ListPipeline]]

Response model for listing available pipelines. This model contains a list of pipelines. Attributes: root (List[ListPipeline]): List of pipelines.

Source code in pydi_client/data/collection_manager.py
137
138
139
140
141
142
143
144
145
146
147
class ListPipelines(RootModel[List[ListPipeline]]):
    """
    Response model for listing available pipelines.
    This model contains a list of pipelines.
    Attributes:
        root (List[ListPipeline]): List of pipelines.
    """
    root: List[ListPipeline] = Field(
        ...,
        examples=[[{"id": "1", "name": "pipeline1"}, {"id": "2", "name": "pipeline2"}]],
    )