label-studio-sdk 1.0.8__py3-none-any.whl → 1.0.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of label-studio-sdk might be problematic. Click here for more details.
- label_studio_sdk/__init__.py +37 -8
- label_studio_sdk/_extensions/label_studio_tools/core/utils/io.py +16 -4
- label_studio_sdk/_extensions/label_studio_tools/core/utils/json_schema.py +5 -0
- label_studio_sdk/_extensions/pager_ext.py +8 -0
- label_studio_sdk/actions/client.py +91 -40
- label_studio_sdk/actions/types/actions_create_request_filters.py +14 -24
- label_studio_sdk/actions/types/actions_create_request_filters_items_item.py +16 -26
- label_studio_sdk/actions/types/actions_create_request_filters_items_item_value.py +3 -1
- label_studio_sdk/actions/types/actions_create_request_selected_items.py +1 -2
- label_studio_sdk/actions/types/actions_create_request_selected_items_excluded.py +15 -25
- label_studio_sdk/actions/types/actions_create_request_selected_items_included.py +15 -25
- label_studio_sdk/annotations/__init__.py +2 -2
- label_studio_sdk/annotations/client.py +278 -104
- label_studio_sdk/annotations/types/__init__.py +2 -1
- label_studio_sdk/annotations/types/annotations_create_bulk_request_selected_items.py +34 -0
- label_studio_sdk/annotations/types/annotations_create_bulk_response_item.py +11 -21
- label_studio_sdk/base_client.py +54 -27
- label_studio_sdk/client.py +1 -0
- label_studio_sdk/comments/client.py +190 -44
- label_studio_sdk/converter/converter.py +56 -13
- label_studio_sdk/converter/imports/yolo.py +1 -1
- label_studio_sdk/converter/utils.py +3 -2
- label_studio_sdk/core/__init__.py +21 -4
- label_studio_sdk/core/client_wrapper.py +37 -19
- label_studio_sdk/core/file.py +37 -8
- label_studio_sdk/core/http_client.py +52 -28
- label_studio_sdk/core/jsonable_encoder.py +33 -31
- label_studio_sdk/core/pagination.py +5 -4
- label_studio_sdk/core/pydantic_utilities.py +272 -4
- label_studio_sdk/core/query_encoder.py +38 -13
- label_studio_sdk/core/request_options.py +3 -0
- label_studio_sdk/core/serialization.py +272 -0
- label_studio_sdk/errors/__init__.py +3 -1
- label_studio_sdk/errors/bad_request_error.py +2 -3
- label_studio_sdk/errors/not_found_error.py +9 -0
- label_studio_sdk/errors/unauthorized_error.py +9 -0
- label_studio_sdk/export_storage/azure/client.py +228 -58
- label_studio_sdk/export_storage/azure/types/azure_create_response.py +19 -29
- label_studio_sdk/export_storage/azure/types/azure_update_response.py +19 -29
- label_studio_sdk/export_storage/client.py +48 -18
- label_studio_sdk/export_storage/gcs/client.py +228 -58
- label_studio_sdk/export_storage/gcs/types/gcs_create_response.py +19 -29
- label_studio_sdk/export_storage/gcs/types/gcs_update_response.py +19 -29
- label_studio_sdk/export_storage/local/client.py +222 -56
- label_studio_sdk/export_storage/local/types/local_create_response.py +17 -27
- label_studio_sdk/export_storage/local/types/local_update_response.py +17 -27
- label_studio_sdk/export_storage/redis/client.py +228 -58
- label_studio_sdk/export_storage/redis/types/redis_create_response.py +20 -30
- label_studio_sdk/export_storage/redis/types/redis_update_response.py +20 -30
- label_studio_sdk/export_storage/s3/client.py +228 -58
- label_studio_sdk/export_storage/s3/types/s3create_response.py +27 -35
- label_studio_sdk/export_storage/s3/types/s3update_response.py +27 -35
- label_studio_sdk/export_storage/s3s/client.py +187 -43
- label_studio_sdk/export_storage/types/export_storage_list_types_response_item.py +11 -21
- label_studio_sdk/files/client.py +172 -56
- label_studio_sdk/import_storage/azure/client.py +223 -53
- label_studio_sdk/import_storage/azure/types/azure_create_response.py +22 -32
- label_studio_sdk/import_storage/azure/types/azure_update_response.py +22 -32
- label_studio_sdk/import_storage/client.py +48 -18
- label_studio_sdk/import_storage/gcs/client.py +223 -53
- label_studio_sdk/import_storage/gcs/types/gcs_create_response.py +22 -32
- label_studio_sdk/import_storage/gcs/types/gcs_update_response.py +22 -32
- label_studio_sdk/import_storage/local/client.py +223 -53
- label_studio_sdk/import_storage/local/types/local_create_response.py +17 -27
- label_studio_sdk/import_storage/local/types/local_update_response.py +17 -27
- label_studio_sdk/import_storage/redis/client.py +223 -53
- label_studio_sdk/import_storage/redis/types/redis_create_response.py +20 -30
- label_studio_sdk/import_storage/redis/types/redis_update_response.py +20 -30
- label_studio_sdk/import_storage/s3/client.py +223 -53
- label_studio_sdk/import_storage/s3/types/s3create_response.py +31 -39
- label_studio_sdk/import_storage/s3/types/s3update_response.py +31 -39
- label_studio_sdk/import_storage/s3s/client.py +222 -52
- label_studio_sdk/import_storage/types/import_storage_list_types_response_item.py +11 -21
- label_studio_sdk/jwt_settings/__init__.py +2 -0
- label_studio_sdk/jwt_settings/client.py +259 -0
- label_studio_sdk/label_interface/control_tags.py +16 -3
- label_studio_sdk/label_interface/interface.py +80 -1
- label_studio_sdk/label_interface/object_tags.py +2 -2
- label_studio_sdk/ml/client.py +280 -78
- label_studio_sdk/ml/types/ml_create_response.py +21 -31
- label_studio_sdk/ml/types/ml_update_response.py +21 -31
- label_studio_sdk/model_providers/client.py +173 -56
- label_studio_sdk/predictions/client.py +247 -101
- label_studio_sdk/projects/__init__.py +5 -1
- label_studio_sdk/projects/client.py +313 -115
- label_studio_sdk/projects/client_ext.py +16 -0
- label_studio_sdk/projects/exports/__init__.py +3 -0
- label_studio_sdk/projects/exports/client.py +447 -296
- label_studio_sdk/projects/exports/client_ext.py +200 -0
- label_studio_sdk/projects/exports/types/__init__.py +6 -0
- label_studio_sdk/projects/exports/types/exports_convert_response.py +24 -0
- label_studio_sdk/projects/exports/types/exports_list_formats_response_item.py +44 -0
- label_studio_sdk/projects/pauses/__init__.py +2 -0
- label_studio_sdk/projects/pauses/client.py +704 -0
- label_studio_sdk/projects/types/projects_create_response.py +29 -34
- label_studio_sdk/projects/types/projects_import_tasks_response.py +19 -29
- label_studio_sdk/projects/types/projects_list_response.py +11 -21
- label_studio_sdk/projects/types/projects_update_response.py +34 -34
- label_studio_sdk/prompts/client.py +309 -92
- label_studio_sdk/prompts/indicators/client.py +67 -23
- label_studio_sdk/prompts/runs/client.py +95 -40
- label_studio_sdk/prompts/types/prompts_batch_failed_predictions_request_failed_predictions_item.py +14 -24
- label_studio_sdk/prompts/types/prompts_batch_failed_predictions_response.py +11 -21
- label_studio_sdk/prompts/types/prompts_batch_predictions_request_results_item.py +26 -29
- label_studio_sdk/prompts/types/prompts_batch_predictions_response.py +11 -21
- label_studio_sdk/prompts/versions/client.py +277 -88
- label_studio_sdk/tasks/client.py +263 -90
- label_studio_sdk/tasks/types/tasks_list_response.py +15 -25
- label_studio_sdk/tokens/__init__.py +2 -0
- label_studio_sdk/tokens/client.py +470 -0
- label_studio_sdk/tokens/client_ext.py +94 -0
- label_studio_sdk/types/__init__.py +20 -6
- label_studio_sdk/types/access_token_response.py +22 -0
- label_studio_sdk/types/annotation.py +29 -38
- label_studio_sdk/types/annotation_filter_options.py +14 -24
- label_studio_sdk/types/annotations_dm_field.py +30 -39
- label_studio_sdk/types/api_token_response.py +32 -0
- label_studio_sdk/types/azure_blob_export_storage.py +28 -37
- label_studio_sdk/types/azure_blob_import_storage.py +28 -37
- label_studio_sdk/types/base_task.py +30 -39
- label_studio_sdk/types/base_task_updated_by.py +3 -1
- label_studio_sdk/types/base_user.py +14 -21
- label_studio_sdk/types/comment.py +12 -21
- label_studio_sdk/types/comment_created_by.py +1 -1
- label_studio_sdk/types/converted_format.py +12 -22
- label_studio_sdk/types/data_manager_task_serializer.py +31 -40
- label_studio_sdk/types/data_manager_task_serializer_annotators_item.py +1 -1
- label_studio_sdk/types/data_manager_task_serializer_drafts_item.py +13 -22
- label_studio_sdk/types/data_manager_task_serializer_predictions_item.py +15 -24
- label_studio_sdk/types/export.py +17 -26
- label_studio_sdk/types/export_format.py +25 -0
- label_studio_sdk/types/export_snapshot.py +45 -0
- label_studio_sdk/types/export_snapshot_status.py +5 -0
- label_studio_sdk/types/file_upload.py +11 -21
- label_studio_sdk/types/filter.py +16 -26
- label_studio_sdk/types/filter_group.py +12 -22
- label_studio_sdk/types/gcs_export_storage.py +28 -37
- label_studio_sdk/types/gcs_import_storage.py +28 -37
- label_studio_sdk/types/inference_run.py +14 -23
- label_studio_sdk/types/inference_run_cost_estimate.py +17 -27
- label_studio_sdk/types/inference_run_created_by.py +1 -1
- label_studio_sdk/types/inference_run_organization.py +1 -1
- label_studio_sdk/types/jwt_settings_response.py +32 -0
- label_studio_sdk/types/key_indicator_value.py +12 -22
- label_studio_sdk/types/key_indicators.py +0 -1
- label_studio_sdk/types/key_indicators_item.py +15 -25
- label_studio_sdk/types/key_indicators_item_additional_kpis_item.py +13 -23
- label_studio_sdk/types/key_indicators_item_extra_kpis_item.py +13 -23
- label_studio_sdk/types/local_files_export_storage.py +25 -34
- label_studio_sdk/types/local_files_import_storage.py +24 -33
- label_studio_sdk/types/ml_backend.py +23 -32
- label_studio_sdk/types/model_provider_connection.py +22 -31
- label_studio_sdk/types/model_provider_connection_created_by.py +1 -1
- label_studio_sdk/types/model_provider_connection_organization.py +1 -1
- label_studio_sdk/types/model_provider_connection_provider.py +3 -1
- label_studio_sdk/types/pause.py +34 -0
- label_studio_sdk/types/pause_paused_by.py +5 -0
- label_studio_sdk/types/prediction.py +21 -30
- label_studio_sdk/types/project.py +58 -55
- label_studio_sdk/types/project_import.py +21 -30
- label_studio_sdk/types/project_label_config.py +12 -22
- label_studio_sdk/types/prompt.py +24 -32
- label_studio_sdk/types/prompt_associated_projects_item.py +6 -0
- label_studio_sdk/types/prompt_associated_projects_item_id.py +20 -0
- label_studio_sdk/types/prompt_created_by.py +1 -1
- label_studio_sdk/types/prompt_organization.py +1 -1
- label_studio_sdk/types/prompt_version.py +13 -22
- label_studio_sdk/types/prompt_version_created_by.py +1 -1
- label_studio_sdk/types/prompt_version_organization.py +1 -1
- label_studio_sdk/types/prompt_version_provider.py +3 -1
- label_studio_sdk/types/redis_export_storage.py +29 -38
- label_studio_sdk/types/redis_import_storage.py +28 -37
- label_studio_sdk/types/refined_prompt_response.py +19 -29
- label_studio_sdk/types/s3export_storage.py +36 -43
- label_studio_sdk/types/s3import_storage.py +37 -44
- label_studio_sdk/types/s3s_export_storage.py +26 -33
- label_studio_sdk/types/s3s_import_storage.py +35 -42
- label_studio_sdk/types/serialization_option.py +12 -22
- label_studio_sdk/types/serialization_options.py +18 -28
- label_studio_sdk/types/task.py +44 -47
- label_studio_sdk/types/task_annotators_item.py +1 -1
- label_studio_sdk/types/task_comment_authors_item.py +1 -1
- label_studio_sdk/types/task_filter_options.py +15 -25
- label_studio_sdk/types/user_simple.py +11 -21
- label_studio_sdk/types/view.py +16 -26
- label_studio_sdk/types/webhook.py +19 -28
- label_studio_sdk/types/webhook_serializer_for_update.py +19 -28
- label_studio_sdk/types/workspace.py +22 -31
- label_studio_sdk/users/client.py +257 -63
- label_studio_sdk/users/types/users_get_token_response.py +12 -22
- label_studio_sdk/users/types/users_reset_token_response.py +12 -22
- label_studio_sdk/version.py +0 -1
- label_studio_sdk/versions/__init__.py +5 -0
- label_studio_sdk/versions/client.py +112 -0
- label_studio_sdk/versions/types/__init__.py +6 -0
- label_studio_sdk/versions/types/versions_get_response.py +73 -0
- label_studio_sdk/versions/types/versions_get_response_edition.py +5 -0
- label_studio_sdk/views/client.py +219 -52
- label_studio_sdk/views/types/views_create_request_data.py +13 -23
- label_studio_sdk/views/types/views_create_request_data_filters.py +14 -24
- label_studio_sdk/views/types/views_create_request_data_filters_items_item.py +16 -26
- label_studio_sdk/views/types/views_create_request_data_filters_items_item_value.py +3 -1
- label_studio_sdk/views/types/views_update_request_data.py +13 -23
- label_studio_sdk/views/types/views_update_request_data_filters.py +14 -24
- label_studio_sdk/views/types/views_update_request_data_filters_items_item.py +16 -26
- label_studio_sdk/views/types/views_update_request_data_filters_items_item_value.py +3 -1
- label_studio_sdk/webhooks/client.py +191 -61
- label_studio_sdk/workspaces/client.py +164 -41
- label_studio_sdk/workspaces/members/client.py +109 -31
- label_studio_sdk/workspaces/members/types/members_create_response.py +12 -22
- label_studio_sdk/workspaces/members/types/members_list_response_item.py +12 -22
- {label_studio_sdk-1.0.8.dist-info → label_studio_sdk-1.0.11.dist-info}/METADATA +8 -5
- {label_studio_sdk-1.0.8.dist-info → label_studio_sdk-1.0.11.dist-info}/RECORD +215 -188
- {label_studio_sdk-1.0.8.dist-info → label_studio_sdk-1.0.11.dist-info}/WHEEL +1 -1
- label_studio_sdk/types/export_convert.py +0 -32
- label_studio_sdk/types/export_create.py +0 -54
- label_studio_sdk/types/export_create_status.py +0 -5
- {label_studio_sdk-1.0.8.dist-info → label_studio_sdk-1.0.11.dist-info}/LICENSE +0 -0
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
4
|
import typing
|
|
5
|
-
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
|
8
5
|
from .project_import_status import ProjectImportStatus
|
|
6
|
+
import datetime as dt
|
|
7
|
+
import pydantic
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class ProjectImport(
|
|
11
|
+
class ProjectImport(UniversalBaseModel):
|
|
12
12
|
id: typing.Optional[int] = None
|
|
13
|
-
preannotated_from_fields: typing.Optional[typing.Dict[str, typing.Any]] = None
|
|
13
|
+
preannotated_from_fields: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
14
14
|
commit_to_project: typing.Optional[bool] = None
|
|
15
15
|
return_task_ids: typing.Optional[bool] = None
|
|
16
16
|
status: typing.Optional[ProjectImportStatus] = None
|
|
17
17
|
url: typing.Optional[str] = None
|
|
18
18
|
traceback: typing.Optional[str] = None
|
|
19
19
|
error: typing.Optional[str] = None
|
|
20
|
-
created_at: typing.Optional[dt.datetime] =
|
|
20
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
21
21
|
"""
|
|
22
22
|
Creation time
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
|
-
updated_at: typing.Optional[dt.datetime] =
|
|
25
|
+
updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
26
26
|
"""
|
|
27
27
|
Updated time
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
|
-
finished_at: typing.Optional[dt.datetime] =
|
|
30
|
+
finished_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
31
31
|
"""
|
|
32
32
|
Complete or fail time
|
|
33
33
|
"""
|
|
@@ -36,28 +36,19 @@ class ProjectImport(pydantic_v1.BaseModel):
|
|
|
36
36
|
annotation_count: typing.Optional[int] = None
|
|
37
37
|
prediction_count: typing.Optional[int] = None
|
|
38
38
|
duration: typing.Optional[int] = None
|
|
39
|
-
file_upload_ids: typing.Optional[typing.Dict[str, typing.Any]] = None
|
|
39
|
+
file_upload_ids: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
40
40
|
could_be_tasks_list: typing.Optional[bool] = None
|
|
41
|
-
found_formats: typing.Optional[typing.Dict[str, typing.Any]] = None
|
|
42
|
-
data_columns: typing.Optional[typing.Dict[str, typing.Any]] = None
|
|
43
|
-
tasks: typing.Optional[typing.Dict[str, typing.Any]] = None
|
|
44
|
-
task_ids: typing.Optional[typing.Dict[str, typing.Any]] = None
|
|
41
|
+
found_formats: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
42
|
+
data_columns: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
43
|
+
tasks: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
44
|
+
task_ids: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
45
45
|
project: typing.Optional[int] = None
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
52
|
-
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
53
|
-
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
|
54
|
-
|
|
55
|
-
return deep_union_pydantic_dicts(
|
|
56
|
-
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
|
57
|
-
)
|
|
47
|
+
if IS_PYDANTIC_V2:
|
|
48
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
49
|
+
else:
|
|
58
50
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
|
51
|
+
class Config:
|
|
52
|
+
frozen = True
|
|
53
|
+
smart_union = True
|
|
54
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,32 +1,22 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import pydantic
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
4
6
|
import typing
|
|
5
7
|
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
label_config: str = pydantic_v1.Field()
|
|
9
|
+
class ProjectLabelConfig(UniversalBaseModel):
|
|
10
|
+
label_config: str = pydantic.Field()
|
|
12
11
|
"""
|
|
13
12
|
Label config in XML format. See more about it in documentation
|
|
14
13
|
"""
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
21
|
-
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
22
|
-
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
|
23
|
-
|
|
24
|
-
return deep_union_pydantic_dicts(
|
|
25
|
-
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
|
26
|
-
)
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
27
18
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
label_studio_sdk/types/prompt.py
CHANGED
|
@@ -1,79 +1,71 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import pydantic
|
|
4
5
|
import typing
|
|
5
|
-
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
|
8
6
|
from .prompt_created_by import PromptCreatedBy
|
|
7
|
+
import datetime as dt
|
|
9
8
|
from .prompt_organization import PromptOrganization
|
|
9
|
+
from .prompt_associated_projects_item import PromptAssociatedProjectsItem
|
|
10
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
class Prompt(
|
|
13
|
-
title: str =
|
|
13
|
+
class Prompt(UniversalBaseModel):
|
|
14
|
+
title: str = pydantic.Field()
|
|
14
15
|
"""
|
|
15
16
|
Title of the prompt
|
|
16
17
|
"""
|
|
17
18
|
|
|
18
|
-
description: typing.Optional[str] =
|
|
19
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
19
20
|
"""
|
|
20
21
|
Description of the prompt
|
|
21
22
|
"""
|
|
22
23
|
|
|
23
|
-
created_by: typing.Optional[PromptCreatedBy] =
|
|
24
|
+
created_by: typing.Optional[PromptCreatedBy] = pydantic.Field(default=None)
|
|
24
25
|
"""
|
|
25
26
|
User ID of the creator of the prompt
|
|
26
27
|
"""
|
|
27
28
|
|
|
28
|
-
created_at: typing.Optional[dt.datetime] =
|
|
29
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
29
30
|
"""
|
|
30
31
|
Date and time the prompt was created
|
|
31
32
|
"""
|
|
32
33
|
|
|
33
|
-
updated_at: typing.Optional[dt.datetime] =
|
|
34
|
+
updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
34
35
|
"""
|
|
35
36
|
Date and time the prompt was last updated
|
|
36
37
|
"""
|
|
37
38
|
|
|
38
|
-
organization: typing.Optional[PromptOrganization] =
|
|
39
|
+
organization: typing.Optional[PromptOrganization] = pydantic.Field(default=None)
|
|
39
40
|
"""
|
|
40
41
|
Organization ID of the prompt
|
|
41
42
|
"""
|
|
42
43
|
|
|
43
|
-
input_fields: typing.List[str] =
|
|
44
|
+
input_fields: typing.List[str] = pydantic.Field()
|
|
44
45
|
"""
|
|
45
46
|
List of input fields
|
|
46
47
|
"""
|
|
47
48
|
|
|
48
|
-
output_classes: typing.List[str] =
|
|
49
|
+
output_classes: typing.List[str] = pydantic.Field()
|
|
49
50
|
"""
|
|
50
51
|
List of output classes
|
|
51
52
|
"""
|
|
52
53
|
|
|
53
|
-
associated_projects: typing.Optional[typing.List[
|
|
54
|
+
associated_projects: typing.Optional[typing.List[PromptAssociatedProjectsItem]] = pydantic.Field(default=None)
|
|
54
55
|
"""
|
|
55
|
-
List of associated projects IDs
|
|
56
|
+
List of associated projects IDs or objects
|
|
56
57
|
"""
|
|
57
58
|
|
|
58
|
-
skill_name: typing.Optional[str] =
|
|
59
|
+
skill_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
59
60
|
"""
|
|
60
61
|
Name of the skill
|
|
61
62
|
"""
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
68
|
-
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
69
|
-
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
|
70
|
-
|
|
71
|
-
return deep_union_pydantic_dicts(
|
|
72
|
-
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
|
73
|
-
)
|
|
64
|
+
if IS_PYDANTIC_V2:
|
|
65
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
66
|
+
else:
|
|
74
67
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
|
68
|
+
class Config:
|
|
69
|
+
frozen = True
|
|
70
|
+
smart_union = True
|
|
71
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class PromptAssociatedProjectsItemId(UniversalBaseModel):
|
|
10
|
+
id: typing.Optional[int] = None
|
|
11
|
+
title: typing.Optional[str] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
4
|
import typing
|
|
5
|
-
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
|
5
|
+
from .prompt_version_provider import PromptVersionProvider
|
|
8
6
|
from .prompt_version_created_by import PromptVersionCreatedBy
|
|
7
|
+
import datetime as dt
|
|
9
8
|
from .prompt_version_organization import PromptVersionOrganization
|
|
10
|
-
from .
|
|
9
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
10
|
+
import pydantic
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
class PromptVersion(
|
|
13
|
+
class PromptVersion(UniversalBaseModel):
|
|
14
14
|
title: typing.Optional[str] = None
|
|
15
15
|
parent_model: typing.Optional[int] = None
|
|
16
16
|
model_provider_connection: typing.Optional[int] = None
|
|
@@ -22,20 +22,11 @@ class PromptVersion(pydantic_v1.BaseModel):
|
|
|
22
22
|
updated_at: typing.Optional[dt.datetime] = None
|
|
23
23
|
organization: typing.Optional[PromptVersionOrganization] = None
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
30
|
-
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
31
|
-
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
|
32
|
-
|
|
33
|
-
return deep_union_pydantic_dicts(
|
|
34
|
-
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
|
35
|
-
)
|
|
25
|
+
if IS_PYDANTIC_V2:
|
|
26
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
27
|
+
else:
|
|
36
28
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
|
29
|
+
class Config:
|
|
30
|
+
frozen = True
|
|
31
|
+
smart_union = True
|
|
32
|
+
extra = pydantic.Extra.allow
|
|
@@ -2,4 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
|
-
PromptVersionProvider = typing.Union[
|
|
5
|
+
PromptVersionProvider = typing.Union[
|
|
6
|
+
typing.Literal["OpenAI", "AzureOpenAI", "AzureAIFoundry", "VertexAI", "Gemini", "Anthropic", "Custom"], typing.Any
|
|
7
|
+
]
|
|
@@ -1,117 +1,108 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
4
|
import typing
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
|
5
|
+
import pydantic
|
|
6
|
+
import datetime as dt
|
|
8
7
|
from .redis_export_storage_status import RedisExportStorageStatus
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class RedisExportStorage(
|
|
11
|
+
class RedisExportStorage(UniversalBaseModel):
|
|
12
12
|
id: typing.Optional[int] = None
|
|
13
13
|
type: typing.Optional[str] = None
|
|
14
14
|
synchronizable: typing.Optional[bool] = None
|
|
15
|
-
path: typing.Optional[str] =
|
|
15
|
+
path: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
16
|
"""
|
|
17
17
|
Storage prefix (optional)
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
host: typing.Optional[str] =
|
|
20
|
+
host: typing.Optional[str] = pydantic.Field(default=None)
|
|
21
21
|
"""
|
|
22
22
|
Server Host IP (optional)
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
|
-
port: typing.Optional[str] =
|
|
25
|
+
port: typing.Optional[str] = pydantic.Field(default=None)
|
|
26
26
|
"""
|
|
27
27
|
Server Port (optional)
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
|
-
password: typing.Optional[str] =
|
|
30
|
+
password: typing.Optional[str] = pydantic.Field(default=None)
|
|
31
31
|
"""
|
|
32
32
|
Server Password (optional)
|
|
33
33
|
"""
|
|
34
34
|
|
|
35
|
-
regex_filter: typing.Optional[str] =
|
|
35
|
+
regex_filter: typing.Optional[str] = pydantic.Field(default=None)
|
|
36
36
|
"""
|
|
37
37
|
Cloud storage regex for filtering objects
|
|
38
38
|
"""
|
|
39
39
|
|
|
40
|
-
use_blob_urls: typing.Optional[bool] =
|
|
40
|
+
use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None)
|
|
41
41
|
"""
|
|
42
42
|
Interpret objects as BLOBs and generate URLs
|
|
43
43
|
"""
|
|
44
44
|
|
|
45
|
-
last_sync: typing.Optional[dt.datetime] =
|
|
45
|
+
last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
46
46
|
"""
|
|
47
47
|
Last sync finished time
|
|
48
48
|
"""
|
|
49
49
|
|
|
50
|
-
last_sync_count: typing.Optional[int] =
|
|
50
|
+
last_sync_count: typing.Optional[int] = pydantic.Field(default=None)
|
|
51
51
|
"""
|
|
52
52
|
Count of tasks synced last time
|
|
53
53
|
"""
|
|
54
54
|
|
|
55
|
-
last_sync_job: typing.Optional[str] =
|
|
55
|
+
last_sync_job: typing.Optional[str] = pydantic.Field(default=None)
|
|
56
56
|
"""
|
|
57
57
|
Last sync job ID
|
|
58
58
|
"""
|
|
59
59
|
|
|
60
60
|
status: typing.Optional[RedisExportStorageStatus] = None
|
|
61
|
-
traceback: typing.Optional[str] =
|
|
61
|
+
traceback: typing.Optional[str] = pydantic.Field(default=None)
|
|
62
62
|
"""
|
|
63
63
|
Traceback report for the last failed sync
|
|
64
64
|
"""
|
|
65
65
|
|
|
66
|
-
meta: typing.Optional[typing.Dict[str, typing.Any]] =
|
|
66
|
+
meta: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
67
67
|
"""
|
|
68
68
|
Meta and debug information about storage processes
|
|
69
69
|
"""
|
|
70
70
|
|
|
71
|
-
title: typing.Optional[str] =
|
|
71
|
+
title: typing.Optional[str] = pydantic.Field(default=None)
|
|
72
72
|
"""
|
|
73
73
|
Cloud storage title
|
|
74
74
|
"""
|
|
75
75
|
|
|
76
|
-
description: typing.Optional[str] =
|
|
76
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
77
77
|
"""
|
|
78
78
|
Cloud storage description
|
|
79
79
|
"""
|
|
80
80
|
|
|
81
|
-
created_at: typing.Optional[dt.datetime] =
|
|
81
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
82
82
|
"""
|
|
83
83
|
Creation time
|
|
84
84
|
"""
|
|
85
85
|
|
|
86
|
-
can_delete_objects: typing.Optional[bool] =
|
|
86
|
+
can_delete_objects: typing.Optional[bool] = pydantic.Field(default=None)
|
|
87
87
|
"""
|
|
88
88
|
Deletion from storage enabled
|
|
89
89
|
"""
|
|
90
90
|
|
|
91
|
-
db: typing.Optional[int] =
|
|
91
|
+
db: typing.Optional[int] = pydantic.Field(default=None)
|
|
92
92
|
"""
|
|
93
93
|
Server Database
|
|
94
94
|
"""
|
|
95
95
|
|
|
96
|
-
project: int =
|
|
96
|
+
project: int = pydantic.Field()
|
|
97
97
|
"""
|
|
98
98
|
A unique integer value identifying this project.
|
|
99
99
|
"""
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
106
|
-
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
107
|
-
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
|
108
|
-
|
|
109
|
-
return deep_union_pydantic_dicts(
|
|
110
|
-
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
|
111
|
-
)
|
|
101
|
+
if IS_PYDANTIC_V2:
|
|
102
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
103
|
+
else:
|
|
112
104
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
|
105
|
+
class Config:
|
|
106
|
+
frozen = True
|
|
107
|
+
smart_union = True
|
|
108
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,112 +1,103 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
4
|
import typing
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
|
5
|
+
import pydantic
|
|
6
|
+
import datetime as dt
|
|
8
7
|
from .redis_import_storage_status import RedisImportStorageStatus
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class RedisImportStorage(
|
|
11
|
+
class RedisImportStorage(UniversalBaseModel):
|
|
12
12
|
id: typing.Optional[int] = None
|
|
13
13
|
type: typing.Optional[str] = None
|
|
14
14
|
synchronizable: typing.Optional[bool] = None
|
|
15
|
-
path: typing.Optional[str] =
|
|
15
|
+
path: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
16
|
"""
|
|
17
17
|
Storage prefix (optional)
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
host: typing.Optional[str] =
|
|
20
|
+
host: typing.Optional[str] = pydantic.Field(default=None)
|
|
21
21
|
"""
|
|
22
22
|
Server Host IP (optional)
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
|
-
port: typing.Optional[str] =
|
|
25
|
+
port: typing.Optional[str] = pydantic.Field(default=None)
|
|
26
26
|
"""
|
|
27
27
|
Server Port (optional)
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
|
-
password: typing.Optional[str] =
|
|
30
|
+
password: typing.Optional[str] = pydantic.Field(default=None)
|
|
31
31
|
"""
|
|
32
32
|
Server Password (optional)
|
|
33
33
|
"""
|
|
34
34
|
|
|
35
|
-
regex_filter: typing.Optional[str] =
|
|
35
|
+
regex_filter: typing.Optional[str] = pydantic.Field(default=None)
|
|
36
36
|
"""
|
|
37
37
|
Cloud storage regex for filtering objects
|
|
38
38
|
"""
|
|
39
39
|
|
|
40
|
-
use_blob_urls: typing.Optional[bool] =
|
|
40
|
+
use_blob_urls: typing.Optional[bool] = pydantic.Field(default=None)
|
|
41
41
|
"""
|
|
42
42
|
Interpret objects as BLOBs and generate URLs
|
|
43
43
|
"""
|
|
44
44
|
|
|
45
|
-
last_sync: typing.Optional[dt.datetime] =
|
|
45
|
+
last_sync: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
46
46
|
"""
|
|
47
47
|
Last sync finished time
|
|
48
48
|
"""
|
|
49
49
|
|
|
50
|
-
last_sync_count: typing.Optional[int] =
|
|
50
|
+
last_sync_count: typing.Optional[int] = pydantic.Field(default=None)
|
|
51
51
|
"""
|
|
52
52
|
Count of tasks synced last time
|
|
53
53
|
"""
|
|
54
54
|
|
|
55
|
-
last_sync_job: typing.Optional[str] =
|
|
55
|
+
last_sync_job: typing.Optional[str] = pydantic.Field(default=None)
|
|
56
56
|
"""
|
|
57
57
|
Last sync job ID
|
|
58
58
|
"""
|
|
59
59
|
|
|
60
60
|
status: typing.Optional[RedisImportStorageStatus] = None
|
|
61
|
-
traceback: typing.Optional[str] =
|
|
61
|
+
traceback: typing.Optional[str] = pydantic.Field(default=None)
|
|
62
62
|
"""
|
|
63
63
|
Traceback report for the last failed sync
|
|
64
64
|
"""
|
|
65
65
|
|
|
66
|
-
meta: typing.Optional[typing.Dict[str, typing.Any]] =
|
|
66
|
+
meta: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
67
67
|
"""
|
|
68
68
|
Meta and debug information about storage processes
|
|
69
69
|
"""
|
|
70
70
|
|
|
71
|
-
title: typing.Optional[str] =
|
|
71
|
+
title: typing.Optional[str] = pydantic.Field(default=None)
|
|
72
72
|
"""
|
|
73
73
|
Cloud storage title
|
|
74
74
|
"""
|
|
75
75
|
|
|
76
|
-
description: typing.Optional[str] =
|
|
76
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
77
77
|
"""
|
|
78
78
|
Cloud storage description
|
|
79
79
|
"""
|
|
80
80
|
|
|
81
|
-
created_at: typing.Optional[dt.datetime] =
|
|
81
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
82
82
|
"""
|
|
83
83
|
Creation time
|
|
84
84
|
"""
|
|
85
85
|
|
|
86
|
-
db: typing.Optional[int] =
|
|
86
|
+
db: typing.Optional[int] = pydantic.Field(default=None)
|
|
87
87
|
"""
|
|
88
88
|
Server Database
|
|
89
89
|
"""
|
|
90
90
|
|
|
91
|
-
project: int =
|
|
91
|
+
project: int = pydantic.Field()
|
|
92
92
|
"""
|
|
93
93
|
A unique integer value identifying this project.
|
|
94
94
|
"""
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
101
|
-
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
102
|
-
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
|
103
|
-
|
|
104
|
-
return deep_union_pydantic_dicts(
|
|
105
|
-
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
|
106
|
-
)
|
|
96
|
+
if IS_PYDANTIC_V2:
|
|
97
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
98
|
+
else:
|
|
107
99
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
|
100
|
+
class Config:
|
|
101
|
+
frozen = True
|
|
102
|
+
smart_union = True
|
|
103
|
+
extra = pydantic.Extra.allow
|