whylogs_container.whylabs.container.requests¶
Classes
|
|
|
|
|
An enumeration. |
|
|
|
|
|
|
|
|
|
|
|
- class whylogs_container.whylabs.container.requests.DebugLLMValidateRequest(*, prompt: str | None = None, response: str | None = None, context: InputContext | None = None, id: str | None = None, datasetId: str, timestamp: int = None, additional_data: Dict[str, str | int | float] = None, options: RunOptions | None = None, policy: str)¶
Bases:
LLMValidateRequest
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'frozen': True, 'populate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'additional_data': FieldInfo(annotation=Dict[str, Union[str, int, float]], required=False, default_factory=<lambda>), 'context': FieldInfo(annotation=Union[InputContext, NoneType], required=False, default=None), 'dataset_id': FieldInfo(annotation=str, required=True, alias='datasetId', alias_priority=2), 'id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'options': FieldInfo(annotation=Union[RunOptions, NoneType], required=False, default=None), 'policy': FieldInfo(annotation=str, required=True), 'prompt': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'response': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'timestamp': FieldInfo(annotation=int, required=False, default_factory=<lambda>)}¶
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.
- policy: str¶
- class whylogs_container.whylabs.container.requests.EmbeddingRequest(*, prompt: str | None = None, response: str | None = None, context: InputContext | None = None)¶
Bases:
BaseModel
- context: InputContext | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'frozen': True, 'populate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'context': FieldInfo(annotation=Union[InputContext, NoneType], required=False, default=None), 'prompt': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'response': 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] objects.
This replaces Model.__fields__ from Pydantic V1.
- prompt: str | None¶
- response: str | None¶
- class whylogs_container.whylabs.container.requests.Endpoints(value)¶
Bases:
Enum
An enumeration.
- DebugEvaluate = '/debug/evaluate'¶
- Evaluate = '/evaluate'¶
- LogLLM = '/log/llm'¶
- class whylogs_container.whylabs.container.requests.LLMValidateRequest(*, prompt: str | None = None, response: str | None = None, context: InputContext | None = None, id: str | None = None, datasetId: str, timestamp: int = None, additional_data: Dict[str, str | int | float] = None, options: RunOptions | None = None)¶
Bases:
BaseModel
- additional_data: Dict[str, str | int | float]¶
- context: InputContext | None¶
- dataset_id: str¶
- id: str | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'frozen': True, 'populate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'additional_data': FieldInfo(annotation=Dict[str, Union[str, int, float]], required=False, default_factory=<lambda>), 'context': FieldInfo(annotation=Union[InputContext, NoneType], required=False, default=None), 'dataset_id': FieldInfo(annotation=str, required=True, alias='datasetId', alias_priority=2), 'id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'options': FieldInfo(annotation=Union[RunOptions, NoneType], required=False, default=None), 'prompt': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'response': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'timestamp': FieldInfo(annotation=int, required=False, default_factory=<lambda>)}¶
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.
- options: RunOptions | None¶
- prompt: str | None¶
- classmethod replace_old_times(v: int) int ¶
- response: str | None¶
- timestamp: int¶
- to_data_dict() DataDict ¶
- to_dataframe() DataFrame ¶
- to_row() Dict[str, str | int | float | InputContext] ¶
- class whylogs_container.whylabs.container.requests.LogEmbeddingRequest(*, dataset_id: str, timestamp: int, embeddings: Dict[str, List[List[float]] | List[List[int]] | List[List[str]]])¶
Bases:
BaseModel
- datasetId: str¶
- embeddings: Dict[str, List[List[float]] | List[List[int]] | List[List[str]]]¶
- 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]] = {'datasetId': FieldInfo(annotation=str, required=True, alias='dataset_id', alias_priority=2), 'embeddings': FieldInfo(annotation=Dict[str, Union[List[List[float]], List[List[int]], List[List[str]]]], required=True), 'timestamp': FieldInfo(annotation=int, required=True)}¶
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.
- timestamp: int¶
- to_log_embedding_request_dict(api_key: WhyLabsApiKey) LogEmbeddingRequestDict ¶
- class whylogs_container.whylabs.container.requests.LogMultiple(*, columns: Sequence[str], data: Sequence[Sequence[str | int | float | bool | List[float] | List[int] | List[str] | None | List[List[float]] | List[List[int]] | List[List[str]]]])¶
Bases:
BaseModel
- columns: Sequence[str]¶
- data: Sequence[Sequence[str | int | float | bool | List[float] | List[int] | List[str] | None | List[List[float]] | List[List[int]] | List[List[str]]]]¶
- 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]] = {'columns': FieldInfo(annotation=Sequence[str], required=True), 'data': FieldInfo(annotation=Sequence[Sequence[Union[str, int, float, bool, List[float], List[int], List[str], NoneType, List[List[float]], List[List[int]], List[List[str]]]]], required=True)}¶
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.
- class whylogs_container.whylabs.container.requests.LogRequest(*, datasetId: str, multiple: LogMultiple, timestamp: int | None = None)¶
Bases:
BaseModel
- dataset_id: str¶
- 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]] = {'dataset_id': FieldInfo(annotation=str, required=True, alias='datasetId', alias_priority=2), 'multiple': FieldInfo(annotation=LogMultiple, required=True), 'timestamp': FieldInfo(annotation=Union[int, NoneType], required=False, default=None)}¶
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.
- multiple: LogMultiple¶
- timestamp: int | None¶
- to_log_request_dict(api_key: WhyLabsApiKey) LogRequestDict ¶
- class whylogs_container.whylabs.container.requests.PubSubMessage(*, attributes: Dict[str, str], data: str, message_id: str, publish_time: str)¶
Bases:
BaseModel
- attributes: Dict[str, str]¶
- data: str¶
- messageId: str¶
- 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]] = {'attributes': FieldInfo(annotation=Dict[str, str], required=True), 'data': FieldInfo(annotation=str, required=True), 'messageId': FieldInfo(annotation=str, required=True, alias='message_id', alias_priority=2), 'publishTime': FieldInfo(annotation=str, required=True, alias='publish_time', alias_priority=2)}¶
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.
- publishTime: str¶
- class whylogs_container.whylabs.container.requests.PubSubRequest(*, subscription: str, message: PubSubMessage)¶
Bases:
BaseModel
- message: PubSubMessage¶
- 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]] = {'message': FieldInfo(annotation=PubSubMessage, required=True), 'subscription': FieldInfo(annotation=str, required=True)}¶
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.
- subscription: str¶