langwatch 0.5.1__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.1.dist-info → langwatch-0.6.0.dist-info}/METADATA +2 -2
  43. {langwatch-0.5.1.dist-info → langwatch-0.6.0.dist-info}/RECORD +44 -36
  44. {langwatch-0.5.1.dist-info → langwatch-0.6.0.dist-info}/WHEEL +0 -0
@@ -2,7 +2,6 @@ from collections.abc import Mapping
2
2
  from typing import TYPE_CHECKING, Any, TypeVar, Union
3
3
 
4
4
  from attrs import define as _attrs_define
5
- from attrs import field as _attrs_field
6
5
 
7
6
  from ..models.put_api_prompts_by_id_body_schema_version import PutApiPromptsByIdBodySchemaVersion
8
7
  from ..models.put_api_prompts_by_id_body_scope import PutApiPromptsByIdBodyScope
@@ -21,11 +20,10 @@ T = TypeVar("T", bound="PutApiPromptsByIdBody")
21
20
  class PutApiPromptsByIdBody:
22
21
  """
23
22
  Attributes:
24
- handle (Union[Unset, str]):
23
+ commit_message (str):
25
24
  model (Union[Unset, str]):
26
25
  temperature (Union[Unset, float]):
27
26
  max_tokens (Union[Unset, float]):
28
- commit_message (Union[Unset, str]):
29
27
  author_id (Union[Unset, str]):
30
28
  prompt (Union[Unset, str]):
31
29
  messages (Union[Unset, list['PutApiPromptsByIdBodyMessagesItem']]):
@@ -33,13 +31,13 @@ class PutApiPromptsByIdBody:
33
31
  outputs (Union[Unset, list['PutApiPromptsByIdBodyOutputsItem']]):
34
32
  schema_version (Union[Unset, PutApiPromptsByIdBodySchemaVersion]):
35
33
  scope (Union[Unset, PutApiPromptsByIdBodyScope]):
34
+ handle (Union[Unset, str]):
36
35
  """
37
36
 
38
- handle: Union[Unset, str] = UNSET
37
+ commit_message: str
39
38
  model: Union[Unset, str] = UNSET
40
39
  temperature: Union[Unset, float] = UNSET
41
40
  max_tokens: Union[Unset, float] = UNSET
42
- commit_message: Union[Unset, str] = UNSET
43
41
  author_id: Union[Unset, str] = UNSET
44
42
  prompt: Union[Unset, str] = UNSET
45
43
  messages: Union[Unset, list["PutApiPromptsByIdBodyMessagesItem"]] = UNSET
@@ -47,10 +45,10 @@ class PutApiPromptsByIdBody:
47
45
  outputs: Union[Unset, list["PutApiPromptsByIdBodyOutputsItem"]] = UNSET
48
46
  schema_version: Union[Unset, PutApiPromptsByIdBodySchemaVersion] = UNSET
49
47
  scope: Union[Unset, PutApiPromptsByIdBodyScope] = UNSET
50
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
48
+ handle: Union[Unset, str] = UNSET
51
49
 
52
50
  def to_dict(self) -> dict[str, Any]:
53
- handle = self.handle
51
+ commit_message = self.commit_message
54
52
 
55
53
  model = self.model
56
54
 
@@ -58,8 +56,6 @@ class PutApiPromptsByIdBody:
58
56
 
59
57
  max_tokens = self.max_tokens
60
58
 
61
- commit_message = self.commit_message
62
-
63
59
  author_id = self.author_id
64
60
 
65
61
  prompt = self.prompt
@@ -93,19 +89,20 @@ class PutApiPromptsByIdBody:
93
89
  if not isinstance(self.scope, Unset):
94
90
  scope = self.scope.value
95
91
 
92
+ handle = self.handle
93
+
96
94
  field_dict: dict[str, Any] = {}
97
- field_dict.update(self.additional_properties)
98
- field_dict.update({})
99
- if handle is not UNSET:
100
- field_dict["handle"] = handle
95
+ field_dict.update(
96
+ {
97
+ "commitMessage": commit_message,
98
+ }
99
+ )
101
100
  if model is not UNSET:
102
101
  field_dict["model"] = model
103
102
  if temperature is not UNSET:
104
103
  field_dict["temperature"] = temperature
105
104
  if max_tokens is not UNSET:
106
105
  field_dict["maxTokens"] = max_tokens
107
- if commit_message is not UNSET:
108
- field_dict["commitMessage"] = commit_message
109
106
  if author_id is not UNSET:
