unique_toolkit 0.5.50__py3-none-any.whl → 0.5.51__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.
- unique_toolkit/language_model/service.py +10 -0
- {unique_toolkit-0.5.50.dist-info → unique_toolkit-0.5.51.dist-info}/METADATA +4 -2
- {unique_toolkit-0.5.50.dist-info → unique_toolkit-0.5.51.dist-info}/RECORD +5 -5
- {unique_toolkit-0.5.50.dist-info → unique_toolkit-0.5.51.dist-info}/LICENSE +0 -0
- {unique_toolkit-0.5.50.dist-info → unique_toolkit-0.5.51.dist-info}/WHEEL +0 -0
@@ -51,6 +51,8 @@ class LanguageModelService(BaseService):
|
|
51
51
|
temperature (float): The temperature value. Defaults to 0.
|
52
52
|
timeout (int): The timeout value in milliseconds. Defaults to 240_000.
|
53
53
|
tools (Optional[list[LanguageModelTool]]): The tools to use. Defaults to None.
|
54
|
+
structured_output_model (Optional[Type[BaseModel]]): The structured output model. Defaults to None.
|
55
|
+
structured_output_enforce_schema (bool): Whether to enforce the schema. Defaults to False.
|
54
56
|
other_options (Optional[dict]): The other options to use. Defaults to None.
|
55
57
|
|
56
58
|
Returns:
|
@@ -110,6 +112,8 @@ class LanguageModelService(BaseService):
|
|
110
112
|
timeout (int): The timeout value in milliseconds for the request. Defaults to 240_000.
|
111
113
|
tools (Optional[list[LanguageModelTool]]): Optional list of tools to include in the request.
|
112
114
|
other_options (Optional[dict]): The other options to use. Defaults to None.
|
115
|
+
structured_output_model (Optional[Type[BaseModel]]): The structured output model. Defaults to None.
|
116
|
+
structured_output_enforce_schema (bool): Whether to enforce the schema. Defaults to False.
|
113
117
|
logger (Optional[logging.Logger], optional): The logger used to log errors. Defaults to the logger for the current module.
|
114
118
|
|
115
119
|
Returns:
|
@@ -151,6 +155,8 @@ class LanguageModelService(BaseService):
|
|
151
155
|
temperature: float = DEFAULT_COMPLETE_TEMPERATURE,
|
152
156
|
timeout: int = DEFAULT_COMPLETE_TIMEOUT,
|
153
157
|
tools: Optional[list[LanguageModelTool]] = None,
|
158
|
+
structured_output_model: Optional[Type[BaseModel]] = None,
|
159
|
+
structured_output_enforce_schema: bool = False,
|
154
160
|
other_options: Optional[dict] = None,
|
155
161
|
) -> LanguageModelResponse:
|
156
162
|
"""
|
@@ -166,6 +172,8 @@ class LanguageModelService(BaseService):
|
|
166
172
|
temperature (float): The temperature setting for the completion. Defaults to 0.0.
|
167
173
|
timeout (int): The timeout value in milliseconds for the request. Defaults to 240,000.
|
168
174
|
tools (Optional[list[LanguageModelTool]]): Optional list of tools to include in the request.
|
175
|
+
structured_output_model (Optional[Type[BaseModel]]): The structured output model. Defaults to None.
|
176
|
+
structured_output_enforce_schema (bool): Whether to enforce the schema. Defaults to False.
|
169
177
|
other_options (Optional[dict]): The other options to use. Defaults to None.
|
170
178
|
Returns:
|
171
179
|
LanguageModelResponse: The response object containing the completed result.
|
@@ -182,6 +190,8 @@ class LanguageModelService(BaseService):
|
|
182
190
|
tools=tools,
|
183
191
|
other_options=other_options,
|
184
192
|
logger=self.logger,
|
193
|
+
structured_output_model=structured_output_model,
|
194
|
+
structured_output_enforce_schema=structured_output_enforce_schema,
|
185
195
|
)
|
186
196
|
|
187
197
|
def stream_complete(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: unique_toolkit
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.51
|
4
4
|
Summary:
|
5
5
|
License: Proprietary
|
6
6
|
Author: Martin Fadler
|
@@ -100,10 +100,12 @@ All notable changes to this project will be documented in this file.
|
|
100
100
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
101
101
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
102
102
|
|
103
|
+
## [0.5.51] - 2025-01-30
|
104
|
+
- Add missing structured output arguments in complete_async
|
105
|
+
|
103
106
|
## [0.5.50] - 2025-01-30
|
104
107
|
- Add the possibility to define completion output structure through a pydantic class
|
105
108
|
|
106
|
-
|
107
109
|
## [0.5.49] - 2025-01-24
|
108
110
|
- Add `parsed` and `refusal` to `LanguageModelAssistantMessage` to support structured output
|
109
111
|
|
@@ -40,11 +40,11 @@ unique_toolkit/language_model/builder.py,sha256=nsRqWO_2dgFehK5CgtqR5aqXgYUU0QL6
|
|
40
40
|
unique_toolkit/language_model/infos.py,sha256=NgoV05ausVWMqrYqgH6i3s7tYG7mejupROIF_bwEGZo,13050
|
41
41
|
unique_toolkit/language_model/prompt.py,sha256=JSawaLjQg3VR-E2fK8engFyJnNdk21zaO8pPIodzN4Q,3991
|
42
42
|
unique_toolkit/language_model/schemas.py,sha256=87511yupvea-U6sfKWfelETevNMVPevhj7mEqX5FszU,7461
|
43
|
-
unique_toolkit/language_model/service.py,sha256=
|
43
|
+
unique_toolkit/language_model/service.py,sha256=MS6IDB69rUeNsWRj-qB491wbmiHzgVtnvsywmjnDwSQ,17808
|
44
44
|
unique_toolkit/language_model/utils.py,sha256=bPQ4l6_YO71w-zaIPanUUmtbXC1_hCvLK0tAFc3VCRc,1902
|
45
45
|
unique_toolkit/short_term_memory/schemas.py,sha256=OhfcXyF6ACdwIXW45sKzjtZX_gkcJs8FEZXcgQTNenw,1406
|
46
46
|
unique_toolkit/short_term_memory/service.py,sha256=Jd9P72-VvJy7hnqNrjmrmB5BHmsKuOpTiT0Jr-dBbsQ,1682
|
47
|
-
unique_toolkit-0.5.
|
48
|
-
unique_toolkit-0.5.
|
49
|
-
unique_toolkit-0.5.
|
50
|
-
unique_toolkit-0.5.
|
47
|
+
unique_toolkit-0.5.51.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
|
48
|
+
unique_toolkit-0.5.51.dist-info/METADATA,sha256=8mPDfyWkYAk1k8lplSFdyCK61kDOZk4sdNWBwA8MzUw,16016
|
49
|
+
unique_toolkit-0.5.51.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
50
|
+
unique_toolkit-0.5.51.dist-info/RECORD,,
|
File without changes
|
File without changes
|