langwatch 0.5.0__py3-none-any.whl → 0.6.0__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.
Files changed (44) hide show
  1. langwatch/__version__.py +1 -1
  2. langwatch/dspy/__init__.py +3 -7
  3. langwatch/generated/langwatch_rest_api_client/api/default/delete_api_prompts_by_id.py +15 -4
  4. langwatch/generated/langwatch_rest_api_client/api/default/delete_api_scenario_events.py +15 -4
  5. langwatch/generated/langwatch_rest_api_client/api/default/get_api_prompts.py +15 -4
  6. langwatch/generated/langwatch_rest_api_client/api/default/get_api_prompts_by_id.py +15 -4
  7. langwatch/generated/langwatch_rest_api_client/api/default/get_api_prompts_by_id_versions.py +15 -4
  8. langwatch/generated/langwatch_rest_api_client/api/default/post_api_prompts.py +15 -4
  9. langwatch/generated/langwatch_rest_api_client/api/default/post_api_prompts_by_id_sync.py +15 -4
  10. langwatch/generated/langwatch_rest_api_client/api/default/post_api_scenario_events.py +15 -4
  11. langwatch/generated/langwatch_rest_api_client/models/__init__.py +16 -0
  12. langwatch/generated/langwatch_rest_api_client/models/delete_api_prompts_by_id_response_422.py +70 -0
  13. langwatch/generated/langwatch_rest_api_client/models/delete_api_scenario_events_response_422.py +70 -0
  14. langwatch/generated/langwatch_rest_api_client/models/get_api_dataset_by_slug_or_id_response_400.py +14 -11
  15. langwatch/generated/langwatch_rest_api_client/models/get_api_dataset_by_slug_or_id_response_401.py +14 -11
  16. langwatch/generated/langwatch_rest_api_client/models/get_api_dataset_by_slug_or_id_response_404.py +14 -11
  17. langwatch/generated/langwatch_rest_api_client/models/get_api_dataset_by_slug_or_id_response_422.py +14 -11
  18. langwatch/generated/langwatch_rest_api_client/models/get_api_dataset_by_slug_or_id_response_500.py +14 -11
  19. langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_by_id_response_200_demonstrations_inline_column_types_item.py +20 -2
  20. langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_by_id_response_200_prompting_technique_demonstrations_inline_column_types_item.py +20 -2
  21. langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_by_id_response_422.py +70 -0
  22. langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_by_id_versions_response_200_item_demonstrations_inline_column_types_item.py +20 -2
  23. 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
  24. langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_by_id_versions_response_422.py +70 -0
  25. langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_response_200_item_demonstrations_inline_column_types_item.py +20 -2
  26. langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_response_200_item_prompting_technique_demonstrations_inline_column_types_item.py +20 -2
  27. langwatch/generated/langwatch_rest_api_client/models/get_api_prompts_response_422.py +70 -0
  28. langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_by_id_sync_body_config_data_demonstrations_inline_column_types_item.py +20 -2
  29. 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
  30. 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
  31. 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
  32. langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_by_id_sync_response_200_prompt_demonstrations_inline_column_types_item.py +20 -2
  33. 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
  34. langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_by_id_sync_response_422.py +70 -0
  35. langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_response_200_demonstrations_inline_column_types_item.py +20 -2
  36. langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_response_200_prompting_technique_demonstrations_inline_column_types_item.py +20 -2
  37. langwatch/generated/langwatch_rest_api_client/models/post_api_prompts_response_422.py +70 -0
  38. langwatch/generated/langwatch_rest_api_client/models/post_api_scenario_events_response_422.py +70 -0
  39. langwatch/generated/langwatch_rest_api_client/models/put_api_prompts_by_id_body.py +19 -37
  40. langwatch/generated/langwatch_rest_api_client/models/put_api_prompts_by_id_response_200_demonstrations_inline_column_types_item.py +20 -2
  41. langwatch/generated/langwatch_rest_api_client/models/put_api_prompts_by_id_response_200_prompting_technique_demonstrations_inline_column_types_item.py +20 -2
  42. {langwatch-0.5.0.dist-info → langwatch-0.6.0.dist-info}/METADATA +2 -2
  43. {langwatch-0.5.0.dist-info → langwatch-0.6.0.dist-info}/RECORD +44 -36
  44. {langwatch-0.5.0.dist-info → langwatch-0.6.0.dist-info}/WHEEL +0 -0
@@ -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="PostApiPromptsByIdSyncResponse200PromptDemonstrationsInlineColumnTypesItem")
8
10
 
9
11
 
@@ -13,8 +15,9 @@ class PostApiPromptsByIdSyncResponse200PromptDemonstrationsInlineColumnTypesItem
13
15
  Attributes:
14
16
  name (str):
