mapleflow 0.8.1__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.
- mapleflow/__init__.py +8 -0
- mapleflow/api/__init__.py +1 -0
- mapleflow/api/ai/__init__.py +1 -0
- mapleflow/api/ai/post_ai_chat.py +195 -0
- mapleflow/api/ai/post_ai_embeddings.py +191 -0
- mapleflow/api/ai/post_ai_images.py +195 -0
- mapleflow/api/ai/post_ai_speech.py +191 -0
- mapleflow/api/ai/post_ai_transcribe.py +189 -0
- mapleflow/api/images/__init__.py +1 -0
- mapleflow/api/images/post_images_bg_remove.py +235 -0
- mapleflow/api/utility/__init__.py +1 -0
- mapleflow/api/utility/get_currency.py +253 -0
- mapleflow/api/utility/get_weather.py +277 -0
- mapleflow/api/utility/post_translate.py +206 -0
- mapleflow/api/verify/__init__.py +1 -0
- mapleflow/api/verify/post_verify_face.py +190 -0
- mapleflow/api/verify/post_verify_labels.py +190 -0
- mapleflow/client.py +282 -0
- mapleflow/errors.py +16 -0
- mapleflow/models/__init__.py +99 -0
- mapleflow/models/get_currency_response_200.py +81 -0
- mapleflow/models/get_currency_response_400.py +81 -0
- mapleflow/models/get_currency_response_404.py +81 -0
- mapleflow/models/get_currency_response_502.py +81 -0
- mapleflow/models/get_weather_response_200.py +81 -0
- mapleflow/models/get_weather_response_400.py +81 -0
- mapleflow/models/get_weather_response_404.py +81 -0
- mapleflow/models/get_weather_response_502.py +81 -0
- mapleflow/models/get_weather_units.py +9 -0
- mapleflow/models/post_ai_chat_body.py +104 -0
- mapleflow/models/post_ai_chat_body_messages_item.py +69 -0
- mapleflow/models/post_ai_chat_body_model.py +9 -0
- mapleflow/models/post_ai_chat_response_200.py +72 -0
- mapleflow/models/post_ai_chat_response_400.py +69 -0
- mapleflow/models/post_ai_embeddings_body.py +98 -0
- mapleflow/models/post_ai_embeddings_body_model.py +8 -0
- mapleflow/models/post_ai_embeddings_response_200.py +72 -0
- mapleflow/models/post_ai_embeddings_response_400.py +69 -0
- mapleflow/models/post_ai_images_body.py +90 -0
- mapleflow/models/post_ai_images_body_model.py +9 -0
- mapleflow/models/post_ai_images_response_200.py +72 -0
- mapleflow/models/post_ai_images_response_400.py +69 -0
- mapleflow/models/post_ai_speech_body.py +80 -0
- mapleflow/models/post_ai_speech_body_model.py +8 -0
- mapleflow/models/post_ai_speech_response_200.py +72 -0
- mapleflow/models/post_ai_speech_response_400.py +69 -0
- mapleflow/models/post_ai_transcribe_body.py +81 -0
- mapleflow/models/post_ai_transcribe_response_200.py +72 -0
- mapleflow/models/post_ai_transcribe_response_400.py +69 -0
- mapleflow/models/post_images_bg_remove_files_body.py +93 -0
- mapleflow/models/post_images_bg_remove_json_body.py +70 -0
- mapleflow/models/post_images_bg_remove_response_200.py +72 -0
- mapleflow/models/post_images_bg_remove_response_400.py +69 -0
- mapleflow/models/post_images_bg_remove_response_502.py +69 -0
- mapleflow/models/post_images_bg_remove_response_504.py +69 -0
- mapleflow/models/post_translate_body.py +89 -0
- mapleflow/models/post_translate_response_200.py +81 -0
- mapleflow/models/post_translate_response_400.py +81 -0
- mapleflow/models/post_translate_response_402.py +81 -0
- mapleflow/models/post_verify_face_files_body.py +100 -0
- mapleflow/models/post_verify_face_json_body.py +69 -0
- mapleflow/models/post_verify_face_response_200.py +72 -0
- mapleflow/models/post_verify_face_response_400.py +69 -0
- mapleflow/models/post_verify_labels_files_body.py +81 -0
- mapleflow/models/post_verify_labels_json_body.py +61 -0
- mapleflow/models/post_verify_labels_response_200.py +72 -0
- mapleflow/models/post_verify_labels_response_400.py +69 -0
- mapleflow/types.py +54 -0
- mapleflow-0.8.1.dist-info/METADATA +54 -0
- mapleflow-0.8.1.dist-info/RECORD +71 -0
- mapleflow-0.8.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PostAiChatResponse400")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostAiChatResponse400:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
success (bool):
|
|
17
|
+
error (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
success: bool
|
|
21
|
+
error: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
success = self.success
|
|
26
|
+
|
|
27
|
+
error = self.error
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"success": success,
|
|
34
|
+
"error": error,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
success = d.pop("success")
|
|
44
|
+
|
|
45
|
+
error = d.pop("error")
|
|
46
|
+
|
|
47
|
+
post_ai_chat_response_400 = cls(
|
|
48
|
+
success=success,
|
|
49
|
+
error=error,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
post_ai_chat_response_400.additional_properties = d
|
|
53
|
+
return post_ai_chat_response_400
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.post_ai_embeddings_body_model import PostAiEmbeddingsBodyModel
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="PostAiEmbeddingsBody")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class PostAiEmbeddingsBody:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
text (list[str] | str): Text or array of texts to embed Example: Hello world.
|
|
20
|
+
model (PostAiEmbeddingsBodyModel | Unset): Model name Default: PostAiEmbeddingsBodyModel.BGE_BASE_EN. Example:
|
|
21
|
+
bge-base-en.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
text: list[str] | str
|
|
25
|
+
model: PostAiEmbeddingsBodyModel | Unset = PostAiEmbeddingsBodyModel.BGE_BASE_EN
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
text: list[str] | str
|
|
30
|
+
if isinstance(self.text, list):
|
|
31
|
+
text = self.text
|
|
32
|
+
|
|
33
|
+
else:
|
|
34
|
+
text = self.text
|
|
35
|
+
|
|
36
|
+
model: str | Unset = UNSET
|
|
37
|
+
if not isinstance(self.model, Unset):
|
|
38
|
+
model = self.model.value
|
|
39
|
+
|
|
40
|
+
field_dict: dict[str, Any] = {}
|
|
41
|
+
field_dict.update(self.additional_properties)
|
|
42
|
+
field_dict.update(
|
|
43
|
+
{
|
|
44
|
+
"text": text,
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
if model is not UNSET:
|
|
48
|
+
field_dict["model"] = model
|
|
49
|
+
|
|
50
|
+
return field_dict
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
|
|
56
|
+
def _parse_text(data: object) -> list[str] | str:
|
|
57
|
+
try:
|
|
58
|
+
if not isinstance(data, list):
|
|
59
|
+
raise TypeError()
|
|
60
|
+
text_type_1 = cast(list[str], data)
|
|
61
|
+
|
|
62
|
+
return text_type_1
|
|
63
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
64
|
+
pass
|
|
65
|
+
return cast(list[str] | str, data)
|
|
66
|
+
|
|
67
|
+
text = _parse_text(d.pop("text"))
|
|
68
|
+
|
|
69
|
+
_model = d.pop("model", UNSET)
|
|
70
|
+
model: PostAiEmbeddingsBodyModel | Unset
|
|
71
|
+
if isinstance(_model, Unset):
|
|
72
|
+
model = UNSET
|
|
73
|
+
else:
|
|
74
|
+
model = PostAiEmbeddingsBodyModel(_model)
|
|
75
|
+
|
|
76
|
+
post_ai_embeddings_body = cls(
|
|
77
|
+
text=text,
|
|
78
|
+
model=model,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
post_ai_embeddings_body.additional_properties = d
|
|
82
|
+
return post_ai_embeddings_body
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def additional_keys(self) -> list[str]:
|
|
86
|
+
return list(self.additional_properties.keys())
|
|
87
|
+
|
|
88
|
+
def __getitem__(self, key: str) -> Any:
|
|
89
|
+
return self.additional_properties[key]
|
|
90
|
+
|
|
91
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
92
|
+
self.additional_properties[key] = value
|
|
93
|
+
|
|
94
|
+
def __delitem__(self, key: str) -> None:
|
|
95
|
+
del self.additional_properties[key]
|
|
96
|
+
|
|
97
|
+
def __contains__(self, key: str) -> bool:
|
|
98
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PostAiEmbeddingsResponse200")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PostAiEmbeddingsResponse200:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
success (bool):
|
|
19
|
+
data (Any | Unset):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
success: bool
|
|
23
|
+
data: Any | Unset = UNSET
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
success = self.success
|
|
28
|
+
|
|
29
|
+
data = self.data
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"success": success,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
if data is not UNSET:
|
|
39
|
+
field_dict["data"] = data
|
|
40
|
+
|
|
41
|
+
return field_dict
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
45
|
+
d = dict(src_dict)
|
|
46
|
+
success = d.pop("success")
|
|
47
|
+
|
|
48
|
+
data = d.pop("data", UNSET)
|
|
49
|
+
|
|
50
|
+
post_ai_embeddings_response_200 = cls(
|
|
51
|
+
success=success,
|
|
52
|
+
data=data,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
post_ai_embeddings_response_200.additional_properties = d
|
|
56
|
+
return post_ai_embeddings_response_200
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def additional_keys(self) -> list[str]:
|
|
60
|
+
return list(self.additional_properties.keys())
|
|
61
|
+
|
|
62
|
+
def __getitem__(self, key: str) -> Any:
|
|
63
|
+
return self.additional_properties[key]
|
|
64
|
+
|
|
65
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
66
|
+
self.additional_properties[key] = value
|
|
67
|
+
|
|
68
|
+
def __delitem__(self, key: str) -> None:
|
|
69
|
+
del self.additional_properties[key]
|
|
70
|
+
|
|
71
|
+
def __contains__(self, key: str) -> bool:
|
|
72
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PostAiEmbeddingsResponse400")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostAiEmbeddingsResponse400:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
success (bool):
|
|
17
|
+
error (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
success: bool
|
|
21
|
+
error: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
success = self.success
|
|
26
|
+
|
|
27
|
+
error = self.error
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"success": success,
|
|
34
|
+
"error": error,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
success = d.pop("success")
|
|
44
|
+
|
|
45
|
+
error = d.pop("error")
|
|
46
|
+
|
|
47
|
+
post_ai_embeddings_response_400 = cls(
|
|
48
|
+
success=success,
|
|
49
|
+
error=error,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
post_ai_embeddings_response_400.additional_properties = d
|
|
53
|
+
return post_ai_embeddings_response_400
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.post_ai_images_body_model import PostAiImagesBodyModel
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="PostAiImagesBody")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class PostAiImagesBody:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
prompt (str): Image prompt Example: A sunset over mountains.
|
|
20
|
+
model (PostAiImagesBodyModel | Unset): Model name Default: PostAiImagesBodyModel.FLUX_SCHNELL. Example: flux-
|
|
21
|
+
schnell.
|
|
22
|
+
num_steps (float | Unset): Number of inference steps Default: 4.0.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
prompt: str
|
|
26
|
+
model: PostAiImagesBodyModel | Unset = PostAiImagesBodyModel.FLUX_SCHNELL
|
|
27
|
+
num_steps: float | Unset = 4.0
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
prompt = self.prompt
|
|
32
|
+
|
|
33
|
+
model: str | Unset = UNSET
|
|
34
|
+
if not isinstance(self.model, Unset):
|
|
35
|
+
model = self.model.value
|
|
36
|
+
|
|
37
|
+
num_steps = self.num_steps
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
field_dict.update(self.additional_properties)
|
|
41
|
+
field_dict.update(
|
|
42
|
+
{
|
|
43
|
+
"prompt": prompt,
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
if model is not UNSET:
|
|
47
|
+
field_dict["model"] = model
|
|
48
|
+
if num_steps is not UNSET:
|
|
49
|
+
field_dict["num_steps"] = num_steps
|
|
50
|
+
|
|
51
|
+
return field_dict
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
55
|
+
d = dict(src_dict)
|
|
56
|
+
prompt = d.pop("prompt")
|
|
57
|
+
|
|
58
|
+
_model = d.pop("model", UNSET)
|
|
59
|
+
model: PostAiImagesBodyModel | Unset
|
|
60
|
+
if isinstance(_model, Unset):
|
|
61
|
+
model = UNSET
|
|
62
|
+
else:
|
|
63
|
+
model = PostAiImagesBodyModel(_model)
|
|
64
|
+
|
|
65
|
+
num_steps = d.pop("num_steps", UNSET)
|
|
66
|
+
|
|
67
|
+
post_ai_images_body = cls(
|
|
68
|
+
prompt=prompt,
|
|
69
|
+
model=model,
|
|
70
|
+
num_steps=num_steps,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
post_ai_images_body.additional_properties = d
|
|
74
|
+
return post_ai_images_body
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def additional_keys(self) -> list[str]:
|
|
78
|
+
return list(self.additional_properties.keys())
|
|
79
|
+
|
|
80
|
+
def __getitem__(self, key: str) -> Any:
|
|
81
|
+
return self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
84
|
+
self.additional_properties[key] = value
|
|
85
|
+
|
|
86
|
+
def __delitem__(self, key: str) -> None:
|
|
87
|
+
del self.additional_properties[key]
|
|
88
|
+
|
|
89
|
+
def __contains__(self, key: str) -> bool:
|
|
90
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PostAiImagesResponse200")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PostAiImagesResponse200:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
success (bool):
|
|
19
|
+
data (Any | Unset):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
success: bool
|
|
23
|
+
data: Any | Unset = UNSET
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
success = self.success
|
|
28
|
+
|
|
29
|
+
data = self.data
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"success": success,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
if data is not UNSET:
|
|
39
|
+
field_dict["data"] = data
|
|
40
|
+
|
|
41
|
+
return field_dict
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
45
|
+
d = dict(src_dict)
|
|
46
|
+
success = d.pop("success")
|
|
47
|
+
|
|
48
|
+
data = d.pop("data", UNSET)
|
|
49
|
+
|
|
50
|
+
post_ai_images_response_200 = cls(
|
|
51
|
+
success=success,
|
|
52
|
+
data=data,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
post_ai_images_response_200.additional_properties = d
|
|
56
|
+
return post_ai_images_response_200
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def additional_keys(self) -> list[str]:
|
|
60
|
+
return list(self.additional_properties.keys())
|
|
61
|
+
|
|
62
|
+
def __getitem__(self, key: str) -> Any:
|
|
63
|
+
return self.additional_properties[key]
|
|
64
|
+
|
|
65
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
66
|
+
self.additional_properties[key] = value
|
|
67
|
+
|
|
68
|
+
def __delitem__(self, key: str) -> None:
|
|
69
|
+
del self.additional_properties[key]
|
|
70
|
+
|
|
71
|
+
def __contains__(self, key: str) -> bool:
|
|
72
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PostAiImagesResponse400")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostAiImagesResponse400:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
success (bool):
|
|
17
|
+
error (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
success: bool
|
|
21
|
+
error: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
success = self.success
|
|
26
|
+
|
|
27
|
+
error = self.error
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"success": success,
|
|
34
|
+
"error": error,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
success = d.pop("success")
|
|
44
|
+
|
|
45
|
+
error = d.pop("error")
|
|
46
|
+
|
|
47
|
+
post_ai_images_response_400 = cls(
|
|
48
|
+
success=success,
|
|
49
|
+
error=error,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
post_ai_images_response_400.additional_properties = d
|
|
53
|
+
return post_ai_images_response_400
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.post_ai_speech_body_model import PostAiSpeechBodyModel
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="PostAiSpeechBody")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class PostAiSpeechBody:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
text (str): Text to convert to speech Example: Hello world.
|
|
20
|
+
model (PostAiSpeechBodyModel | Unset): Model name Default: PostAiSpeechBodyModel.AURA. Example: aura.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
text: str
|
|
24
|
+
model: PostAiSpeechBodyModel | Unset = PostAiSpeechBodyModel.AURA
|
|
25
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
26
|
+
|
|
27
|
+
def to_dict(self) -> dict[str, Any]:
|
|
28
|
+
text = self.text
|
|
29
|
+
|
|
30
|
+
model: str | Unset = UNSET
|
|
31
|
+
if not isinstance(self.model, Unset):
|
|
32
|
+
model = self.model.value
|
|
33
|
+
|
|
34
|
+
field_dict: dict[str, Any] = {}
|
|
35
|
+
field_dict.update(self.additional_properties)
|
|
36
|
+
field_dict.update(
|
|
37
|
+
{
|
|
38
|
+
"text": text,
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
if model is not UNSET:
|
|
42
|
+
field_dict["model"] = model
|
|
43
|
+
|
|
44
|
+
return field_dict
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
48
|
+
d = dict(src_dict)
|
|
49
|
+
text = d.pop("text")
|
|
50
|
+
|
|
51
|
+
_model = d.pop("model", UNSET)
|
|
52
|
+
model: PostAiSpeechBodyModel | Unset
|
|
53
|
+
if isinstance(_model, Unset):
|
|
54
|
+
model = UNSET
|
|
55
|
+
else:
|
|
56
|
+
model = PostAiSpeechBodyModel(_model)
|
|
57
|
+
|
|
58
|
+
post_ai_speech_body = cls(
|
|
59
|
+
text=text,
|
|
60
|
+
model=model,
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
post_ai_speech_body.additional_properties = d
|
|
64
|
+
return post_ai_speech_body
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def additional_keys(self) -> list[str]:
|
|
68
|
+
return list(self.additional_properties.keys())
|
|
69
|
+
|
|
70
|
+
def __getitem__(self, key: str) -> Any:
|
|
71
|
+
return self.additional_properties[key]
|
|
72
|
+
|
|
73
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
74
|
+
self.additional_properties[key] = value
|
|
75
|
+
|
|
76
|
+
def __delitem__(self, key: str) -> None:
|
|
77
|
+
del self.additional_properties[key]
|
|
78
|
+
|
|
79
|
+
def __contains__(self, key: str) -> bool:
|
|
80
|
+
return key in self.additional_properties
|