110
107
  field_dict["authorId"] = author_id
111
108
  if prompt is not UNSET:
@@ -120,6 +117,8 @@ class PutApiPromptsByIdBody:
120
117
  field_dict["schemaVersion"] = schema_version
121
118
  if scope is not UNSET:
122
119
  field_dict["scope"] = scope
120
+ if handle is not UNSET:
121
+ field_dict["handle"] = handle
123
122
 
124
123
  return field_dict
125
124
 
@@ -130,7 +129,7 @@ class PutApiPromptsByIdBody:
130
129
  from ..models.put_api_prompts_by_id_body_outputs_item import PutApiPromptsByIdBodyOutputsItem
131
130
 
132
131
  d = dict(src_dict)
133
- handle = d.pop("handle", UNSET)
132
+ commit_message = d.pop("commitMessage")
134
133
 
135
134
  model = d.pop("model", UNSET)
136
135
 
@@ -138,8 +137,6 @@ class PutApiPromptsByIdBody:
138
137
 
139
138
  max_tokens = d.pop("maxTokens", UNSET)
140
139
 
141
- commit_message = d.pop("commitMessage", UNSET)
142
-
143
140
  author_id = d.pop("authorId", UNSET)
144
141
 
145
142
  prompt = d.pop("prompt", UNSET)
@@ -179,12 +176,13 @@ class PutApiPromptsByIdBody:
179
176
  else:
180
177
  scope = PutApiPromptsByIdBodyScope(_scope)
181
178
 
179
+ handle = d.pop("handle", UNSET)
180
+
182
181
  put_api_prompts_by_id_body = cls(
183
- handle=handle,
182
+ commit_message=commit_message,
184
183
  model=model,
185
184
  temperature=temperature,
186
185
  max_tokens=max_tokens,
187
- commit_message=commit_message,
188
186
  author_id=author_id,
189
187
  prompt=prompt,
190
188
  messages=messages,
@@ -192,23 +190,7 @@ class PutApiPromptsByIdBody:
192
190
  outputs=outputs,
193
191
  schema_version=schema_version,
194
192
  scope=scope,
193
+ handle=handle,
195
194
  )
196
195
 
197
- put_api_prompts_by_id_body.additional_properties = d
198
196
  return put_api_prompts_by_id_body
199
-
200
- @property
201
- def additional_keys(self) -> list[str]:
202
- return list(self.additional_properties.keys())
203
-
204
- def __getitem__(self, key: str) -> Any:
205
- return self.additional_properties[key]
206
-
207
- def __setitem__(self, key: str, value: Any) -> None:
208
- self.additional_properties[key] = value
209
-
210
- def __delitem__(self, key: str) -> None:
211
- del self.additional_properties[key]
212
-
213
- def __contains__(self, key: str) -> bool:
214
- 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="PutApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem")
8
10
 
9
11
 
@@ -13,8 +15,9 @@ class PutApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
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 PutApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
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 PutApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
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 PutApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
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 PutApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
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 PutApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
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 PutApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
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 PutApiPromptsByIdResponse200DemonstrationsInlineColumnTypesItem:
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
  put_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
  put_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="PutApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTypesItem")
8
10
 
9
11
 
@@ -13,8 +15,9 @@ class PutApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
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 PutApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
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 PutApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
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 PutApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
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 PutApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
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 PutApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
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 PutApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
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 PutApiPromptsByIdResponse200PromptingTechniqueDemonstrationsInlineColumnTy
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
  put_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
  put_api_prompts_by_id_response_200_prompting_technique_demonstrations_inline_column_types_item.additional_properties = d
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langwatch
3
- Version: 0.5.1
3
+ Version: 0.6.0
4
4
  Summary: LangWatch Python SDK, for monitoring your LLMs
5
5
  Author-email: Langwatch Engineers <engineering@langwatch.ai>
6
6
  License: MIT
@@ -37,7 +37,7 @@ Requires-Dist: termcolor>=3.0.1
37
37
  Provides-Extra: dev
38
38
  Requires-Dist: ruff>=0.11.1; extra == 'dev'
39
39
  Provides-Extra: dspy
40
- Requires-Dist: dspy-ai<3.0.0,>=2.5.2; extra == 'dspy'
40
+ Requires-Dist: dspy-ai<4,>=3.0.3; extra == 'dspy'
41
41
  Provides-Extra: litellm
42
42
  Requires-Dist: litellm>=1.52.1; extra == 'litellm'
43
43
  Provides-Extra: tests