label-studio-sdk 1.0.5__py3-none-any.whl → 1.0.7__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.
- label_studio_sdk/__init__.py +70 -0
- label_studio_sdk/_extensions/eval/categorical.py +83 -0
- label_studio_sdk/_extensions/label_studio_tools/core/utils/io.py +35 -17
- label_studio_sdk/annotations/__init__.py +3 -0
- label_studio_sdk/annotations/client.py +109 -0
- label_studio_sdk/annotations/types/__init__.py +5 -0
- label_studio_sdk/annotations/types/annotations_create_bulk_response_item.py +29 -0
- label_studio_sdk/base_client.py +9 -0
- label_studio_sdk/comments/__init__.py +2 -0
- label_studio_sdk/comments/client.py +512 -0
- label_studio_sdk/converter/converter.py +2 -0
- label_studio_sdk/converter/imports/coco.py +14 -13
- label_studio_sdk/converter/utils.py +72 -3
- label_studio_sdk/core/client_wrapper.py +1 -1
- label_studio_sdk/files/client.py +26 -16
- label_studio_sdk/label_interface/interface.py +38 -5
- label_studio_sdk/model_providers/__init__.py +2 -0
- label_studio_sdk/model_providers/client.py +190 -0
- label_studio_sdk/projects/client.py +32 -16
- label_studio_sdk/projects/exports/client.py +133 -40
- label_studio_sdk/prompts/__init__.py +21 -0
- label_studio_sdk/prompts/client.py +862 -0
- label_studio_sdk/prompts/indicators/__init__.py +2 -0
- label_studio_sdk/prompts/indicators/client.py +194 -0
- label_studio_sdk/prompts/runs/__init__.py +5 -0
- label_studio_sdk/prompts/runs/client.py +354 -0
- label_studio_sdk/prompts/runs/types/__init__.py +5 -0
- label_studio_sdk/prompts/runs/types/runs_list_request_project_subset.py +5 -0
- label_studio_sdk/prompts/types/__init__.py +15 -0
- label_studio_sdk/prompts/types/prompts_batch_failed_predictions_request_failed_predictions_item.py +42 -0
- label_studio_sdk/prompts/types/prompts_batch_failed_predictions_response.py +29 -0
- label_studio_sdk/prompts/types/prompts_batch_predictions_request_results_item.py +62 -0
- label_studio_sdk/prompts/types/prompts_batch_predictions_response.py +29 -0
- label_studio_sdk/prompts/versions/__init__.py +2 -0
- label_studio_sdk/prompts/versions/client.py +921 -0
- label_studio_sdk/types/__init__.py +52 -0
- label_studio_sdk/types/comment.py +39 -0
- label_studio_sdk/types/comment_created_by.py +5 -0
- label_studio_sdk/types/inference_run.py +43 -0
- label_studio_sdk/types/inference_run_created_by.py +5 -0
- label_studio_sdk/types/inference_run_organization.py +5 -0
- label_studio_sdk/types/inference_run_project_subset.py +5 -0
- label_studio_sdk/types/inference_run_status.py +7 -0
- label_studio_sdk/types/key_indicator_value.py +30 -0
- label_studio_sdk/types/key_indicators.py +7 -0
- label_studio_sdk/types/key_indicators_item.py +51 -0
- label_studio_sdk/types/key_indicators_item_additional_kpis_item.py +37 -0
- label_studio_sdk/types/key_indicators_item_extra_kpis_item.py +37 -0
- label_studio_sdk/types/model_provider_connection.py +41 -0
- label_studio_sdk/types/model_provider_connection_created_by.py +5 -0
- label_studio_sdk/types/model_provider_connection_organization.py +5 -0
- label_studio_sdk/types/model_provider_connection_provider.py +5 -0
- label_studio_sdk/types/model_provider_connection_scope.py +5 -0
- label_studio_sdk/types/prompt.py +79 -0
- label_studio_sdk/types/prompt_created_by.py +5 -0
- label_studio_sdk/types/prompt_organization.py +5 -0
- label_studio_sdk/types/prompt_version.py +41 -0
- label_studio_sdk/types/prompt_version_created_by.py +5 -0
- label_studio_sdk/types/prompt_version_organization.py +5 -0
- label_studio_sdk/types/prompt_version_provider.py +5 -0
- label_studio_sdk/types/refined_prompt_response.py +64 -0
- label_studio_sdk/types/refined_prompt_response_refinement_status.py +7 -0
- label_studio_sdk/webhooks/client.py +245 -36
- label_studio_sdk/workspaces/client.py +20 -20
- label_studio_sdk-1.0.7.dist-info/LICENSE +201 -0
- {label_studio_sdk-1.0.5.dist-info → label_studio_sdk-1.0.7.dist-info}/METADATA +17 -3
- {label_studio_sdk-1.0.5.dist-info → label_studio_sdk-1.0.7.dist-info}/RECORD +68 -19
- {label_studio_sdk-1.0.5.dist-info → label_studio_sdk-1.0.7.dist-info}/WHEEL +1 -1
|
@@ -13,6 +13,8 @@ from .base_task import BaseTask
|
|
|
13
13
|
from .base_task_file_upload import BaseTaskFileUpload
|
|
14
14
|
from .base_task_updated_by import BaseTaskUpdatedBy
|
|
15
15
|
from .base_user import BaseUser
|
|
16
|
+
from .comment import Comment
|
|
17
|
+
from .comment_created_by import CommentCreatedBy
|
|
16
18
|
from .converted_format import ConvertedFormat
|
|
17
19
|
from .converted_format_status import ConvertedFormatStatus
|
|
18
20
|
from .data_manager_task_serializer import DataManagerTaskSerializer
|
|
@@ -31,6 +33,16 @@ from .gcs_export_storage import GcsExportStorage
|
|
|
31
33
|
from .gcs_export_storage_status import GcsExportStorageStatus
|
|
32
34
|
from .gcs_import_storage import GcsImportStorage
|
|
33
35
|
from .gcs_import_storage_status import GcsImportStorageStatus
|
|
36
|
+
from .inference_run import InferenceRun
|
|
37
|
+
from .inference_run_created_by import InferenceRunCreatedBy
|
|
38
|
+
from .inference_run_organization import InferenceRunOrganization
|
|
39
|
+
from .inference_run_project_subset import InferenceRunProjectSubset
|
|
40
|
+
from .inference_run_status import InferenceRunStatus
|
|
41
|
+
from .key_indicator_value import KeyIndicatorValue
|
|
42
|
+
from .key_indicators import KeyIndicators
|
|
43
|
+
from .key_indicators_item import KeyIndicatorsItem
|
|
44
|
+
from .key_indicators_item_additional_kpis_item import KeyIndicatorsItemAdditionalKpisItem
|
|
45
|
+
from .key_indicators_item_extra_kpis_item import KeyIndicatorsItemExtraKpisItem
|
|
34
46
|
from .local_files_export_storage import LocalFilesExportStorage
|
|
35
47
|
from .local_files_export_storage_status import LocalFilesExportStorageStatus
|
|
36
48
|
from .local_files_import_storage import LocalFilesImportStorage
|
|
@@ -38,6 +50,11 @@ from .local_files_import_storage_status import LocalFilesImportStorageStatus
|
|
|
38
50
|
from .ml_backend import MlBackend
|
|
39
51
|
from .ml_backend_auth_method import MlBackendAuthMethod
|
|
40
52
|
from .ml_backend_state import MlBackendState
|
|
53
|
+
from .model_provider_connection import ModelProviderConnection
|
|
54
|
+
from .model_provider_connection_created_by import ModelProviderConnectionCreatedBy
|
|
55
|
+
from .model_provider_connection_organization import ModelProviderConnectionOrganization
|
|
56
|
+
from .model_provider_connection_provider import ModelProviderConnectionProvider
|
|
57
|
+
from .model_provider_connection_scope import ModelProviderConnectionScope
|
|
41
58
|
from .prediction import Prediction
|
|
42
59
|
from .project import Project
|
|
43
60
|
from .project_import import ProjectImport
|
|
@@ -45,10 +62,19 @@ from .project_import_status import ProjectImportStatus
|
|
|
45
62
|
from .project_label_config import ProjectLabelConfig
|
|
46
63
|
from .project_sampling import ProjectSampling
|
|
47
64
|
from .project_skip_queue import ProjectSkipQueue
|
|
65
|
+
from .prompt import Prompt
|
|
66
|
+
from .prompt_created_by import PromptCreatedBy
|
|
67
|
+
from .prompt_organization import PromptOrganization
|
|
68
|
+
from .prompt_version import PromptVersion
|
|
69
|
+
from .prompt_version_created_by import PromptVersionCreatedBy
|
|
70
|
+
from .prompt_version_organization import PromptVersionOrganization
|
|
71
|
+
from .prompt_version_provider import PromptVersionProvider
|
|
48
72
|
from .redis_export_storage import RedisExportStorage
|
|
49
73
|
from .redis_export_storage_status import RedisExportStorageStatus
|
|
50
74
|
from .redis_import_storage import RedisImportStorage
|
|
51
75
|
from .redis_import_storage_status import RedisImportStorageStatus
|
|
76
|
+
from .refined_prompt_response import RefinedPromptResponse
|
|
77
|
+
from .refined_prompt_response_refinement_status import RefinedPromptResponseRefinementStatus
|
|
52
78
|
from .s3export_storage import S3ExportStorage
|
|
53
79
|
from .s3export_storage_status import S3ExportStorageStatus
|
|
54
80
|
from .s3import_storage import S3ImportStorage
|
|
@@ -83,6 +109,8 @@ __all__ = [
|
|
|
83
109
|
"BaseTaskFileUpload",
|
|
84
110
|
"BaseTaskUpdatedBy",
|
|
85
111
|
"BaseUser",
|
|
112
|
+
"Comment",
|
|
113
|
+
"CommentCreatedBy",
|
|
86
114
|
"ConvertedFormat",
|
|
87
115
|
"ConvertedFormatStatus",
|
|
88
116
|
"DataManagerTaskSerializer",
|
|
@@ -101,6 +129,16 @@ __all__ = [
|
|
|
101
129
|
"GcsExportStorageStatus",
|
|
102
130
|
"GcsImportStorage",
|
|
103
131
|
"GcsImportStorageStatus",
|
|
132
|
+
"InferenceRun",
|
|
133
|
+
"InferenceRunCreatedBy",
|
|
134
|
+
"InferenceRunOrganization",
|
|
135
|
+
"InferenceRunProjectSubset",
|
|
136
|
+
"InferenceRunStatus",
|
|
137
|
+
"KeyIndicatorValue",
|
|
138
|
+
"KeyIndicators",
|
|
139
|
+
"KeyIndicatorsItem",
|
|
140
|
+
"KeyIndicatorsItemAdditionalKpisItem",
|
|
141
|
+
"KeyIndicatorsItemExtraKpisItem",
|
|
104
142
|
"LocalFilesExportStorage",
|
|
105
143
|
"LocalFilesExportStorageStatus",
|
|
106
144
|
"LocalFilesImportStorage",
|
|
@@ -108,6 +146,11 @@ __all__ = [
|
|
|
108
146
|
"MlBackend",
|
|
109
147
|
"MlBackendAuthMethod",
|
|
110
148
|
"MlBackendState",
|
|
149
|
+
"ModelProviderConnection",
|
|
150
|
+
"ModelProviderConnectionCreatedBy",
|
|
151
|
+
"ModelProviderConnectionOrganization",
|
|
152
|
+
"ModelProviderConnectionProvider",
|
|
153
|
+
"ModelProviderConnectionScope",
|
|
111
154
|
"Prediction",
|
|
112
155
|
"Project",
|
|
113
156
|
"ProjectImport",
|
|
@@ -115,10 +158,19 @@ __all__ = [
|
|
|
115
158
|
"ProjectLabelConfig",
|
|
116
159
|
"ProjectSampling",
|
|
117
160
|
"ProjectSkipQueue",
|
|
161
|
+
"Prompt",
|
|
162
|
+
"PromptCreatedBy",
|
|
163
|
+
"PromptOrganization",
|
|
164
|
+
"PromptVersion",
|
|
165
|
+
"PromptVersionCreatedBy",
|
|
166
|
+
"PromptVersionOrganization",
|
|
167
|
+
"PromptVersionProvider",
|
|
118
168
|
"RedisExportStorage",
|
|
119
169
|
"RedisExportStorageStatus",
|
|
120
170
|
"RedisImportStorage",
|
|
121
171
|
"RedisImportStorageStatus",
|
|
172
|
+
"RefinedPromptResponse",
|
|
173
|
+
"RefinedPromptResponseRefinementStatus",
|
|
122
174
|
"S3ExportStorage",
|
|
123
175
|
"S3ExportStorageStatus",
|
|
124
176
|
"S3ImportStorage",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
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
|
+
from .comment_created_by import CommentCreatedBy
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Comment(pydantic_v1.BaseModel):
|
|
12
|
+
id: int
|
|
13
|
+
text: str
|
|
14
|
+
project: int
|
|
15
|
+
task: int
|
|
16
|
+
annotation: int
|
|
17
|
+
created_by: CommentCreatedBy
|
|
18
|
+
created_at: dt.datetime
|
|
19
|
+
updated_at: dt.datetime
|
|
20
|
+
is_resolved: typing.Optional[bool] = None
|
|
21
|
+
resolved_at: typing.Optional[dt.datetime] = None
|
|
22
|
+
|
|
23
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
24
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
25
|
+
return super().json(**kwargs_with_defaults)
|
|
26
|
+
|
|
27
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
28
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
29
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
|
30
|
+
|
|
31
|
+
return deep_union_pydantic_dicts(
|
|
32
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
class Config:
|
|
36
|
+
frozen = True
|
|
37
|
+
smart_union = True
|
|
38
|
+
extra = pydantic_v1.Extra.allow
|
|
39
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
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
|
+
from .inference_run_created_by import InferenceRunCreatedBy
|
|
9
|
+
from .inference_run_organization import InferenceRunOrganization
|
|
10
|
+
from .inference_run_project_subset import InferenceRunProjectSubset
|
|
11
|
+
from .inference_run_status import InferenceRunStatus
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class InferenceRun(pydantic_v1.BaseModel):
|
|
15
|
+
organization: typing.Optional[InferenceRunOrganization] = None
|
|
16
|
+
project: int
|
|
17
|
+
model_version: typing.Optional[str] = None
|
|
18
|
+
created_by: typing.Optional[InferenceRunCreatedBy] = None
|
|
19
|
+
project_subset: InferenceRunProjectSubset
|
|
20
|
+
status: typing.Optional[InferenceRunStatus] = None
|
|
21
|
+
job_id: typing.Optional[str] = None
|
|
22
|
+
created_at: typing.Optional[dt.datetime] = None
|
|
23
|
+
triggered_at: typing.Optional[dt.datetime] = None
|
|
24
|
+
predictions_updated_at: typing.Optional[dt.datetime] = None
|
|
25
|
+
completed_at: typing.Optional[dt.datetime] = None
|
|
26
|
+
|
|
27
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
28
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
29
|
+
return super().json(**kwargs_with_defaults)
|
|
30
|
+
|
|
31
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
32
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
33
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
|
34
|
+
|
|
35
|
+
return deep_union_pydantic_dicts(
|
|
36
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
class Config:
|
|
40
|
+
frozen = True
|
|
41
|
+
smart_union = True
|
|
42
|
+
extra = pydantic_v1.Extra.allow
|
|
43
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
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
|
+
|
|
9
|
+
|
|
10
|
+
class KeyIndicatorValue(pydantic_v1.BaseModel):
|
|
11
|
+
title: typing.Optional[str] = None
|
|
12
|
+
values: typing.Optional[typing.Dict[str, typing.Any]] = None
|
|
13
|
+
|
|
14
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
15
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
16
|
+
return super().json(**kwargs_with_defaults)
|
|
17
|
+
|
|
18
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
19
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
20
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
|
21
|
+
|
|
22
|
+
return deep_union_pydantic_dicts(
|
|
23
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
class Config:
|
|
27
|
+
frozen = True
|
|
28
|
+
smart_union = True
|
|
29
|
+
extra = pydantic_v1.Extra.allow
|
|
30
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
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
|
+
from .key_indicators_item_additional_kpis_item import KeyIndicatorsItemAdditionalKpisItem
|
|
9
|
+
from .key_indicators_item_extra_kpis_item import KeyIndicatorsItemExtraKpisItem
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class KeyIndicatorsItem(pydantic_v1.BaseModel):
|
|
13
|
+
key: str = pydantic_v1.Field()
|
|
14
|
+
"""
|
|
15
|
+
The key for this KPI, where you can find the value from inside main_kpi
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
title: str = pydantic_v1.Field()
|
|
19
|
+
"""
|
|
20
|
+
The title for this metric, to be displayed to the user
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
main_kpi: str
|
|
24
|
+
secondary_kpi: typing.Optional[str] = None
|
|
25
|
+
additional_kpis: typing.Optional[typing.List[KeyIndicatorsItemAdditionalKpisItem]] = pydantic_v1.Field(default=None)
|
|
26
|
+
"""
|
|
27
|
+
Additional KPIs to be displayed at the bottom of the box
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
extra_kpis: typing.Optional[typing.List[KeyIndicatorsItemExtraKpisItem]] = pydantic_v1.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
Extra KPIs to be displayed in the hover-tootip for that indicator
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
36
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
37
|
+
return super().json(**kwargs_with_defaults)
|
|
38
|
+
|
|
39
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
40
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
41
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
|
42
|
+
|
|
43
|
+
return deep_union_pydantic_dicts(
|
|
44
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
class Config:
|
|
48
|
+
frozen = True
|
|
49
|
+
smart_union = True
|
|
50
|
+
extra = pydantic_v1.Extra.allow
|
|
51
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
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
|
+
|
|
9
|
+
|
|
10
|
+
class KeyIndicatorsItemAdditionalKpisItem(pydantic_v1.BaseModel):
|
|
11
|
+
key: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
The key for this KPI, where you can find the value from inside main_kpi
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
label: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
The label for this KPI, to be displayed to the user
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
23
|
+
return super().json(**kwargs_with_defaults)
|
|
24
|
+
|
|
25
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
26
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
27
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
|
28
|
+
|
|
29
|
+
return deep_union_pydantic_dicts(
|
|
30
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
frozen = True
|
|
35
|
+
smart_union = True
|
|
36
|
+
extra = pydantic_v1.Extra.allow
|
|
37
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
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
|
+
|
|
9
|
+
|
|
10
|
+
class KeyIndicatorsItemExtraKpisItem(pydantic_v1.BaseModel):
|
|
11
|
+
key: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
The key for this KPI, where you can find the value from inside main_kpi
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
label: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
The label for this KPI, to be displayed to the user
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
23
|
+
return super().json(**kwargs_with_defaults)
|
|
24
|
+
|
|
25
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
26
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
27
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
|
28
|
+
|
|
29
|
+
return deep_union_pydantic_dicts(
|
|
30
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
frozen = True
|
|
35
|
+
smart_union = True
|
|
36
|
+
extra = pydantic_v1.Extra.allow
|
|
37
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
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
|
+
from .model_provider_connection_created_by import ModelProviderConnectionCreatedBy
|
|
9
|
+
from .model_provider_connection_organization import ModelProviderConnectionOrganization
|
|
10
|
+
from .model_provider_connection_provider import ModelProviderConnectionProvider
|
|
11
|
+
from .model_provider_connection_scope import ModelProviderConnectionScope
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ModelProviderConnection(pydantic_v1.BaseModel):
|
|
15
|
+
provider: ModelProviderConnectionProvider
|
|
16
|
+
api_key: typing.Optional[str] = None
|
|
17
|
+
deployment_name: typing.Optional[str] = None
|
|
18
|
+
endpoint: typing.Optional[str] = None
|
|
19
|
+
scope: typing.Optional[ModelProviderConnectionScope] = None
|
|
20
|
+
organization: typing.Optional[ModelProviderConnectionOrganization] = None
|
|
21
|
+
created_by: typing.Optional[ModelProviderConnectionCreatedBy] = None
|
|
22
|
+
created_at: typing.Optional[dt.datetime] = None
|
|
23
|
+
updated_at: typing.Optional[dt.datetime] = None
|
|
24
|
+
|
|
25
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
26
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
27
|
+
return super().json(**kwargs_with_defaults)
|
|
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
|
+
)
|
|
36
|
+
|
|
37
|
+
class Config:
|
|
38
|
+
frozen = True
|
|
39
|
+
smart_union = True
|
|
40
|
+
extra = pydantic_v1.Extra.allow
|
|
41
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
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
|
+
from .prompt_created_by import PromptCreatedBy
|
|
9
|
+
from .prompt_organization import PromptOrganization
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Prompt(pydantic_v1.BaseModel):
|
|
13
|
+
title: str = pydantic_v1.Field()
|
|
14
|
+
"""
|
|
15
|
+
Title of the prompt
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
description: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
19
|
+
"""
|
|
20
|
+
Description of the prompt
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
created_by: typing.Optional[PromptCreatedBy] = pydantic_v1.Field(default=None)
|
|
24
|
+
"""
|
|
25
|
+
User ID of the creator of the prompt
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
created_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
|
|
29
|
+
"""
|
|
30
|
+
Date and time the prompt was created
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
|
|
34
|
+
"""
|
|
35
|
+
Date and time the prompt was last updated
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
organization: typing.Optional[PromptOrganization] = pydantic_v1.Field(default=None)
|
|
39
|
+
"""
|
|
40
|
+
Organization ID of the prompt
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
input_fields: typing.List[str] = pydantic_v1.Field()
|
|
44
|
+
"""
|
|
45
|
+
List of input fields
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
output_classes: typing.List[str] = pydantic_v1.Field()
|
|
49
|
+
"""
|
|
50
|
+
List of output classes
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
associated_projects: typing.Optional[typing.List[int]] = pydantic_v1.Field(default=None)
|
|
54
|
+
"""
|
|
55
|
+
List of associated projects IDs
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
skill_name: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
59
|
+
"""
|
|
60
|
+
Name of the skill
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
64
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
65
|
+
return super().json(**kwargs_with_defaults)
|
|
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
|
+
)
|
|
74
|
+
|
|
75
|
+
class Config:
|
|
76
|
+
frozen = True
|
|
77
|
+
smart_union = True
|
|
78
|
+
extra = pydantic_v1.Extra.allow
|
|
79
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
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
|
+
from .prompt_version_created_by import PromptVersionCreatedBy
|
|
9
|
+
from .prompt_version_organization import PromptVersionOrganization
|
|
10
|
+
from .prompt_version_provider import PromptVersionProvider
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PromptVersion(pydantic_v1.BaseModel):
|
|
14
|
+
title: typing.Optional[str] = None
|
|
15
|
+
parent_model: typing.Optional[int] = None
|
|
16
|
+
model_provider_connection: typing.Optional[int] = None
|
|
17
|
+
prompt: typing.Optional[str] = None
|
|
18
|
+
provider: typing.Optional[PromptVersionProvider] = None
|
|
19
|
+
provider_model_id: typing.Optional[str] = None
|
|
20
|
+
created_by: typing.Optional[PromptVersionCreatedBy] = None
|
|
21
|
+
created_at: typing.Optional[dt.datetime] = None
|
|
22
|
+
updated_at: typing.Optional[dt.datetime] = None
|
|
23
|
+
organization: typing.Optional[PromptVersionOrganization] = None
|
|
24
|
+
|
|
25
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
26
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
27
|
+
return super().json(**kwargs_with_defaults)
|
|
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
|
+
)
|
|
36
|
+
|
|
37
|
+
class Config:
|
|
38
|
+
frozen = True
|
|
39
|
+
smart_union = True
|
|
40
|
+
extra = pydantic_v1.Extra.allow
|
|
41
|
+
json_encoders = {dt.datetime: serialize_datetime}
|