Types
Bases:
BaseSettings
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "Config", "type": "object", "properties": { "console_url": { "format": "uri", "maxLength": 2083, "minLength": 1, "title": "Console Url", "type": "string" }, "username": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Username" }, "password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "title": "Password" }, "token": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "title": "Token" }, "current_user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Current User" }, "current_project_id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "type": "null" } ], "default": null, "title": "Current Project Id" }, "current_project_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Current Project Name" }, "current_run_id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "type": "null" } ], "default": null, "title": "Current Run Id" }, "current_run_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Current Run Name" }, "current_run_task_type": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Current Run Task Type" }, "current_template_id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "type": "null" } ], "default": null, "title": "Current Template Id" }, "current_template_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Current Template Name" }, "current_template_version_id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "type": "null" } ], "default": null, "title": "Current Template Version Id" }, "current_template_version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Current Template Version" }, "current_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Current Template" }, "current_dataset_id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "type": "null" } ], "default": null, "title": "Current Dataset Id" }, "current_job_id": { "anyOf": [ { "format": "uuid4", "type": "string" }, { "type": "null" } ], "default": null, "title": "Current Job Id" } }, "required": [ "console_url" ] } ```
* **Config:** - **extra**: *str = ignore* - **env_prefix**: *str = GALILEO_* - **validate_assignment**: *bool = True* * **Fields:** - [`console_url (pydantic_core._pydantic_core.Url)`](#promptquality.types.config.Config.console_url) - [`current_dataset_id (uuid.UUID | None)`](#promptquality.types.config.Config.current_dataset_id) - [`current_job_id (uuid.UUID | None)`](#promptquality.types.config.Config.current_job_id) - [`current_project_id (uuid.UUID | None)`](#promptquality.types.config.Config.current_project_id) - [`current_project_name (str | None)`](#promptquality.types.config.Config.current_project_name) - [`current_run_id (uuid.UUID | None)`](#promptquality.types.config.Config.current_run_id) - [`current_run_name (str | None)`](#promptquality.types.config.Config.current_run_name) - [`current_run_task_type (int | None)`](#promptquality.types.config.Config.current_run_task_type) - [`current_template (str | None)`](#promptquality.types.config.Config.current_template) - [`current_template_id (uuid.UUID | None)`](#promptquality.types.config.Config.current_template_id) - [`current_template_name (str | None)`](#promptquality.types.config.Config.current_template_name) - [`current_template_version (int | None)`](#promptquality.types.config.Config.current_template_version) - [`current_template_version_id (uuid.UUID | None)`](#promptquality.types.config.Config.current_template_version_id) - [`current_user (str | None)`](#promptquality.types.config.Config.current_user) - [`password (pydantic.types.SecretStr | None)`](#promptquality.types.config.Config.password) - [`token (pydantic.types.SecretStr | None)`](#promptquality.types.config.Config.token) - [`username (str | None)`](#promptquality.types.config.Config.username) * **Validators:** - [`http_url`](#promptquality.types.config.Config.http_url) » [`console_url`](#promptquality.types.config.Config.console_url) - [`validate_api_url`](#promptquality.types.config.Config.validate_api_url) » `all fields`
- Constraints:
- max_length = 2083
- allowed_schemes = [‘http’, ‘https’]
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Validated by:
- Return type:
str
- Return type:
None
- Return type:
None
- Return type:
None
- Return type:
None
- Return type:
None
- Return type:
None
- Return type:
None
- Return type:
None
- Return type:
str
- Return type:
str
- Return type:
None
Bases:
BaseModel
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
* **Fields:** - [`aggregator (Callable[[List[float | int | bool | str | None], List[int]], Dict[str, float | int | bool | str | None]] | None)`](#promptquality.types.custom_scorer.CustomScorer.aggregator) - [`executor (Callable[[promptquality.types.rows.PromptRow], float | int | bool | str | None])`](#promptquality.types.custom_scorer.CustomScorer.executor) - [`name (str)`](#promptquality.types.custom_scorer.CustomScorer.name)
Bases:
BaseModel
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
* **Fields:** - [`limit (int)`](#promptquality.types.pagination.PaginationRequestMixin.limit) - [`starting_token (int)`](#promptquality.types.pagination.PaginationRequestMixin.starting_token)
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "PaginationResponseMixin", "type": "object", "properties": { "starting_token": { "default": 0, "title": "Starting Token", "type": "integer" }, "limit": { "default": 25, "title": "Limit", "type": "integer" }, "paginated": { "default": false, "title": "Paginated", "type": "boolean" }, "next_starting_token": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Next Starting Token" } } } ```
* **Fields:** - [`next_starting_token (int | None)`](#promptquality.types.pagination.PaginationResponseMixin.next_starting_token) - [`paginated (bool)`](#promptquality.types.pagination.PaginationResponseMixin.paginated)
Bases:
BaseModel
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "RegisteredScorer", "type": "object", "properties": { "registered_scorer_id": { "format": "uuid4", "title": "Registered Scorer Id", "type": "string" }, "metric_name": { "title": "Metric Name", "type": "string" } }, "required": [ "registered_scorer_id", "metric_name" ] } ```
* **Config:** - **populate_by_name**: *bool = True* * **Fields:** - [`id (uuid.UUID)`](#promptquality.types.registered_scorers.RegisteredScorer.id) - [`name (str)`](#promptquality.types.registered_scorers.RegisteredScorer.name)
- Constraints:
- uuid_version = 4
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "ListRegisteredScorers", "type": "object", "properties": { "starting_token": { "default": 0, "title": "Starting Token", "type": "integer" }, "limit": { "default": 25, "title": "Limit", "type": "integer" }, "paginated": { "default": false, "title": "Paginated", "type": "boolean" }, "next_starting_token": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Next Starting Token" }, "scorers": { "items": { "$ref": "#/$defs/RegisteredScorer" }, "title": "Scorers", "type": "array" } }, "$defs": { "RegisteredScorer": { "properties": { "registered_scorer_id": { "format": "uuid4", "title": "Registered Scorer Id", "type": "string" }, "metric_name": { "title": "Metric Name", "type": "string" } }, "required": [ "registered_scorer_id", "metric_name" ], "title": "RegisteredScorer", "type": "object" } }, "required": [ "scorers" ] } ```
* **Fields:** - [`scorers (List[promptquality.types.registered_scorers.RegisteredScorer])`](#promptquality.types.registered_scorers.ListRegisteredScorers.scorers)
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "GetRowsRequest", "type": "object", "properties": { "starting_token": { "default": 0, "title": "Starting Token", "type": "integer" }, "limit": { "default": 25, "title": "Limit", "type": "integer" }, "project_id": { "format": "uuid4", "title": "Project Id", "type": "string" }, "run_id": { "format": "uuid4", "title": "Run Id", "type": "string" }, "task_type": { "title": "Task Type", "type": "integer" } }, "required": [ "project_id", "run_id", "task_type" ] } ```
* **Fields:** - [`project_id (uuid.UUID)`](#promptquality.types.rows.GetRowsRequest.project_id) - [`run_id (uuid.UUID)`](#promptquality.types.rows.GetRowsRequest.run_id) - [`task_type (int)`](#promptquality.types.rows.GetRowsRequest.task_type)
- Constraints:
- uuid_version = 4
- Constraints:
- uuid_version = 4
Params to be passed to the API request.
These are primarily the pagination parameters and task type.
- Returns: Params to be passed to the API request.
- Return type: Dict[str, Any]
Bases:
BaseModel
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "Metrics", "type": "object", "properties": { "hallucination": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Hallucination" }, "bleu": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Bleu" }, "rouge": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Rouge" }, "pii": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Pii" }, "like_dislike": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Like Dislike" }, "toxicity": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Toxicity" }, "factuality": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Factuality" }, "factuality_explanation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Factuality Explanation" }, "groundedness": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Groundedness" }, "groundedness_explanation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Groundedness Explanation" }, "latency": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Latency" }, "context_relevance": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Context Relevance" } }, "additionalProperties": true } ```
* **Config:** - **extra**: *str = allow* * **Fields:** - [`bleu (float | None)`](#promptquality.types.rows.Metrics.bleu) - [`context_adherence (float | None)`](#promptquality.types.rows.Metrics.context_adherence) - [`context_adherence_explanation (str | None)`](#promptquality.types.rows.Metrics.context_adherence_explanation) - [`context_relevance (float | None)`](#promptquality.types.rows.Metrics.context_relevance) - [`correctness (float | None)`](#promptquality.types.rows.Metrics.correctness) - [`correctness_explanation (str | None)`](#promptquality.types.rows.Metrics.correctness_explanation) - [`latency (float | None)`](#promptquality.types.rows.Metrics.latency) - [`like_dislike (bool | None)`](#promptquality.types.rows.Metrics.like_dislike) - [`pii (List[str] | None)`](#promptquality.types.rows.Metrics.pii) - [`rouge (float | None)`](#promptquality.types.rows.Metrics.rouge) - [`toxicity (float | None)`](#promptquality.types.rows.Metrics.toxicity) - [`uncertainty (float | None)`](#promptquality.types.rows.Metrics.uncertainty)
Bases:
BaseModel
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "PromptRow", "type": "object", "properties": { "index": { "title": "Index", "type": "integer" }, "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Prompt" }, "response": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Response" }, "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Target" }, "inputs": { "additionalProperties": { "anyOf": [ {}, { "type": "null" } ] }, "title": "Inputs", "type": "object" }, "hallucination": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Hallucination" }, "bleu": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Bleu" }, "rouge": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Rouge" }, "cost": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Cost" }, "like_dislike": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Like Dislike" }, "metrics": { "$ref": "#/$defs/Metrics" } }, "$defs": { "Metrics": { "additionalProperties": true, "properties": { "hallucination": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Hallucination" }, "bleu": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Bleu" }, "rouge": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Rouge" }, "pii": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Pii" }, "like_dislike": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Like Dislike" }, "toxicity": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Toxicity" }, "factuality": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Factuality" }, "factuality_explanation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Factuality Explanation" }, "groundedness": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Groundedness" }, "groundedness_explanation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Groundedness Explanation" }, "latency": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Latency" }, "context_relevance": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Context Relevance" } }, "title": "Metrics", "type": "object" } }, "additionalProperties": true, "required": [ "index" ] } ```
* **Config:** - **extra**: *str = allow* * **Fields:** - [`bleu (float | None)`](#promptquality.types.rows.PromptRow.bleu) - [`cost (float | None)`](#promptquality.types.rows.PromptRow.cost) - [`hallucination (float | None)`](#promptquality.types.rows.PromptRow.hallucination) - [`index (int)`](#promptquality.types.rows.PromptRow.index) - [`inputs (Dict[str, Any | None])`](#promptquality.types.rows.PromptRow.inputs) - [`like_dislike (bool | None)`](#promptquality.types.rows.PromptRow.like_dislike) - [`metrics (promptquality.types.rows.Metrics)`](#promptquality.types.rows.PromptRow.metrics) - [`prompt (str | None)`](#promptquality.types.rows.PromptRow.prompt) - [`response (str | None)`](#promptquality.types.rows.PromptRow.response) - [`rouge (float | None)`](#promptquality.types.rows.PromptRow.rouge) - [`target (str | None)`](#promptquality.types.rows.PromptRow.target)
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "PromptRows", "type": "object", "properties": { "starting_token": { "default": 0, "title": "Starting Token", "type": "integer" }, "limit": { "default": 25, "title": "Limit", "type": "integer" }, "paginated": { "default": false, "title": "Paginated", "type": "boolean" }, "next_starting_token": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Next Starting Token" }, "rows": { "items": { "$ref": "#/$defs/PromptRow" }, "title": "Rows", "type": "array" } }, "$defs": { "Metrics": { "additionalProperties": true, "properties": { "hallucination": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Hallucination" }, "bleu": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Bleu" }, "rouge": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Rouge" }, "pii": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Pii" }, "like_dislike": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Like Dislike" }, "toxicity": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Toxicity" }, "factuality": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Factuality" }, "factuality_explanation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Factuality Explanation" }, "groundedness": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Groundedness" }, "groundedness_explanation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Groundedness Explanation" }, "latency": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Latency" }, "context_relevance": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Context Relevance" } }, "title": "Metrics", "type": "object" }, "PromptRow": { "additionalProperties": true, "properties": { "index": { "title": "Index", "type": "integer" }, "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Prompt" }, "response": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Response" }, "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Target" }, "inputs": { "additionalProperties": { "anyOf": [ {}, { "type": "null" } ] }, "title": "Inputs", "type": "object" }, "hallucination": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Hallucination" }, "bleu": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Bleu" }, "rouge": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Rouge" }, "cost": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Cost" }, "like_dislike": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Like Dislike" }, "metrics": { "$ref": "#/$defs/Metrics" } }, "required": [ "index" ], "title": "PromptRow", "type": "object" } } } ```
* **Fields:** - [`rows (List[promptquality.types.rows.PromptRow])`](#promptquality.types.rows.PromptRows.rows)
Bases:
BaseModel
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
* **Fields:** - [`name (str)`](#promptquality.types.run.RandomName.name) * **Validators:** - [`set_name`](#promptquality.types.run.RandomName.set_name) » [`name`](#promptquality.types.run.RandomName.name)
- Validated by:
- Return type:
str
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
* **Fields:** - [`type (str)`](#promptquality.types.run.CreateProjectRequest.type) * **Validators:** - [`set_name`](#promptquality.types.run.RandomName.set_name) » `name`
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "CreateProjectResponse", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "type": { "default": "prompt_evaluation", "title": "Type", "type": "string" }, "id": { "format": "uuid4", "title": "Id", "type": "string" } }, "required": [ "id" ] } ```
* **Fields:** - [`id (uuid.UUID)`](#promptquality.types.run.CreateProjectResponse.id) * **Validators:** - [`set_name`](#promptquality.types.run.RandomName.set_name) » `name`
- Constraints:
- uuid_version = 4
Bases:
BaseModel
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
* **Fields:** - [`template (str)`](#promptquality.types.run.BaseTemplateVersionRequest.template) - [`version (int | None)`](#promptquality.types.run.BaseTemplateVersionRequest.version)
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "CreateTemplateRequest", "type": "object", "properties": { "template": { "title": "Template", "type": "string" }, "version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Version" }, "name": { "title": "Name", "type": "string" }, "project_id": { "format": "uuid4", "title": "Project Id", "type": "string" } }, "required": [ "template", "project_id" ] } ```
* **Fields:** - [`project_id (uuid.UUID)`](#promptquality.types.run.CreateTemplateRequest.project_id) * **Validators:** - [`set_name`](#promptquality.types.run.RandomName.set_name) » `name`
- Constraints:
- uuid_version = 4
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "CreateTemplateVersionRequest", "type": "object", "properties": { "template": { "title": "Template", "type": "string" }, "version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Version" }, "template_id": { "format": "uuid4", "title": "Template Id", "type": "string" }, "project_id": { "format": "uuid4", "title": "Project Id", "type": "string" } }, "required": [ "template", "template_id", "project_id" ] } ```
* **Fields:** - [`project_id (uuid.UUID)`](#promptquality.types.run.CreateTemplateVersionRequest.project_id) - [`template_id (uuid.UUID)`](#promptquality.types.run.CreateTemplateVersionRequest.template_id)
- Constraints:
- uuid_version = 4
- Constraints:
- uuid_version = 4
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "BaseTemplateVersionResponse", "type": "object", "properties": { "template": { "title": "Template", "type": "string" }, "version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Version" }, "id": { "format": "uuid4", "title": "Id", "type": "string" } }, "required": [ "template", "id" ] } ```
* **Fields:** - [`id (uuid.UUID)`](#promptquality.types.run.BaseTemplateVersionResponse.id)
- Constraints:
- uuid_version = 4
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "CreateTemplateVersionResponse", "type": "object", "properties": { "template": { "title": "Template", "type": "string" }, "version": { "title": "Version", "type": "integer" }, "id": { "format": "uuid4", "title": "Id", "type": "string" } }, "required": [ "template", "version", "id" ] } ```
* **Fields:** - [`version (int)`](#promptquality.types.run.CreateTemplateVersionResponse.version)
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "BaseTemplateResponse", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "id": { "format": "uuid4", "title": "Id", "type": "string" }, "template": { "title": "Template", "type": "string" }, "selected_version": { "$ref": "#/$defs/CreateTemplateVersionResponse" }, "selected_version_id": { "format": "uuid4", "title": "Selected Version Id", "type": "string" }, "all_versions": { "items": { "$ref": "#/$defs/CreateTemplateVersionResponse" }, "title": "All Versions", "type": "array" } }, "$defs": { "CreateTemplateVersionResponse": { "properties": { "template": { "title": "Template", "type": "string" }, "version": { "title": "Version", "type": "integer" }, "id": { "format": "uuid4", "title": "Id", "type": "string" } }, "required": [ "template", "version", "id" ], "title": "CreateTemplateVersionResponse", "type": "object" } }, "required": [ "id", "template", "selected_version", "selected_version_id" ] } ```
* **Fields:** - [`all_versions (List[promptquality.types.run.CreateTemplateVersionResponse])`](#promptquality.types.run.BaseTemplateResponse.all_versions) - [`id (uuid.UUID)`](#promptquality.types.run.BaseTemplateResponse.id) - [`selected_version (promptquality.types.run.CreateTemplateVersionResponse)`](#promptquality.types.run.BaseTemplateResponse.selected_version) - [`selected_version_id (uuid.UUID)`](#promptquality.types.run.BaseTemplateResponse.selected_version_id) - [`template (str)`](#promptquality.types.run.BaseTemplateResponse.template) * **Validators:** - [`set_name`](#promptquality.types.run.RandomName.set_name) » `name`
- Constraints:
- uuid_version = 4
- Constraints:
- uuid_version = 4
Bases:
BaseModel
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "BaseDatasetRequest", "type": "object", "properties": { "format": { "allOf": [ { "$ref": "#/$defs/DatasetFormat" } ], "default": "csv" }, "file_path": { "format": "path", "title": "File Path", "type": "string" } }, "$defs": { "DatasetFormat": { "enum": [ "csv", "feather" ], "title": "DatasetFormat", "type": "string" } }, "required": [ "file_path" ] } ```
* **Fields:** - [`file_path (pathlib.Path)`](#promptquality.types.run.BaseDatasetRequest.file_path) - [`format (promptquality.constants.dataset_format.DatasetFormat)`](#promptquality.types.run.BaseDatasetRequest.format) * **Validators:** - [`dataset_to_path`](#promptquality.types.run.BaseDatasetRequest.dataset_to_path) » `all fields`
- Validated by:
- Validated by:
- Return type:
Dict
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.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
```json { "title": "UploadDatasetRequest", "type": "object", "properties": { "format": { "allOf": [ { "$ref": "#/$defs/DatasetFormat" } ], "default": "csv" }, "file_path": { "format": "path", "title": "File Path", "type": "string" }, "project_id": { "format": "uuid4", "title": "Project Id", "type": "string" }, "prompt_template_version_id": { "format": "uuid4", "title": "Prompt Template Version Id", "type": "string" } }, "$defs": { "DatasetFormat": { "enum": [ "csv", "feather" ], "title": "DatasetFormat", "type": "string" } }, "required": [ "file_path", "project_id", "prompt_template_version_id" ] } ```
* **Fields:** - [`file_path (pathlib.Path)`](#promptquality.types.run.UploadDatasetRequest.file_path) - [`project_id (uuid.UUID)`](#promptquality.types.run.UploadDatasetRequest.project_id) - [`prompt_template_version_id (uuid.UUID)`](#promptquality.types.run.UploadDatasetRequest.prompt_template_version_id) * **Validators:** - [`dataset_to_path`](#promptquality.types.run.BaseDatasetRequest.dataset_to_path) » `all fields`
- Validated by:
- Constraints:
- uuid_version = 4
- Validated by:
- Constraints:
- uuid_version = 4
- Validated by: