DataSourceFieldsMapping Class
Data source fields mapping.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Inheritance
-
DataSourceFieldsMapping
Constructor
DataSourceFieldsMapping(*, titleField: str | None = None, urlField: str | None = None, filepathField: str | None = None, contentFields: list[str] | None = None, vectorFields: list[str] | None = None, contentFieldsSeparator: str | None = '\n', **extra_data: Any)
Keyword-Only Parameters
Name | Description |
---|---|
titleField
Required
|
|
urlField
Required
|
|
filepathField
Required
|
|
contentFields
Required
|
|
vectorFields
Required
|
|
contentFieldsSeparator
|
Default value:
|
Attributes
model_computed_fields
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
model_config
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_config: ClassVar[ConfigDict] = {'alias_generator': AliasGenerator(alias=None, validation_alias=<function to_camel>, serialization_alias=<function to_snake>), 'arbitrary_types_allowed': True, 'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True}
model_fields
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.fields from Pydantic V1.
model_fields: ClassVar[Dict[str, FieldInfo]] = {'content_fields': FieldInfo(annotation=Union[list[str], NoneType], required=False, default=None, alias_priority=1, validation_alias='contentFields', serialization_alias='content_fields'), 'content_fields_separator': FieldInfo(annotation=Union[str, NoneType], required=False, default='\n', alias_priority=1, validation_alias='contentFieldsSeparator', serialization_alias='content_fields_separator'), 'filepath_field': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='filepathField', serialization_alias='filepath_field'), 'title_field': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='titleField', serialization_alias='title_field'), 'url_field': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=1, validation_alias='urlField', serialization_alias='url_field'), 'vector_fields': FieldInfo(annotation=Union[list[str], NoneType], required=False, default=None, alias_priority=1, validation_alias='vectorFields', serialization_alias='vector_fields')}
content_fields
content_fields: list[str] | None
content_fields_separator
content_fields_separator: str | None
filepath_field
filepath_field: str | None
title_field
title_field: str | None
url_field
url_field: str | None
vector_fields
vector_fields: list[str] | None