langwatch 0.5.1__py3-none-any.whl → 0.6.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.
- langwatch/__version__.py +1 -1
- langwatch/dspy/__init__.py +3 -7
- langwatch/generated/langwatch_rest_api_client/api/default/delete_api_prompts_by_id.py +15 -4
- langwatch/generated/langwatch_rest_api_client/api/default/delete_api_scenario_events.py +15 -4
- langwatch/generated/langwatch_rest_api_client/api/default/get_api_prompts.py +15 -4
- langwatch/generated/langwatch_rest_api_client/api/default/get_api_prompts_by_id.py +15 -4
- langwatch/generated/langwatch_rest_api_client/api/default/get_api_prompts_by_id_versions.py +15 -4
- langwatch/generated/langwatch_rest_api_client/api/default/post_api_prompts.py +15 -4
- langwatch/generated/langwatch_rest_api_client/api/default/post_api_prompts_by_id_sync.py +15 -4
- langwatch/generated/langwatch_rest_api_client/api/default/post_api_scenario_events.py +15 -4
- langwatch/generated/langwatch_rest_api_client/models/__init__.py +16 -0
- langwatch/generated/langwatch_rest_api_client/models/delete_api_prompts_by_id_response_422.py +70 -0
- langwatch/generated/langwatch_rest_api_client/models/delete_api_scenario_events_response_422.py +70 -0
- langwatch/generated/langwatch_rest_api_client/models/get_api_dataset_by_slug_or_id_response_400.py +14 -11
- langwatch/generated/langwatch_rest_api_client/models/get_api_dataset_by_slug_or_id_response_401.py +14 -11
- langwatch/generated/langwatch_rest_api_client/models/get_api_dataset_by_slug_or_id_response_404.py +14 -11
- langwatch/generated/langwatch_rest_api_client/models/get_api_dataset_by_slug_or_id_response_422.py +14 -11
- langwatch/generated/langwatch_rest_api_client/models/get_api_dataset_by_slug_or_id_response_500.py +14 -11
- langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_by_id_response_200_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_by_id_response_200_prompting_technique_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_by_id_response_422.py +70 -0
- langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_by_id_versions_response_200_item_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_by_id_versions_response_200_item_prompting_technique_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_by_id_versions_response_422.py +70 -0
- langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_response_200_item_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_response_200_item_prompting_technique_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_response_422.py +70 -0
- langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_by_id_sync_body_config_data_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_by_id_sync_body_config_data_prompting_technique_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_by_id_sync_response_200_conflict_info_remote_config_data_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_by_id_sync_response_200_conflict_info_remote_config_data_prompting_technique_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_by_id_sync_response_200_prompt_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_by_id_sync_response_200_prompt_prompting_technique_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_by_id_sync_response_422.py +70 -0
- langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_response_200_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_response_200_prompting_technique_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_response_422.py +70 -0
- langwatch/generated/langwatch_rest_api_client/models/post_api_scenario_events_response_422.py +70 -0
- langwatch/generated/langwatch_rest_api_client/models/put_api_prompts_by_id_body.py +19 -37
- langwatch/generated/langwatch_rest_api_client/models/put_api_prompts_by_id_response_200_demonstrations_inline_column_types_item.py +20 -2
- langwatch/generated/langwatch_rest_api_client/models/put_api_prompts_by_id_response_200_prompting_technique_demonstrations_inline_column_types_item.py +20 -2
- {langwatch-0.5.1.dist-info → langwatch-0.6.1.dist-info}/METADATA +2 -2
- {langwatch-0.5.1.dist-info → langwatch-0.6.1.dist-info}/RECORD +44 -36
- {langwatch-0.5.1.dist-info → langwatch-0.6.1.dist-info}/WHEEL +0 -0
langwatch/generated/langwatch_rest_api_client/models/get_api_dataset_by_slug_or_id_response_422.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
7
9
|
T = TypeVar("T", bound="GetApiDatasetBySlugOrIdResponse422")
|
|
8
10
|
|
|
9
11
|
|
|
@@ -11,16 +13,16 @@ T = TypeVar("T", bound="GetApiDatasetBySlugOrIdResponse422")
|
|
|
11
13
|
class GetApiDatasetBySlugOrIdResponse422:
|
|
12
14
|
"""
|
|
13
15
|
Attributes:
|
|
14
|
-
|
|
15
|
-
message (str):
|
|
16
|
+
error (str):
|
|
17
|
+
message (Union[Unset, str]):
|
|
16
18
|
"""
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
error: str
|
|
21
|
+
message: Union[Unset, str] = UNSET
|
|
20
22
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
23
|
|
|
22
24
|
def to_dict(self) -> dict[str, Any]:
|
|
23
|
-
|
|
25
|
+
error = self.error
|
|
24
26
|
|
|
25
27
|
message = self.message
|
|
26
28
|
|
|
@@ -28,22 +30,23 @@ class GetApiDatasetBySlugOrIdResponse422:
|
|
|
28
30
|
field_dict.update(self.additional_properties)
|
|
29
31
|
field_dict.update(
|
|
30
32
|
{
|
|
31
|
-
"
|
|
32
|
-
"message": message,
|
|
33
|
+
"error": error,
|
|
33
34
|
}
|
|
34
35
|
)
|
|
36
|
+
if message is not UNSET:
|
|
37
|
+
field_dict["message"] = message
|
|
35
38
|
|
|
36
39
|
return field_dict
|
|
37
40
|
|
|
38
41
|
@classmethod
|
|
39
42
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
40
43
|
d = dict(src_dict)
|
|
41
|
-
|
|
44
|
+
error = d.pop("error")
|
|
42
45
|
|
|
43
|
-
message = d.pop("message")
|
|
46
|
+
message = d.pop("message", UNSET)
|
|
44
47
|
|
|
45
48
|
get_api_dataset_by_slug_or_id_response_422 = cls(
|
|
46
|
-
|
|
49
|
+
error=error,
|
|
47
50
|
message=message,
|
|
48
51
|
)
|
|
49
52
|
|
langwatch/generated/langwatch_rest_api_client/models/get_api_dataset_by_slug_or_id_response_500.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
7
9
|
T = TypeVar("T", bound="GetApiDatasetBySlugOrIdResponse500")
|
|
8
10
|
|
|
9
11
|
|
|
@@ -11,16 +13,16 @@ T = TypeVar("T", bound="GetApiDatasetBySlugOrIdResponse500")
|
|
|
11
13
|
class GetApiDatasetBySlugOrIdResponse500:
|
|
12
14
|
"""
|
|
13
15
|
Attributes:
|
|
14
|
-
|
|
15
|
-
message (str):
|
|
16
|
+
error (str):
|
|
17
|
+
message (Union[Unset, str]):
|
|
16
18
|
"""
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
error: str
|
|
21
|
+
message: Union[Unset, str] = UNSET
|
|
20
22
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
23
|
|
|
22
24
|
def to_dict(self) -> dict[str, Any]:
|
|
23
|
-
|
|
25
|
+
error = self.error
|
|
24
26
|
|
|
25
27
|
message = self.message
|
|
26
28
|
|
|
@@ -28,22 +30,23 @@ class GetApiDatasetBySlugOrIdResponse500:
|
|
|
28
30
|
field_dict.update(self.additional_properties)
|
|
29
31
|
field_dict.update(
|
|
30
32
|
{
|
|
31
|
-
"
|
|
32
|
-
"message": message,
|
|
33
|
+
"error": error,
|
|
33
34
|
}
|
|
34
35
|
)
|
|
36
|
+
if message is not UNSET:
|
|
37
|
+
field_dict["message"] = message
|
|
35
38
|
|
|
36
39
|
return field_dict
|
|
37
40
|
|
|
38
41
|
@classmethod
|
|
39
42
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
40
43
|
d = dict(src_dict)
|
|
41
|
-
|
|
44
|
+
error = d.pop("error")
|
|
42
45
|
|
|
43
|
-
message = d.pop("message")
|
|
46
|
+
message = d.pop("message", UNSET)
|
|
44
47
|
|
|
45
48
|
get_api_dataset_by_slug_or_id_response_500 = cls(
|
|
46
|
-
|
|
49
|
+
error=error,
|
|
47
50
|
message=message,
|
|
48
51
|
)
|
|
49
52
|
|
|
@@ -4,6 +4,8 @@ from typing import Any, Literal, TypeVar, Union, cast
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
7
9
|
T = TypeVar("T", bound="GetApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem")
|
|
8
10
|
|
|
9
11
|
|
|
@@ -13,8 +15,9 @@ class GetApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
|
|
|
13
15
|
Attributes:
|
|
14
16
|
name (str):
|
|
15
17
|
type_ (Union[Literal['annotations'], Literal['boolean'], Literal['chat_messages'], Literal['date'],
|
|
16
|
-
Literal['evaluations'], Literal['
|
|
17
|
-
Literal['spans'], Literal['string']]):
|
|
18
|
+
Literal['evaluations'], Literal['image'], Literal['json'], Literal['list'], Literal['number'],
|
|
19
|
+
Literal['rag_contexts'], Literal['spans'], Literal['string']]):
|
|
20
|
+
id (Union[Unset, str]):
|
|
18
21
|
"""
|
|
19
22
|
|
|
20
23
|
name: str
|
|
@@ -24,6 +27,7 @@ class GetApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
|
|
|
24
27
|
Literal["chat_messages"],
|
|
25
28
|
Literal["date"],
|
|
26
29
|
Literal["evaluations"],
|
|
30
|
+
Literal["image"],
|
|
27
31
|
Literal["json"],
|
|
28
32
|
Literal["list"],
|
|
29
33
|
Literal["number"],
|
|
@@ -31,6 +35,7 @@ class GetApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
|
|
|
31
35
|
Literal["spans"],
|
|
32
36
|
Literal["string"],
|
|
33
37
|
]
|
|
38
|
+
id: Union[Unset, str] = UNSET
|
|
34
39
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
40
|
|
|
36
41
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -42,6 +47,7 @@ class GetApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
|
|
|
42
47
|
Literal["chat_messages"],
|
|
43
48
|
Literal["date"],
|
|
44
49
|
Literal["evaluations"],
|
|
50
|
+
Literal["image"],
|
|
45
51
|
Literal["json"],
|
|
46
52
|
Literal["list"],
|
|
47
53
|
Literal["number"],
|
|
@@ -51,6 +57,8 @@ class GetApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
|
|
|
51
57
|
]
|
|
52
58
|
type_ = self.type_
|
|
53
59
|
|
|
60
|
+
id = self.id
|
|
61
|
+
|
|
54
62
|
field_dict: dict[str, Any] = {}
|
|
55
63
|
field_dict.update(self.additional_properties)
|
|
56
64
|
field_dict.update(
|
|
@@ -59,6 +67,8 @@ class GetApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
|
|
|
59
67
|
"type": type_,
|
|
60
68
|
}
|
|
61
69
|
)
|
|
70
|
+
if id is not UNSET:
|
|
71
|
+
field_dict["id"] = id
|
|
62
72
|
|
|
63
73
|
return field_dict
|
|
64
74
|
|
|
@@ -75,6 +85,7 @@ class GetApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
|
|
|
75
85
|
Literal["chat_messages"],
|
|
76
86
|
Literal["date"],
|
|
77
87
|
Literal["evaluations"],
|
|
88
|
+
Literal["image"],
|
|
78
89
|
Literal["json"],
|
|
79
90
|
Literal["list"],
|
|
80
91
|
Literal["number"],
|
|
@@ -126,12 +137,19 @@ class GetApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
|
|
|
126
137
|
if type_type_10 != "evaluations":
|
|
127
138
|
raise ValueError(f"type_type_10 must match const 'evaluations', got '{type_type_10}'")
|
|
128
139
|
return type_type_10
|
|
140
|
+
type_type_11 = cast(Literal["image"], data)
|
|
141
|
+
if type_type_11 != "image":
|
|
142
|
+
raise ValueError(f"type_type_11 must match const 'image', got '{type_type_11}'")
|
|
143
|
+
return type_type_11
|
|
129
144
|
|
|
130
145
|
type_ = _parse_type_(d.pop("type"))
|
|
131
146
|
|
|
147
|
+
id = d.pop("id", UNSET)
|
|
148
|
+
|
|
132
149
|
get_api_prompts_by_id_response_200_demonstrations_inline_column_types_item = cls(
|
|
133
150
|
name=name,
|
|
134
151
|
type_=type_,
|
|
152
|
+
id=id,
|
|
135
153
|
)
|
|
136
154
|
|
|
137
155
|
get_api_prompts_by_id_response_200_demonstrations_inline_column_types_item.additional_properties = d
|
|
@@ -4,6 +4,8 @@ from typing import Any, Literal, TypeVar, Union, cast
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
7
9
|
T = TypeVar("T", bound="GetApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTypesItem")
|
|
8
10
|
|
|
9
11
|
|
|
@@ -13,8 +15,9 @@ class GetApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
|
|
|
13
15
|
Attributes:
|
|
14
16
|
name (str):
|
|
15
17
|
type_ (Union[Literal['annotations'], Literal['boolean'], Literal['chat_messages'], Literal['date'],
|
|
16
|
-
Literal['evaluations'], Literal['
|
|
17
|
-
Literal['spans'], Literal['string']]):
|
|
18
|
+
Literal['evaluations'], Literal['image'], Literal['json'], Literal['list'], Literal['number'],
|
|
19
|
+
Literal['rag_contexts'], Literal['spans'], Literal['string']]):
|
|
20
|
+
id (Union[Unset, str]):
|
|
18
21
|
"""
|
|
19
22
|
|
|
20
23
|
name: str
|
|
@@ -24,6 +27,7 @@ class GetApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
|
|
|
24
27
|
Literal["chat_messages"],
|
|
25
28
|
Literal["date"],
|
|
26
29
|
Literal["evaluations"],
|
|
30
|
+
Literal["image"],
|
|
27
31
|
Literal["json"],
|
|
28
32
|
Literal["list"],
|
|
29
33
|
Literal["number"],
|
|
@@ -31,6 +35,7 @@ class GetApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
|
|
|
31
35
|
Literal["spans"],
|
|
32
36
|
Literal["string"],
|
|
33
37
|
]
|
|
38
|
+
id: Union[Unset, str] = UNSET
|
|
34
39
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
40
|
|
|
36
41
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -42,6 +47,7 @@ class GetApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
|
|
|
42
47
|
Literal["chat_messages"],
|
|
43
48
|
Literal["date"],
|
|
44
49
|
Literal["evaluations"],
|
|
50
|
+
Literal["image"],
|
|
45
51
|
Literal["json"],
|
|
46
52
|
Literal["list"],
|
|
47
53
|
Literal["number"],
|
|
@@ -51,6 +57,8 @@ class GetApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
|
|
|
51
57
|
]
|
|
52
58
|
type_ = self.type_
|
|
53
59
|
|
|
60
|
+
id = self.id
|
|
61
|
+
|
|
54
62
|
field_dict: dict[str, Any] = {}
|
|
55
63
|
field_dict.update(self.additional_properties)
|
|
56
64
|
field_dict.update(
|
|
@@ -59,6 +67,8 @@ class GetApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
|
|
|
59
67
|
"type": type_,
|
|
60
68
|
}
|
|
61
69
|
)
|
|
70
|
+
if id is not UNSET:
|
|
71
|
+
field_dict["id"] = id
|
|
62
72
|
|
|
63
73
|
return field_dict
|
|
64
74
|
|
|
@@ -75,6 +85,7 @@ class GetApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
|
|
|
75
85
|
Literal["chat_messages"],
|
|
76
86
|
Literal["date"],
|
|
77
87
|
Literal["evaluations"],
|
|
88
|
+
Literal["image"],
|
|
78
89
|
Literal["json"],
|
|
79
90
|
Literal["list"],
|
|
80
91
|
Literal["number"],
|
|
@@ -126,12 +137,19 @@ class GetApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
|
|
|
126
137
|
if type_type_10 != "evaluations":
|
|
127
138
|
raise ValueError(f"type_type_10 must match const 'evaluations', got '{type_type_10}'")
|
|
128
139
|
return type_type_10
|
|
140
|
+
type_type_11 = cast(Literal["image"], data)
|
|
141
|
+
if type_type_11 != "image":
|
|
142
|
+
raise ValueError(f"type_type_11 must match const 'image', got '{type_type_11}'")
|
|
143
|
+
return type_type_11
|
|
129
144
|
|
|
130
145
|
type_ = _parse_type_(d.pop("type"))
|
|
131
146
|
|
|
147
|
+
id = d.pop("id", UNSET)
|
|
148
|
+
|
|
132
149
|
get_api_prompts_by_id_response_200_prompting_technique_demonstrations_inline_column_types_item = cls(
|
|
133
150
|
name=name,
|
|
134
151
|
type_=type_,
|
|
152
|
+
id=id,
|
|
135
153
|
)
|
|
136
154
|
|
|
137
155
|
get_api_prompts_by_id_response_200_prompting_technique_demonstrations_inline_column_types_item.additional_properties = d
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="GetApiPromptsByIdResponse422")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class GetApiPromptsByIdResponse422:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
error (str):
|
|
17
|
+
message (Union[Unset, str]):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
error: str
|
|
21
|
+
message: Union[Unset, str] = UNSET
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
error = self.error
|
|
26
|
+
|
|
27
|
+
message = self.message
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"error": error,
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
if message is not UNSET:
|
|
37
|
+
field_dict["message"] = message
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
43
|
+
d = dict(src_dict)
|
|
44
|
+
error = d.pop("error")
|
|
45
|
+
|
|
46
|
+
message = d.pop("message", UNSET)
|
|
47
|
+
|
|
48
|
+
get_api_prompts_by_id_response_422 = cls(
|
|
49
|
+
error=error,
|
|
50
|
+
message=message,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
get_api_prompts_by_id_response_422.additional_properties = d
|
|
54
|
+
return get_api_prompts_by_id_response_422
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def additional_keys(self) -> list[str]:
|
|
58
|
+
return list(self.additional_properties.keys())
|
|
59
|
+
|
|
60
|
+
def __getitem__(self, key: str) -> Any:
|
|
61
|
+
return self.additional_properties[key]
|
|
62
|
+
|
|
63
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
64
|
+
self.additional_properties[key] = value
|
|
65
|
+
|
|
66
|
+
def __delitem__(self, key: str) -> None:
|
|
67
|
+
del self.additional_properties[key]
|
|
68
|
+
|
|
69
|
+
def __contains__(self, key: str) -> bool:
|
|
70
|
+
return key in self.additional_properties
|
|
@@ -4,6 +4,8 @@ from typing import Any, Literal, TypeVar, Union, cast
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
7
9
|
T = TypeVar("T", bound="GetApiPromptsByIdVersionsResponse200ItemDemonstrationsInlineColumnTypesItem")
|
|
8
10
|
|
|
9
11
|
|
|
@@ -13,8 +15,9 @@ class GetApiPromptsByIdVersionsResponse200ItemDemonstrationsInlineColumnTypesIte
|
|
|
13
15
|
Attributes:
|
|
14
16
|
name (str):
|
|
15
17
|
type_ (Union[Literal['annotations'], Literal['boolean'], Literal['chat_messages'], Literal['date'],
|
|
16
|
-
Literal['evaluations'], Literal['
|
|
17
|
-
Literal['spans'], Literal['string']]):
|
|
18
|
+
Literal['evaluations'], Literal['image'], Literal['json'], Literal['list'], Literal['number'],
|
|
19
|
+
Literal['rag_contexts'], Literal['spans'], Literal['string']]):
|
|
20
|
+
id (Union[Unset, str]):
|
|
18
21
|
"""
|
|
19
22
|
|
|
20
23
|
name: str
|
|
@@ -24,6 +27,7 @@ class GetApiPromptsByIdVersionsResponse200ItemDemonstrationsInlineColumnTypesIte
|
|
|
24
27
|
Literal["chat_messages"],
|
|
25
28
|
Literal["date"],
|
|
26
29
|
Literal["evaluations"],
|
|
30
|
+
Literal["image"],
|
|
27
31
|
Literal["json"],
|
|
28
32
|
Literal["list"],
|
|
29
33
|
Literal["number"],
|
|
@@ -31,6 +35,7 @@ class GetApiPromptsByIdVersionsResponse200ItemDemonstrationsInlineColumnTypesIte
|
|
|
31
35
|
Literal["spans"],
|
|
32
36
|
Literal["string"],
|
|
33
37
|
]
|
|
38
|
+
id: Union[Unset, str] = UNSET
|
|
34
39
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
40
|
|
|
36
41
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -42,6 +47,7 @@ class GetApiPromptsByIdVersionsResponse200ItemDemonstrationsInlineColumnTypesIte
|
|
|
42
47
|
Literal["chat_messages"],
|
|
43
48
|
Literal["date"],
|
|
44
49
|
Literal["evaluations"],
|
|
50
|
+
Literal["image"],
|
|
45
51
|
Literal["json"],
|
|
46
52
|
Literal["list"],
|
|
47
53
|
Literal["number"],
|
|
@@ -51,6 +57,8 @@ class GetApiPromptsByIdVersionsResponse200ItemDemonstrationsInlineColumnTypesIte
|
|
|
51
57
|
]
|
|
52
58
|
type_ = self.type_
|
|
53
59
|
|
|
60
|
+
id = self.id
|
|
61
|
+
|
|
54
62
|
field_dict: dict[str, Any] = {}
|
|
55
63
|
field_dict.update(self.additional_properties)
|
|
56
64
|
field_dict.update(
|
|
@@ -59,6 +67,8 @@ class GetApiPromptsByIdVersionsResponse200ItemDemonstrationsInlineColumnTypesIte
|
|
|
59
67
|
"type": type_,
|
|
60
68
|
}
|
|
61
69
|
)
|
|
70
|
+
if id is not UNSET:
|
|
71
|
+
field_dict["id"] = id
|
|
62
72
|
|
|
63
73
|
return field_dict
|
|
64
74
|
|
|
@@ -75,6 +85,7 @@ class GetApiPromptsByIdVersionsResponse200ItemDemonstrationsInlineColumnTypesIte
|
|
|
75
85
|
Literal["chat_messages"],
|
|
76
86
|
Literal["date"],
|
|
77
87
|
Literal["evaluations"],
|
|
88
|
+
Literal["image"],
|
|
78
89
|
Literal["json"],
|
|
79
90
|
Literal["list"],
|
|
80
91
|
Literal["number"],
|
|
@@ -126,12 +137,19 @@ class GetApiPromptsByIdVersionsResponse200ItemDemonstrationsInlineColumnTypesIte
|
|
|
126
137
|
if type_type_10 != "evaluations":
|
|
127
138
|
raise ValueError(f"type_type_10 must match const 'evaluations', got '{type_type_10}'")
|
|
128
139
|
return type_type_10
|
|
140
|
+
type_type_11 = cast(Literal["image"], data)
|
|
141
|
+
if type_type_11 != "image":
|
|
142
|
+
raise ValueError(f"type_type_11 must match const 'image', got '{type_type_11}'")
|
|
143
|
+
return type_type_11
|
|
129
144
|
|
|
130
145
|
type_ = _parse_type_(d.pop("type"))
|
|
131
146
|
|
|
147
|
+
id = d.pop("id", UNSET)
|
|
148
|
+
|
|
132
149
|
get_api_prompts_by_id_versions_response_200_item_demonstrations_inline_column_types_item = cls(
|
|
133
150
|
name=name,
|
|
134
151
|
type_=type_,
|
|
152
|
+
id=id,
|
|
135
153
|
)
|
|
136
154
|
|
|
137
155
|
get_api_prompts_by_id_versions_response_200_item_demonstrations_inline_column_types_item.additional_properties = d
|
|
@@ -4,6 +4,8 @@ from typing import Any, Literal, TypeVar, Union, cast
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
7
9
|
T = TypeVar("T", bound="GetApiPromptsByIdVersionsResponse200ItemPromptingTechniqueDemonstrationsInlineColumnTypesItem")
|
|
8
10
|
|
|
9
11
|
|
|
@@ -13,8 +15,9 @@ class GetApiPromptsByIdVersionsResponse200ItemPromptingTechniqueDemonstrationsIn
|
|
|
13
15
|
Attributes:
|
|
14
16
|
name (str):
|
|
15
17
|
type_ (Union[Literal['annotations'], Literal['boolean'], Literal['chat_messages'], Literal['date'],
|
|
16
|
-
Literal['evaluations'], Literal['
|
|
17
|
-
Literal['spans'], Literal['string']]):
|
|
18
|
+
Literal['evaluations'], Literal['image'], Literal['json'], Literal['list'], Literal['number'],
|
|
19
|
+
Literal['rag_contexts'], Literal['spans'], Literal['string']]):
|
|
20
|
+
id (Union[Unset, str]):
|
|
18
21
|
"""
|
|
19
22
|
|
|
20
23
|
name: str
|
|
@@ -24,6 +27,7 @@ class GetApiPromptsByIdVersionsResponse200ItemPromptingTechniqueDemonstrationsIn
|
|
|
24
27
|
Literal["chat_messages"],
|
|
25
28
|
Literal["date"],
|
|
26
29
|
Literal["evaluations"],
|
|
30
|
+
Literal["image"],
|
|
27
31
|
Literal["json"],
|
|
28
32
|
Literal["list"],
|
|
29
33
|
Literal["number"],
|
|
@@ -31,6 +35,7 @@ class GetApiPromptsByIdVersionsResponse200ItemPromptingTechniqueDemonstrationsIn
|
|
|
31
35
|
Literal["spans"],
|
|
32
36
|
Literal["string"],
|
|
33
37
|
]
|
|
38
|
+
id: Union[Unset, str] = UNSET
|
|
34
39
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
40
|
|
|
36
41
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -42,6 +47,7 @@ class GetApiPromptsByIdVersionsResponse200ItemPromptingTechniqueDemonstrationsIn
|
|
|
42
47
|
Literal["chat_messages"],
|
|
43
48
|
Literal["date"],
|
|
44
49
|
Literal["evaluations"],
|
|
50
|
+
Literal["image"],
|
|
45
51
|
Literal["json"],
|
|
46
52
|
Literal["list"],
|
|
47
53
|
Literal["number"],
|
|
@@ -51,6 +57,8 @@ class GetApiPromptsByIdVersionsResponse200ItemPromptingTechniqueDemonstrationsIn
|
|
|
51
57
|
]
|
|
52
58
|
type_ = self.type_
|
|
53
59
|
|
|
60
|
+
id = self.id
|
|
61
|
+
|
|
54
62
|
field_dict: dict[str, Any] = {}
|
|
55
63
|
field_dict.update(self.additional_properties)
|
|
56
64
|
field_dict.update(
|
|
@@ -59,6 +67,8 @@ class GetApiPromptsByIdVersionsResponse200ItemPromptingTechniqueDemonstrationsIn
|
|
|
59
67
|
"type": type_,
|
|
60
68
|
}
|
|
61
69
|
)
|
|
70
|
+
if id is not UNSET:
|
|
71
|
+
field_dict["id"] = id
|
|
62
72
|
|
|
63
73
|
return field_dict
|
|
64
74
|
|
|
@@ -75,6 +85,7 @@ class GetApiPromptsByIdVersionsResponse200ItemPromptingTechniqueDemonstrationsIn
|
|
|
75
85
|
Literal["chat_messages"],
|
|
76
86
|
Literal["date"],
|
|
77
87
|
Literal["evaluations"],
|
|
88
|
+
Literal["image"],
|
|
78
89
|
Literal["json"],
|
|
79
90
|
Literal["list"],
|
|
80
91
|
Literal["number"],
|
|
@@ -126,13 +137,20 @@ class GetApiPromptsByIdVersionsResponse200ItemPromptingTechniqueDemonstrationsIn
|
|
|
126
137
|
if type_type_10 != "evaluations":
|
|
127
138
|
raise ValueError(f"type_type_10 must match const 'evaluations', got '{type_type_10}'")
|
|
128
139
|
return type_type_10
|
|
140
|
+
type_type_11 = cast(Literal["image"], data)
|
|
141
|
+
if type_type_11 != "image":
|
|
142
|
+
raise ValueError(f"type_type_11 must match const 'image', got '{type_type_11}'")
|
|
143
|
+
return type_type_11
|
|
129
144
|
|
|
130
145
|
type_ = _parse_type_(d.pop("type"))
|
|
131
146
|
|
|
147
|
+
id = d.pop("id", UNSET)
|
|
148
|
+
|
|
132
149
|
get_api_prompts_by_id_versions_response_200_item_prompting_technique_demonstrations_inline_column_types_item = (
|
|
133
150
|
cls(
|
|
134
151
|
name=name,
|
|
135
152
|
type_=type_,
|
|
153
|
+
id=id,
|
|
136
154
|
)
|
|
137
155
|
)
|
|
138
156
|
|
langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_by_id_versions_response_422.py
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="GetApiPromptsByIdVersionsResponse422")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class GetApiPromptsByIdVersionsResponse422:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
error (str):
|
|
17
|
+
message (Union[Unset, str]):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
error: str
|
|
21
|
+
message: Union[Unset, str] = UNSET
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
error = self.error
|
|
26
|
+
|
|
27
|
+
message = self.message
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"error": error,
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
if message is not UNSET:
|
|
37
|
+
field_dict["message"] = message
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
43
|
+
d = dict(src_dict)
|
|
44
|
+
error = d.pop("error")
|
|
45
|
+
|
|
46
|
+
message = d.pop("message", UNSET)
|
|
47
|
+
|
|
48
|
+
get_api_prompts_by_id_versions_response_422 = cls(
|
|
49
|
+
error=error,
|
|
50
|
+
message=message,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
get_api_prompts_by_id_versions_response_422.additional_properties = d
|
|
54
|
+
return get_api_prompts_by_id_versions_response_422
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def additional_keys(self) -> list[str]:
|
|
58
|
+
return list(self.additional_properties.keys())
|
|
59
|
+
|
|
60
|
+
def __getitem__(self, key: str) -> Any:
|
|
61
|
+
return self.additional_properties[key]
|
|
62
|
+
|
|
63
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
64
|
+
self.additional_properties[key] = value
|
|
65
|
+
|
|
66
|
+
def __delitem__(self, key: str) -> None:
|
|
67
|
+
del self.additional_properties[key]
|
|
68
|
+
|
|
69
|
+
def __contains__(self, key: str) -> bool:
|
|
70
|
+
return key in self.additional_properties
|