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
langwatch/__version__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Version information for LangWatch."""
2
2
 
3
- __version__ = "0.5.0"
3
+ __version__ = "0.6.0" # x-release-please-version
@@ -492,11 +492,7 @@ class LangWatchTrackedBootstrapFewShotWithRandomSearch(
492
492
  def patched_evaluate_call(self, program: dspy.Module, *args, **kwargs):
493
493
  nonlocal step
494
494
 
495
- if "return_all_scores" not in kwargs or not kwargs["return_all_scores"]:
496
- raise ValueError(
497
- "return_all_scores is not True for some reason, please report it at https://github.com/langwatch/langwatch/issues"
498
- )
499
- score, subscores = original_evaluate_call(self, program, *args, **kwargs) # type: ignore
495
+ result = original_evaluate_call(self, program, *args, **kwargs)
500
496
 
501
497
  langwatch_dspy.log_step(
502
498
  optimizer=DSPyOptimizer(
@@ -513,7 +509,7 @@ class LangWatchTrackedBootstrapFewShotWithRandomSearch(
513
509
  },
514
510
  ),
515
511
  index=str(step),
516
- score=score,
512
+ score=result.score,
517
513
  label="score",
518
514
  predictors=[
519
515
  DSPyPredictor(name=name, predictor=predictor)
@@ -523,7 +519,7 @@ class LangWatchTrackedBootstrapFewShotWithRandomSearch(
523
519
 
524
520
  step += 1
525
521
 
526
- return score, subscores
522
+ return result
527
523
 
528
524
  Evaluate.__call__ = patched_evaluate_call
529
525
 
@@ -9,6 +9,7 @@ from ...models.delete_api_prompts_by_id_response_200 import DeleteApiPromptsById
9
9
  from ...models.delete_api_prompts_by_id_response_400 import DeleteApiPromptsByIdResponse400
10
10
  from ...models.delete_api_prompts_by_id_response_401 import DeleteApiPromptsByIdResponse401
11
11
  from ...models.delete_api_prompts_by_id_response_404 import DeleteApiPromptsByIdResponse404
12
+ from ...models.delete_api_prompts_by_id_response_422 import DeleteApiPromptsByIdResponse422
12
13
  from ...models.delete_api_prompts_by_id_response_500 import DeleteApiPromptsByIdResponse500
13
14
  from ...types import Response
14
15
 
@@ -32,6 +33,7 @@ def _parse_response(
32
33
  DeleteApiPromptsByIdResponse400,
33
34
  DeleteApiPromptsByIdResponse401,
34
35
  DeleteApiPromptsByIdResponse404,
36
+ DeleteApiPromptsByIdResponse422,
35
37
  DeleteApiPromptsByIdResponse500,
36
38
  ]
37
39
  ]:
@@ -51,6 +53,10 @@ def _parse_response(
51
53
  response_404 = DeleteApiPromptsByIdResponse404.from_dict(response.json())
52
54
 
53
55
  return response_404
56
+ if response.status_code == 422:
57
+ response_422 = DeleteApiPromptsByIdResponse422.from_dict(response.json())
58
+
59
+ return response_422
54
60
  if response.status_code == 500:
55
61
  response_500 = DeleteApiPromptsByIdResponse500.from_dict(response.json())
56
62
 
@@ -69,6 +75,7 @@ def _build_response(
69
75
  DeleteApiPromptsByIdResponse400,
70
76
  DeleteApiPromptsByIdResponse401,
71
77
  DeleteApiPromptsByIdResponse404,
78
+ DeleteApiPromptsByIdResponse422,
72
79
  DeleteApiPromptsByIdResponse500,
73
80
  ]
74
81
  ]:
@@ -90,6 +97,7 @@ def sync_detailed(
90
97
  DeleteApiPromptsByIdResponse400,
91
98
  DeleteApiPromptsByIdResponse401,
92
99
  DeleteApiPromptsByIdResponse404,
100
+ DeleteApiPromptsByIdResponse422,
93
101
  DeleteApiPromptsByIdResponse500,
94
102
  ]
95
103
  ]:
@@ -103,7 +111,7 @@ def sync_detailed(
103
111
  httpx.TimeoutException: If the request takes longer than Client.timeout.
104
112
 
105
113
  Returns:
106
- Response[Union[DeleteApiPromptsByIdResponse200, DeleteApiPromptsByIdResponse400, DeleteApiPromptsByIdResponse401, DeleteApiPromptsByIdResponse404, DeleteApiPromptsByIdResponse500]]
114
+ Response[Union[DeleteApiPromptsByIdResponse200, DeleteApiPromptsByIdResponse400, DeleteApiPromptsByIdResponse401, DeleteApiPromptsByIdResponse404, DeleteApiPromptsByIdResponse422, DeleteApiPromptsByIdResponse500]]
107
115
  """
108
116
 
109
117
  kwargs = _get_kwargs(
@@ -127,6 +135,7 @@ def sync(
127
135
  DeleteApiPromptsByIdResponse400,
128
136
  DeleteApiPromptsByIdResponse401,
129
137
  DeleteApiPromptsByIdResponse404,
138
+ DeleteApiPromptsByIdResponse422,
130
139
  DeleteApiPromptsByIdResponse500,
131
140
  ]
132
141
  ]:
