indexers.dataclasses.VectorStoreEmbedInput
indexers.dataclasses.VectorStoreEmbedInput(data)DataFrame-like object for forming and validating text data to be embedded.
This class validates and represents input texts that will be converted to vector embeddings by the vector store.
Attributes
| Name | Type | Description |
|---|---|---|
| id | pd.Series | Unique identifier for each text item. |
| text | pd.Series | The text content to be embedded. |
Methods
| Name | Description |
|---|---|
| from_data | Create a validated VectorStoreEmbedInput from a dictionary or DataFrame. |
| validate | Validate an existing DataFrame and return a VectorStoreEmbedInput. |
from_data
indexers.dataclasses.VectorStoreEmbedInput.from_data(data)Create a validated VectorStoreEmbedInput from a dictionary or DataFrame.
Creates a new instance of VectorStoreEmbedInput by validating the input data against the defined schema.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| data | dict | pd.DataFrame | A dictionary or pandas DataFrame containing the input data. Must include ‘id’ and ‘text’ columns/keys. | required |
Returns
| Name | Type | Description |
|---|---|---|
| VectorStoreEmbedInput | VectorStoreEmbedInput | A validated instance of the class. |
validate
indexers.dataclasses.VectorStoreEmbedInput.validate(df)Validate an existing DataFrame and return a VectorStoreEmbedInput.
Validates the provided pandas DataFrame against the defined schema and returns a new instance of VectorStoreEmbedInput if validation is successful.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| df | pd.DataFrame | A pandas DataFrame to validate. Must include ‘id’ and ‘text’ columns. | required |
Returns
| Name | Type | Description |
|---|---|---|
| VectorStoreEmbedInput | VectorStoreEmbedInput | A validated instance of the class. |