poprox_concepts.api.recommendations#
Classes
|
|
|
|
|
Identity and versioning metadata for the system that generated the provided recommendations. |
- class poprox_concepts.api.recommendations.RecommendationRequest(*, todays_articles, past_articles, interest_profile, num_recs)#
Bases:
BaseModel
- Parameters:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'interest_profile': FieldInfo(annotation=InterestProfile, required=True), 'num_recs': FieldInfo(annotation=int, required=True, metadata=[Gt(gt=0)]), 'past_articles': FieldInfo(annotation=list[Article], required=True), 'todays_articles': FieldInfo(annotation=list[Article], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class poprox_concepts.api.recommendations.RecommendationResponse(**data)#
Bases:
BaseModel
- Parameters:
data (Any)
recommender (RecommenderInfo | None)
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'recommendations': FieldInfo(annotation=dict[UUID, list[Article]], required=True), 'recommender': FieldInfo(annotation=Union[RecommenderInfo, NoneType], required=False, default=None)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class poprox_concepts.api.recommendations.RecommenderInfo(*, name=None, version=None, hash=None)#
Bases:
BaseModel
Identity and versioning metadata for the system that generated the provided recommendations.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'hash': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'version': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.