@@ -140,7 +149,7 @@ def sync(
140
149
  httpx.TimeoutException: If the request takes longer than Client.timeout.
141
150
 
142
151
  Returns:
143
- Union[DeleteApiPromptsByIdResponse200, DeleteApiPromptsByIdResponse400, DeleteApiPromptsByIdResponse401, DeleteApiPromptsByIdResponse404, DeleteApiPromptsByIdResponse500]
152
+ Union[DeleteApiPromptsByIdResponse200, DeleteApiPromptsByIdResponse400, DeleteApiPromptsByIdResponse401, DeleteApiPromptsByIdResponse404, DeleteApiPromptsByIdResponse422, DeleteApiPromptsByIdResponse500]
144
153
  """
145
154
 
146
155
  return sync_detailed(
@@ -159,6 +168,7 @@ async def asyncio_detailed(
159
168
  DeleteApiPromptsByIdResponse400,
160
169
  DeleteApiPromptsByIdResponse401,
161
170
  DeleteApiPromptsByIdResponse404,
171
+ DeleteApiPromptsByIdResponse422,
162
172
  DeleteApiPromptsByIdResponse500,
163
173
  ]
164
174
  ]:
@@ -172,7 +182,7 @@ async def asyncio_detailed(
172
182
  httpx.TimeoutException: If the request takes longer than Client.timeout.
173
183
 
174
184
  Returns:
175
- Response[Union[DeleteApiPromptsByIdResponse200, DeleteApiPromptsByIdResponse400, DeleteApiPromptsByIdResponse401, DeleteApiPromptsByIdResponse404, DeleteApiPromptsByIdResponse500]]
185
+ Response[Union[DeleteApiPromptsByIdResponse200, DeleteApiPromptsByIdResponse400, DeleteApiPromptsByIdResponse401, DeleteApiPromptsByIdResponse404, DeleteApiPromptsByIdResponse422, DeleteApiPromptsByIdResponse500]]
176
186
  """
177
187
 
178
188
  kwargs = _get_kwargs(
@@ -194,6 +204,7 @@ async def asyncio(
194
204
  DeleteApiPromptsByIdResponse400,
195
205
  DeleteApiPromptsByIdResponse401,
196
206
  DeleteApiPromptsByIdResponse404,
207
+ DeleteApiPromptsByIdResponse422,
197
208
  DeleteApiPromptsByIdResponse500,
198
209
  ]
199
210
  ]:
@@ -207,7 +218,7 @@ async def asyncio(
207
218
  httpx.TimeoutException: If the request takes longer than Client.timeout.
208
219
 
209
220
  Returns:
210
- Union[DeleteApiPromptsByIdResponse200, DeleteApiPromptsByIdResponse400, DeleteApiPromptsByIdResponse401, DeleteApiPromptsByIdResponse404, DeleteApiPromptsByIdResponse500]
221
+ Union[DeleteApiPromptsByIdResponse200, DeleteApiPromptsByIdResponse400, DeleteApiPromptsByIdResponse401, DeleteApiPromptsByIdResponse404, DeleteApiPromptsByIdResponse422, DeleteApiPromptsByIdResponse500]
211
222
  """
212
223
 
213
224
  return (
@@ -8,6 +8,7 @@ from ...client import AuthenticatedClient, Client
8
8
  from ...models.delete_api_scenario_events_response_200 import DeleteApiScenarioEventsResponse200
9
9
  from ...models.delete_api_scenario_events_response_400 import DeleteApiScenarioEventsResponse400
10
10
  from ...models.delete_api_scenario_events_response_401 import DeleteApiScenarioEventsResponse401
11
+ from ...models.delete_api_scenario_events_response_422 import DeleteApiScenarioEventsResponse422
11
12
  from ...models.delete_api_scenario_events_response_500 import DeleteApiScenarioEventsResponse500
12
13
  from ...types import Response
13
14
 
@@ -28,6 +29,7 @@ def _parse_response(
28
29
  DeleteApiScenarioEventsResponse200,
29
30
  DeleteApiScenarioEventsResponse400,
30
31
  DeleteApiScenarioEventsResponse401,
32
+ DeleteApiScenarioEventsResponse422,
31
33
  DeleteApiScenarioEventsResponse500,
32
34
  ]
33
35
  ]:
@@ -43,6 +45,10 @@ def _parse_response(
43
45
  response_401 = DeleteApiScenarioEventsResponse401.from_dict(response.json())
44
46
 
45
47
  return response_401
48
+ if response.status_code == 422:
49
+ response_422 = DeleteApiScenarioEventsResponse422.from_dict(response.json())
50
+
51
+ return response_422
46
52
  if response.status_code == 500:
47
53
  response_500 = DeleteApiScenarioEventsResponse500.from_dict(response.json())
48
54
 
@@ -60,6 +66,7 @@ def _build_response(
60
66
  DeleteApiScenarioEventsResponse200,
61
67
  DeleteApiScenarioEventsResponse400,
62
68
  DeleteApiScenarioEventsResponse401,
69
+ DeleteApiScenarioEventsResponse422,
63
70
  DeleteApiScenarioEventsResponse500,
64
71
  ]
65
72
  ]:
@@ -79,6 +86,7 @@ def sync_detailed(
79
86
  DeleteApiScenarioEventsResponse200,
80
87
  DeleteApiScenarioEventsResponse400,
81
88
  DeleteApiScenarioEventsResponse401,
89
+ DeleteApiScenarioEventsResponse422,
82
90
  DeleteApiScenarioEventsResponse500,
83
91
  ]
84
92
  ]:
@@ -89,7 +97,7 @@ def sync_detailed(
89
97
  httpx.TimeoutException: If the request takes longer than Client.timeout.
90
98
 
91
99
  Returns:
92
- Response[Union[DeleteApiScenarioEventsResponse200, DeleteApiScenarioEventsResponse400, DeleteApiScenarioEventsResponse401, DeleteApiScenarioEventsResponse500]]
100
+ Response[Union[DeleteApiScenarioEventsResponse200, DeleteApiScenarioEventsResponse400, DeleteApiScenarioEventsResponse401, DeleteApiScenarioEventsResponse422, DeleteApiScenarioEventsResponse500]]
93
101
  """
94
102
 
95
103
  kwargs = _get_kwargs()
@@ -109,6 +117,7 @@ def sync(
109
117
  DeleteApiScenarioEventsResponse200,
110
118
  DeleteApiScenarioEventsResponse400,
111
119
  DeleteApiScenarioEventsResponse401,
120
+ DeleteApiScenarioEventsResponse422,
112
121
  DeleteApiScenarioEventsResponse500,
113
122
  ]
114
123
  ]:
@@ -119,7 +128,7 @@ def sync(
119
128
  httpx.TimeoutException: If the request takes longer than Client.timeout.
120
129
 
121
130
  Returns:
122
- Union[DeleteApiScenarioEventsResponse200, DeleteApiScenarioEventsResponse400, DeleteApiScenarioEventsResponse401, DeleteApiScenarioEventsResponse500]
131
+ Union[DeleteApiScenarioEventsResponse200, DeleteApiScenarioEventsResponse400, DeleteApiScenarioEventsResponse401, DeleteApiScenarioEventsResponse422, DeleteApiScenarioEventsResponse500]
123
132
  """
124
133
 
125
134
  return sync_detailed(
@@ -135,6 +144,7 @@ async def asyncio_detailed(
135
144
  DeleteApiScenarioEventsResponse200,
136
145
  DeleteApiScenarioEventsResponse400,
137
146
  DeleteApiScenarioEventsResponse401,
147
+ DeleteApiScenarioEventsResponse422,
138
148
  DeleteApiScenarioEventsResponse500,
139
149
  ]
140
150
  ]:
@@ -145,7 +155,7 @@ async def asyncio_detailed(
145
155
  httpx.TimeoutException: If the request takes longer than Client.timeout.
146
156
 
147
157
  Returns:
148
- Response[Union[DeleteApiScenarioEventsResponse200, DeleteApiScenarioEventsResponse400, DeleteApiScenarioEventsResponse401, DeleteApiScenarioEventsResponse500]]
158
+ Response[Union[DeleteApiScenarioEventsResponse200, DeleteApiScenarioEventsResponse400, DeleteApiScenarioEventsResponse401, DeleteApiScenarioEventsResponse422, DeleteApiScenarioEventsResponse500]]
149
159
  """
150
160
 
151
161
  kwargs = _get_kwargs()
@@ -163,6 +173,7 @@ async def asyncio(
163
173
  DeleteApiScenarioEventsResponse200,
164
174
  DeleteApiScenarioEventsResponse400,
165
175
  DeleteApiScenarioEventsResponse401,
176
+ DeleteApiScenarioEventsResponse422,
166
177
  DeleteApiScenarioEventsResponse500,
167
178
  ]
168
179
  ]:
@@ -173,7 +184,7 @@ async def asyncio(
173
184
  httpx.TimeoutException: If the request takes longer than Client.timeout.
174
185
 
175
186
  Returns:
176
- Union[DeleteApiScenarioEventsResponse200, DeleteApiScenarioEventsResponse400, DeleteApiScenarioEventsResponse401, DeleteApiScenarioEventsResponse500]
187
+ Union[DeleteApiScenarioEventsResponse200, DeleteApiScenarioEventsResponse400, DeleteApiScenarioEventsResponse401, DeleteApiScenarioEventsResponse422, DeleteApiScenarioEventsResponse500]
177
188
  """
178
189
 
179
190
  return (
@@ -8,6 +8,7 @@ from ...client import AuthenticatedClient, Client
8
8
  from ...models.get_api_prompts_response_200_item import GetApiPromptsResponse200Item
9
9
  from ...models.get_api_prompts_response_400 import GetApiPromptsResponse400
10
10
  from ...models.get_api_prompts_response_401 import GetApiPromptsResponse401
11
+ from ...models.get_api_prompts_response_422 import GetApiPromptsResponse422
11
12
  from ...models.get_api_prompts_response_500 import GetApiPromptsResponse500
12
13
  from ...types import Response
13
14
 
@@ -27,6 +28,7 @@ def _parse_response(
27
28
  Union[
28
29
  GetApiPromptsResponse400,
29
30
  GetApiPromptsResponse401,
31
+ GetApiPromptsResponse422,
30
32
  GetApiPromptsResponse500,
31
33
  list["GetApiPromptsResponse200Item"],
32
34
  ]
@@ -48,6 +50,10 @@ def _parse_response(
48
50
  response_401 = GetApiPromptsResponse401.from_dict(response.json())
49
51
 
50
52
  return response_401
53
+ if response.status_code == 422:
54
+ response_422 = GetApiPromptsResponse422.from_dict(response.json())
55
+
56
+ return response_422
51
57
  if response.status_code == 500:
52
58
  response_500 = GetApiPromptsResponse500.from_dict(response.json())
53
59
 
@@ -64,6 +70,7 @@ def _build_response(
64
70
  Union[
65
71
  GetApiPromptsResponse400,
66
72
  GetApiPromptsResponse401,
73
+ GetApiPromptsResponse422,
67
74
  GetApiPromptsResponse500,
68
75
  list["GetApiPromptsResponse200Item"],
69
76
  ]
@@ -83,6 +90,7 @@ def sync_detailed(
83
90
  Union[
84
91
  GetApiPromptsResponse400,
85
92
  GetApiPromptsResponse401,
93
+ GetApiPromptsResponse422,
86
94
  GetApiPromptsResponse500,
87
95
  list["GetApiPromptsResponse200Item"],
88
96
  ]
@@ -94,7 +102,7 @@ def sync_detailed(
94
102
  httpx.TimeoutException: If the request takes longer than Client.timeout.
95
103
 
96
104
  Returns:
97
- Response[Union[GetApiPromptsResponse400, GetApiPromptsResponse401, GetApiPromptsResponse500, list['GetApiPromptsResponse200Item']]]
105
+ Response[Union[GetApiPromptsResponse400, GetApiPromptsResponse401, GetApiPromptsResponse422, GetApiPromptsResponse500, list['GetApiPromptsResponse200Item']]]
98
106
  """
99
107
 
100
108
  kwargs = _get_kwargs()
@@ -113,6 +121,7 @@ def sync(
113
121
  Union[
114
122
  GetApiPromptsResponse400,
115
123
  GetApiPromptsResponse401,
124
+ GetApiPromptsResponse422,
116
125
  GetApiPromptsResponse500,
117
126
  list["GetApiPromptsResponse200Item"],
118
127
  ]
@@ -124,7 +133,7 @@ def sync(
124
133
  httpx.TimeoutException: If the request takes longer than Client.timeout.
125
134
 
126
135
  Returns:
127
- Union[GetApiPromptsResponse400, GetApiPromptsResponse401, GetApiPromptsResponse500, list['GetApiPromptsResponse200Item']]
136
+ Union[GetApiPromptsResponse400, GetApiPromptsResponse401, GetApiPromptsResponse422, GetApiPromptsResponse500, list['GetApiPromptsResponse200Item']]
128
137
  """
129
138
 
130
139
  return sync_detailed(
@@ -139,6 +148,7 @@ async def asyncio_detailed(
139
148
  Union[
140
149
  GetApiPromptsResponse400,
141
150
  GetApiPromptsResponse401,
151
+ GetApiPromptsResponse422,
142
152
  GetApiPromptsResponse500,
143
153
  list["GetApiPromptsResponse200Item"],
144
154
  ]
@@ -150,7 +160,7 @@ async def asyncio_detailed(
150
160
  httpx.TimeoutException: If the request takes longer than Client.timeout.
151
161
 
152
162
  Returns:
153
- Response[Union[GetApiPromptsResponse400, GetApiPromptsResponse401, GetApiPromptsResponse500, list['GetApiPromptsResponse200Item']]]
163
+ Response[Union[GetApiPromptsResponse400, GetApiPromptsResponse401, GetApiPromptsResponse422, GetApiPromptsResponse500, list['GetApiPromptsResponse200Item']]]
154
164
  """
155
165
 
156
166
  kwargs = _get_kwargs()
@@ -167,6 +177,7 @@ async def asyncio(
167
177
  Union[
168
178
  GetApiPromptsResponse400,
169
179
  GetApiPromptsResponse401,
180
+ GetApiPromptsResponse422,
170
181
  GetApiPromptsResponse500,
171
182
  list["GetApiPromptsResponse200Item"],
172
183
  ]
@@ -178,7 +189,7 @@ async def asyncio(
178
189
  httpx.TimeoutException: If the request takes longer than Client.timeout.
179
190
 
180
191
  Returns:
181
- Union[GetApiPromptsResponse400, GetApiPromptsResponse401, GetApiPromptsResponse500, list['GetApiPromptsResponse200Item']]
192
+ Union[GetApiPromptsResponse400, GetApiPromptsResponse401, GetApiPromptsResponse422, GetApiPromptsResponse500, list['GetApiPromptsResponse200Item']]
182
193
  """
183
194
 
184
195
  return (
@@ -9,6 +9,7 @@ from ...models.get_api_prompts_by_id_response_200 import GetApiPromptsByIdRespon
9
9
  from ...models.get_api_prompts_by_id_response_400 import GetApiPromptsByIdResponse400
10
10
  from ...models.get_api_prompts_by_id_response_401 import GetApiPromptsByIdResponse401
11
11
  from ...models.get_api_prompts_by_id_response_404 import GetApiPromptsByIdResponse404
12
+ from ...models.get_api_prompts_by_id_response_422 import GetApiPromptsByIdResponse422
12
13
  from ...models.get_api_prompts_by_id_response_500 import GetApiPromptsByIdResponse500
13
14
  from ...types import UNSET, Response, Unset
14
15
 
@@ -41,6 +42,7 @@ def _parse_response(
41
42
  GetApiPromptsByIdResponse400,
42
43
  GetApiPromptsByIdResponse401,
43
44
  GetApiPromptsByIdResponse404,
45
+ GetApiPromptsByIdResponse422,
44
46
  GetApiPromptsByIdResponse500,
45
47
  ]
46
48
  ]:
@@ -60,6 +62,10 @@ def _parse_response(
60
62
  response_404 = GetApiPromptsByIdResponse404.from_dict(response.json())
61
63
 
62
64
  return response_404
65
+ if response.status_code == 422:
66
+ response_422 = GetApiPromptsByIdResponse422.from_dict(response.json())
67
+
68
+ return response_422
63
69
  if response.status_code == 500:
64
70
  response_500 = GetApiPromptsByIdResponse500.from_dict(response.json())
65
71
 
@@ -78,6 +84,7 @@ def _build_response(
78
84
  GetApiPromptsByIdResponse400,
79
85
  GetApiPromptsByIdResponse401,
80
86
  GetApiPromptsByIdResponse404,
87
+ GetApiPromptsByIdResponse422,
81
88
  GetApiPromptsByIdResponse500,
82
89
  ]
83
90
  ]:
@@ -100,6 +107,7 @@ def sync_detailed(
100
107
  GetApiPromptsByIdResponse400,
101
108
  GetApiPromptsByIdResponse401,
102
109
  GetApiPromptsByIdResponse404,
110
+ GetApiPromptsByIdResponse422,
103
111
  GetApiPromptsByIdResponse500,
104
112
  ]
105
113
  ]:
@@ -114,7 +122,7 @@ def sync_detailed(
114
122
  httpx.TimeoutException: If the request takes longer than Client.timeout.
115
123
 
116
124
  Returns:
117
- Response[Union[GetApiPromptsByIdResponse200, GetApiPromptsByIdResponse400, GetApiPromptsByIdResponse401, GetApiPromptsByIdResponse404, GetApiPromptsByIdResponse500]]
125
+ Response[Union[GetApiPromptsByIdResponse200, GetApiPromptsByIdResponse400, GetApiPromptsByIdResponse401, GetApiPromptsByIdResponse404, GetApiPromptsByIdResponse422, GetApiPromptsByIdResponse500]]
118
126
  """
119
127
 
120
128
  kwargs = _get_kwargs(
@@ -140,6 +148,7 @@ def sync(
140
148
  GetApiPromptsByIdResponse400,
141
149
  GetApiPromptsByIdResponse401,
142
150
  GetApiPromptsByIdResponse404,
151
+ GetApiPromptsByIdResponse422,
143
152
  GetApiPromptsByIdResponse500,
144
153
  ]
145
154
  ]:
@@ -154,7 +163,7 @@ def sync(
154
163
  httpx.TimeoutException: If the request takes longer than Client.timeout.
155
164
 
156
165
  Returns:
157
- Union[GetApiPromptsByIdResponse200, GetApiPromptsByIdResponse400, GetApiPromptsByIdResponse401, GetApiPromptsByIdResponse404, GetApiPromptsByIdResponse500]
166
+ Union[GetApiPromptsByIdResponse200, GetApiPromptsByIdResponse400, GetApiPromptsByIdResponse401, GetApiPromptsByIdResponse404, GetApiPromptsByIdResponse422, GetApiPromptsByIdResponse500]
158
167
  """
159
168
 
160
169
  return sync_detailed(
@@ -175,6 +184,7 @@ async def asyncio_detailed(
175
184
  GetApiPromptsByIdResponse400,
176
185
  GetApiPromptsByIdResponse401,
177
186
  GetApiPromptsByIdResponse404,
187
+ GetApiPromptsByIdResponse422,
178
188
  GetApiPromptsByIdResponse500,
179
189
  ]
180
190
  ]:
@@ -189,7 +199,7 @@ async def asyncio_detailed(
189
199
  httpx.TimeoutException: If the request takes longer than Client.timeout.
190
200
 
191
201
  Returns:
192
- Response[Union[GetApiPromptsByIdResponse200, GetApiPromptsByIdResponse400, GetApiPromptsByIdResponse401, GetApiPromptsByIdResponse404, GetApiPromptsByIdResponse500]]
202
+ Response[Union[GetApiPromptsByIdResponse200, GetApiPromptsByIdResponse400, GetApiPromptsByIdResponse401, GetApiPromptsByIdResponse404, GetApiPromptsByIdResponse422, GetApiPromptsByIdResponse500]]
193
203
  """
194
204
 
195
205
  kwargs = _get_kwargs(
@@ -213,6 +223,7 @@ async def asyncio(
213
223
  GetApiPromptsByIdResponse400,
214
224
  GetApiPromptsByIdResponse401,
215
225
  GetApiPromptsByIdResponse404,
226
+ GetApiPromptsByIdResponse422,
216
227
  GetApiPromptsByIdResponse500,
217
228
  ]
218
229
  ]:
@@ -227,7 +238,7 @@ async def asyncio(
227
238
  httpx.TimeoutException: If the request takes longer than Client.timeout.
228
239
 
229
240
  Returns:
230
- Union[GetApiPromptsByIdResponse200, GetApiPromptsByIdResponse400, GetApiPromptsByIdResponse401, GetApiPromptsByIdResponse404, GetApiPromptsByIdResponse500]
241
+ Union[GetApiPromptsByIdResponse200, GetApiPromptsByIdResponse400, GetApiPromptsByIdResponse401, GetApiPromptsByIdResponse404, GetApiPromptsByIdResponse422, GetApiPromptsByIdResponse500]
231
242
  """
232
243
 
233
244
  return (
@@ -9,6 +9,7 @@ from ...models.get_api_prompts_by_id_versions_response_200_item import GetApiPro
9
9
  from ...models.get_api_prompts_by_id_versions_response_400 import GetApiPromptsByIdVersionsResponse400
10
10
  from ...models.get_api_prompts_by_id_versions_response_401 import GetApiPromptsByIdVersionsResponse401
11
11
  from ...models.get_api_prompts_by_id_versions_response_404 import GetApiPromptsByIdVersionsResponse404
12
+ from ...models.get_api_prompts_by_id_versions_response_422 import GetApiPromptsByIdVersionsResponse422
12
13
  from ...models.get_api_prompts_by_id_versions_response_500 import GetApiPromptsByIdVersionsResponse500
13
14
  from ...types import Response
14
15
 
@@ -31,6 +32,7 @@ def _parse_response(
31
32
  GetApiPromptsByIdVersionsResponse400,
32
33
  GetApiPromptsByIdVersionsResponse401,
33
34
  GetApiPromptsByIdVersionsResponse404,
35
+ GetApiPromptsByIdVersionsResponse422,
34
36
  GetApiPromptsByIdVersionsResponse500,
35
37
  list["GetApiPromptsByIdVersionsResponse200Item"],
36
38
  ]
@@ -56,6 +58,10 @@ def _parse_response(
56
58
  response_404 = GetApiPromptsByIdVersionsResponse404.from_dict(response.json())
57
59
 
58
60
  return response_404
61
+ if response.status_code == 422:
62
+ response_422 = GetApiPromptsByIdVersionsResponse422.from_dict(response.json())
63
+
64
+ return response_422
59
65
  if response.status_code == 500:
60
66
  response_500 = GetApiPromptsByIdVersionsResponse500.from_dict(response.json())
61
67
 
@@ -73,6 +79,7 @@ def _build_response(
73
79
  GetApiPromptsByIdVersionsResponse400,
74
80
  GetApiPromptsByIdVersionsResponse401,
75
81
  GetApiPromptsByIdVersionsResponse404,
82
+ GetApiPromptsByIdVersionsResponse422,
76
83
  GetApiPromptsByIdVersionsResponse500,
77
84
  list["GetApiPromptsByIdVersionsResponse200Item"],
78
85
  ]
@@ -94,6 +101,7 @@ def sync_detailed(
94
101
  GetApiPromptsByIdVersionsResponse400,
95
102
  GetApiPromptsByIdVersionsResponse401,
96
103
  GetApiPromptsByIdVersionsResponse404,
104
+ GetApiPromptsByIdVersionsResponse422,
97
105
  GetApiPromptsByIdVersionsResponse500,
98
106
  list["GetApiPromptsByIdVersionsResponse200Item"],
99
107
  ]
@@ -108,7 +116,7 @@ def sync_detailed(
108
116
  httpx.TimeoutException: If the request takes longer than Client.timeout.
109
117
 
110
118
  Returns:
111
- Response[Union[GetApiPromptsByIdVersionsResponse400, GetApiPromptsByIdVersionsResponse401, GetApiPromptsByIdVersionsResponse404, GetApiPromptsByIdVersionsResponse500, list['GetApiPromptsByIdVersionsResponse200Item']]]
119
+ Response[Union[GetApiPromptsByIdVersionsResponse400, GetApiPromptsByIdVersionsResponse401, GetApiPromptsByIdVersionsResponse404, GetApiPromptsByIdVersionsResponse422, GetApiPromptsByIdVersionsResponse500, list['GetApiPromptsByIdVersionsResponse200Item']]]
112
120
  """
113
121
 
114
122
  kwargs = _get_kwargs(
@@ -131,6 +139,7 @@ def sync(
131
139
  GetApiPromptsByIdVersionsResponse400,
132
140
  GetApiPromptsByIdVersionsResponse401,
133
141
  GetApiPromptsByIdVersionsResponse404,
142
+ GetApiPromptsByIdVersionsResponse422,
134
143
  GetApiPromptsByIdVersionsResponse500,
135
144
  list["GetApiPromptsByIdVersionsResponse200Item"],
136
145
  ]
@@ -145,7 +154,7 @@ def sync(
145
154
  httpx.TimeoutException: If the request takes longer than Client.timeout.
146
155
 
147
156
  Returns:
148
- Union[GetApiPromptsByIdVersionsResponse400, GetApiPromptsByIdVersionsResponse401, GetApiPromptsByIdVersionsResponse404, GetApiPromptsByIdVersionsResponse500, list['GetApiPromptsByIdVersionsResponse200Item']]
157
+ Union[GetApiPromptsByIdVersionsResponse400, GetApiPromptsByIdVersionsResponse401, GetApiPromptsByIdVersionsResponse404, GetApiPromptsByIdVersionsResponse422, GetApiPromptsByIdVersionsResponse500, list['GetApiPromptsByIdVersionsResponse200Item']]
149
158
  """
150
159
 
151
160
  return sync_detailed(
@@ -163,6 +172,7 @@ async def asyncio_detailed(
163
172
  GetApiPromptsByIdVersionsResponse400,
164
173
  GetApiPromptsByIdVersionsResponse401,
165
174
  GetApiPromptsByIdVersionsResponse404,
175
+ GetApiPromptsByIdVersionsResponse422,
166
176
  GetApiPromptsByIdVersionsResponse500,
167
177
  list["GetApiPromptsByIdVersionsResponse200Item"],
168
178
  ]
@@ -177,7 +187,7 @@ async def asyncio_detailed(
177
187
  httpx.TimeoutException: If the request takes longer than Client.timeout.
178
188
 
179
189
  Returns:
180
- Response[Union[GetApiPromptsByIdVersionsResponse400, GetApiPromptsByIdVersionsResponse401, GetApiPromptsByIdVersionsResponse404, GetApiPromptsByIdVersionsResponse500, list['GetApiPromptsByIdVersionsResponse200Item']]]
190
+ Response[Union[GetApiPromptsByIdVersionsResponse400, GetApiPromptsByIdVersionsResponse401, GetApiPromptsByIdVersionsResponse404, GetApiPromptsByIdVersionsResponse422, GetApiPromptsByIdVersionsResponse500, list['GetApiPromptsByIdVersionsResponse200Item']]]
181
191
  """
182
192
 
183
193
  kwargs = _get_kwargs(
@@ -198,6 +208,7 @@ async def asyncio(
198
208
  GetApiPromptsByIdVersionsResponse400,
199
209
  GetApiPromptsByIdVersionsResponse401,
200
210
  GetApiPromptsByIdVersionsResponse404,
211
+ GetApiPromptsByIdVersionsResponse422,
201
212
  GetApiPromptsByIdVersionsResponse500,
202
213
  list["GetApiPromptsByIdVersionsResponse200Item"],
203
214
  ]
@@ -212,7 +223,7 @@ async def asyncio(
212
223
  httpx.TimeoutException: If the request takes longer than Client.timeout.
213
224
 
214
225
  Returns:
215
- Union[GetApiPromptsByIdVersionsResponse400, GetApiPromptsByIdVersionsResponse401, GetApiPromptsByIdVersionsResponse404, GetApiPromptsByIdVersionsResponse500, list['GetApiPromptsByIdVersionsResponse200Item']]
226
+ Union[GetApiPromptsByIdVersionsResponse400, GetApiPromptsByIdVersionsResponse401, GetApiPromptsByIdVersionsResponse404, GetApiPromptsByIdVersionsResponse422, GetApiPromptsByIdVersionsResponse500, list['GetApiPromptsByIdVersionsResponse200Item']]
216
227
  """
217
228
 
218
229
  return (
@@ -10,6 +10,7 @@ from ...models.post_api_prompts_response_200 import PostApiPromptsResponse200
10
10
  from ...models.post_api_prompts_response_400 import PostApiPromptsResponse400
11
11
  from ...models.post_api_prompts_response_401 import PostApiPromptsResponse401
12
12
  from ...models.post_api_prompts_response_409 import PostApiPromptsResponse409
13
+ from ...models.post_api_prompts_response_422 import PostApiPromptsResponse422
13
14
  from ...models.post_api_prompts_response_500 import PostApiPromptsResponse500
14
15
  from ...types import Response
15
16
 
@@ -42,6 +43,7 @@ def _parse_response(
42
43
  PostApiPromptsResponse400,
43
44
  PostApiPromptsResponse401,
44
45
  PostApiPromptsResponse409,
46
+ PostApiPromptsResponse422,
45
47
  PostApiPromptsResponse500,
46
48
  ]
47
49
  ]:
@@ -61,6 +63,10 @@ def _parse_response(
61
63
  response_409 = PostApiPromptsResponse409.from_dict(response.json())
62
64
 
63
65
  return response_409
66
+ if response.status_code == 422:
67
+ response_422 = PostApiPromptsResponse422.from_dict(response.json())
68
+
69
+ return response_422
64
70
  if response.status_code == 500:
65
71
  response_500 = PostApiPromptsResponse500.from_dict(response.json())
66
72
 
@@ -79,6 +85,7 @@ def _build_response(
79
85
  PostApiPromptsResponse400,
80
86
  PostApiPromptsResponse401,
81
87
  PostApiPromptsResponse409,
88
+ PostApiPromptsResponse422,
82
89
  PostApiPromptsResponse500,
83
90
  ]
84
91
  ]:
@@ -100,6 +107,7 @@ def sync_detailed(
100
107
  PostApiPromptsResponse400,
101
108
  PostApiPromptsResponse401,
102
109
  PostApiPromptsResponse409,
110
+ PostApiPromptsResponse422,
103
111
  PostApiPromptsResponse500,
104
112
  ]
105
113
  ]:
@@ -113,7 +121,7 @@ def sync_detailed(
113
121
  httpx.TimeoutException: If the request takes longer than Client.timeout.
114
122
 
115
123
  Returns:
116
- Response[Union[PostApiPromptsResponse200, PostApiPromptsResponse400, PostApiPromptsResponse401, PostApiPromptsResponse409, PostApiPromptsResponse500]]
124
+ Response[Union[PostApiPromptsResponse200, PostApiPromptsResponse400, PostApiPromptsResponse401, PostApiPromptsResponse409, PostApiPromptsResponse422, PostApiPromptsResponse500]]
117
125
  """
118
126
 
119
127
  kwargs = _get_kwargs(
@@ -137,6 +145,7 @@ def sync(
137
145
  PostApiPromptsResponse400,
138
146
  PostApiPromptsResponse401,
139
147
  PostApiPromptsResponse409,
148
+ PostApiPromptsResponse422,
140
149
  PostApiPromptsResponse500,
141
150
  ]
142
151
  ]:
@@ -150,7 +159,7 @@ def sync(
150
159
  httpx.TimeoutException: If the request takes longer than Client.timeout.
151
160
 
152
161
  Returns:
153
- Union[PostApiPromptsResponse200, PostApiPromptsResponse400, PostApiPromptsResponse401, PostApiPromptsResponse409, PostApiPromptsResponse500]
162
+ Union[PostApiPromptsResponse200, PostApiPromptsResponse400, PostApiPromptsResponse401, PostApiPromptsResponse409, PostApiPromptsResponse422, PostApiPromptsResponse500]
154
163
  """
155
164
 
156
165
  return sync_detailed(
@@ -169,6 +178,7 @@ async def asyncio_detailed(
169
178
  PostApiPromptsResponse400,
170
179
  PostApiPromptsResponse401,
171
180
  PostApiPromptsResponse409,
181
+ PostApiPromptsResponse422,
172
182
  PostApiPromptsResponse500,
173
183
  ]
174
184
  ]:
@@ -182,7 +192,7 @@ async def asyncio_detailed(
182
192
  httpx.TimeoutException: If the request takes longer than Client.timeout.
183
193
 
184
194
  Returns:
185
- Response[Union[PostApiPromptsResponse200, PostApiPromptsResponse400, PostApiPromptsResponse401, PostApiPromptsResponse409, PostApiPromptsResponse500]]
195
+ Response[Union[PostApiPromptsResponse200, PostApiPromptsResponse400, PostApiPromptsResponse401, PostApiPromptsResponse409, PostApiPromptsResponse422, PostApiPromptsResponse500]]
186
196
  """
187
197
 
188
198
  kwargs = _get_kwargs(
@@ -204,6 +214,7 @@ async def asyncio(
204
214
  PostApiPromptsResponse400,
205
215
  PostApiPromptsResponse401,
206
216
  PostApiPromptsResponse409,
217
+ PostApiPromptsResponse422,
207
218
  PostApiPromptsResponse500,
208
219
  ]
209
220
  ]:
@@ -217,7 +228,7 @@ async def asyncio(
217
228
  httpx.TimeoutException: If the request takes longer than Client.timeout.
218
229
 
219
230
  Returns:
220
- Union[PostApiPromptsResponse200, PostApiPromptsResponse400, PostApiPromptsResponse401, PostApiPromptsResponse409, PostApiPromptsResponse500]
231
+ Union[PostApiPromptsResponse200, PostApiPromptsResponse400, PostApiPromptsResponse401, PostApiPromptsResponse409, PostApiPromptsResponse422, PostApiPromptsResponse500]
221
232
  """
222
233
 
223
234
  return (