15
17
  type_ (Union[Literal['annotations'], Literal['boolean'], Literal['chat_messages'], Literal['date'],
16
- Literal['evaluations'], Literal['json'], Literal['list'], Literal['number'], Literal['rag_contexts'],
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 PostApiPromptsByIdSyncResponse200PromptDemonstrationsInlineColumnTypesItem
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 PostApiPromptsByIdSyncResponse200PromptDemonstrationsInlineColumnTypesItem
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 PostApiPromptsByIdSyncResponse200PromptDemonstrationsInlineColumnTypesItem
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 PostApiPromptsByIdSyncResponse200PromptDemonstrationsInlineColumnTypesItem
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 PostApiPromptsByIdSyncResponse200PromptDemonstrationsInlineColumnTypesItem
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 PostApiPromptsByIdSyncResponse200PromptDemonstrationsInlineColumnTypesItem
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 PostApiPromptsByIdSyncResponse200PromptDemonstrationsInlineColumnTypesItem
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
  post_api_prompts_by_id_sync_response_200_prompt_demonstrations_inline_column_types_item = cls(
133
150
  name=name,
134
151
  type_=type_,
152
+ id=id,
135
153
  )
136
154
 
137
155
  post_api_prompts_by_id_sync_response_200_prompt_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="PostApiPromptsByIdSyncResponse200PromptPromptingTechniqueDemonstrationsInlineColumnTypesItem")
8
10
 
9
11
 
@@ -13,8 +15,9 @@ class PostApiPromptsByIdSyncResponse200PromptPromptingTechniqueDemonstrationsInl
13
15
  Attributes:
14
16
  name (str):
15
17
  type_ (Union[Literal['annotations'], Literal['boolean'], Literal['chat_messages'], Literal['date'],
16
- Literal['evaluations'], Literal['json'], Literal['list'], Literal['number'], Literal['rag_contexts'],
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 PostApiPromptsByIdSyncResponse200PromptPromptingTechniqueDemonstrationsInl
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 PostApiPromptsByIdSyncResponse200PromptPromptingTechniqueDemonstrationsInl
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 PostApiPromptsByIdSyncResponse200PromptPromptingTechniqueDemonstrationsInl
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 PostApiPromptsByIdSyncResponse200PromptPromptingTechniqueDemonstrationsInl
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 PostApiPromptsByIdSyncResponse200PromptPromptingTechniqueDemonstrationsInl
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 PostApiPromptsByIdSyncResponse200PromptPromptingTechniqueDemonstrationsInl
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 PostApiPromptsByIdSyncResponse200PromptPromptingTechniqueDemonstrationsInl
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
  post_api_prompts_by_id_sync_response_200_prompt_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
 
@@ -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="PostApiPromptsByIdSyncResponse422")
10
+
11
+
12
+ @_attrs_define
13
+ class PostApiPromptsByIdSyncResponse422:
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
+ post_api_prompts_by_id_sync_response_422 = cls(
49
+ error=error,
50
+ message=message,
51
+ )
52
+
53
+ post_api_prompts_by_id_sync_response_422.additional_properties = d
54
+ return post_api_prompts_by_id_sync_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="PostApiPromptsResponse200DemonstrationsInlineColumnTypesItem")
8
10
 
9
11
 
@@ -13,8 +15,9 @@ class PostApiPromptsResponse200DemonstrationsInlineColumnTypesItem:
13
15
  Attributes:
14
16
  name (str):
15
17
  type_ (Union[Literal['annotations'], Literal['boolean'], Literal['chat_messages'], Literal['date'],
16
- Literal['evaluations'], Literal['json'], Literal['list'], Literal['number'], Literal['rag_contexts'],
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 PostApiPromptsResponse200DemonstrationsInlineColumnTypesItem:
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 PostApiPromptsResponse200DemonstrationsInlineColumnTypesItem:
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 PostApiPromptsResponse200DemonstrationsInlineColumnTypesItem:
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 PostApiPromptsResponse200DemonstrationsInlineColumnTypesItem:
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 PostApiPromptsResponse200DemonstrationsInlineColumnTypesItem:
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 PostApiPromptsResponse200DemonstrationsInlineColumnTypesItem:
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 PostApiPromptsResponse200DemonstrationsInlineColumnTypesItem:
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
  post_api_prompts_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
  post_api_prompts_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="PostApiPromptsResponse200PromptingTechniqueDemonstrationsInlineColumnTypesItem")
8
10
 
9
11
 
@@ -13,8 +15,9 @@ class PostApiPromptsResponse200PromptingTechniqueDemonstrationsInlineColumnTypes
13
15
  Attributes:
14
16
  name (str):
15
17
  type_ (Union[Literal['annotations'], Literal['boolean'], Literal['chat_messages'], Literal['date'],
16
- Literal['evaluations'], Literal['json'], Literal['list'], Literal['number'], Literal['rag_contexts'],
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 PostApiPromptsResponse200PromptingTechniqueDemonstrationsInlineColumnTypes
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 PostApiPromptsResponse200PromptingTechniqueDemonstrationsInlineColumnTypes
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 PostApiPromptsResponse200PromptingTechniqueDemonstrationsInlineColumnTypes
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 PostApiPromptsResponse200PromptingTechniqueDemonstrationsInlineColumnTypes
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 PostApiPromptsResponse200PromptingTechniqueDemonstrationsInlineColumnTypes
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 PostApiPromptsResponse200PromptingTechniqueDemonstrationsInlineColumnTypes
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 PostApiPromptsResponse200PromptingTechniqueDemonstrationsInlineColumnTypes
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
  post_api_prompts_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
  post_api_prompts_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="PostApiPromptsResponse422")
10
+
11
+
12
+ @_attrs_define
13
+ class PostApiPromptsResponse422:
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
+ post_api_prompts_response_422 = cls(
49
+ error=error,
50
+ message=message,
51
+ )
52
+
53
+ post_api_prompts_response_422.additional_properties = d
54
+ return post_api_prompts_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
@@ -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="PostApiScenarioEventsResponse422")
10
+
11
+
12
+ @_attrs_define
13
+ class PostApiScenarioEventsResponse422:
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
+ post_api_scenario_events_response_422 = cls(
49
+ error=error,
50
+ message=message,
51
+ )
52
+
53
+ post_api_scenario_events_response_422.additional_properties = d
54
+ return post_api_scenario_events_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