unique_toolkit 0.5.13__py3-none-any.whl → 0.5.15__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/content/service.py +4 -2
- unique_toolkit/language_model/infos.py +11 -0
- {unique_toolkit-0.5.13.dist-info → unique_toolkit-0.5.15.dist-info}/METADATA +7 -2
- {unique_toolkit-0.5.13.dist-info → unique_toolkit-0.5.15.dist-info}/RECORD +6 -6
- {unique_toolkit-0.5.13.dist-info → unique_toolkit-0.5.15.dist-info}/LICENSE +0 -0
- {unique_toolkit-0.5.13.dist-info → unique_toolkit-0.5.15.dist-info}/WHEEL +0 -0
@@ -2,7 +2,7 @@ import logging
|
|
2
2
|
import os
|
3
3
|
import tempfile
|
4
4
|
from pathlib import Path
|
5
|
-
from typing import Optional, cast
|
5
|
+
from typing import Optional, Union, cast
|
6
6
|
|
7
7
|
import requests
|
8
8
|
import unique_sdk
|
@@ -344,6 +344,7 @@ class ContentService(BaseService):
|
|
344
344
|
content_id: str,
|
345
345
|
content_name: str,
|
346
346
|
chat_id: Optional[str] = None,
|
347
|
+
dir_path: Optional[Union[str, Path]] = "/tmp",
|
347
348
|
) -> Path:
|
348
349
|
"""
|
349
350
|
Downloads content to temporary directory
|
@@ -352,6 +353,7 @@ class ContentService(BaseService):
|
|
352
353
|
content_id (str): The id of the uploaded content.
|
353
354
|
content_name (str): The name of the uploaded content.
|
354
355
|
chat_id (Optional[str]): The chat_id, defaults to None.
|
356
|
+
dir_path (Optional[Union[str, Path]]): The directory path to download the content to, defaults to "/tmp". If not provided, the content will be downloaded to a random directory inside /tmp. Be aware that this directory won't be cleaned up automatically.
|
355
357
|
|
356
358
|
Returns:
|
357
359
|
content_path: The path to the downloaded content in the temporary directory.
|
@@ -365,7 +367,7 @@ class ContentService(BaseService):
|
|
365
367
|
url = f"{url}?chatId={chat_id}"
|
366
368
|
|
367
369
|
# Create a random directory inside /tmp
|
368
|
-
random_dir = tempfile.mkdtemp(dir=
|
370
|
+
random_dir = tempfile.mkdtemp(dir=dir_path)
|
369
371
|
|
370
372
|
# Create the full file path
|
371
373
|
content_path = Path(random_dir) / content_name
|
@@ -17,6 +17,7 @@ class LanguageModelName(StrEnum):
|
|
17
17
|
AZURE_GPT_4_32K_0613 = "AZURE_GPT_4_32K_0613"
|
18
18
|
AZURE_GPT_4_TURBO_2024_0409 = "AZURE_GPT_4_TURBO_2024_0409"
|
19
19
|
AZURE_GPT_4o_2024_0513 = "AZURE_GPT_4o_2024_0513"
|
20
|
+
AZURE_GPT_4o_MINI_2024_0718 = "AZURE_GPT_4o_MINI_2024_0718"
|
20
21
|
|
21
22
|
|
22
23
|
class LanguageModelProvider(StrEnum):
|
@@ -303,3 +304,13 @@ AzureGpt4o20240513 = create_language_model(
|
|
303
304
|
info_cutoff_at=date(2023, 10, 1),
|
304
305
|
published_at=date(2024, 5, 13),
|
305
306
|
)
|
307
|
+
|
308
|
+
AzureGpt4oMini20240718 = create_language_model(
|
309
|
+
name=LanguageModelName.AZURE_GPT_4o_MINI_2024_0718,
|
310
|
+
provider=LanguageModelProvider.AZURE,
|
311
|
+
version="2024-07-18",
|
312
|
+
token_limit_input=128000,
|
313
|
+
token_limit_output=16384,
|
314
|
+
info_cutoff_at=date(2023, 10, 1),
|
315
|
+
published_at=date(2024, 7, 18),
|
316
|
+
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: unique_toolkit
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.15
|
4
4
|
Summary:
|
5
5
|
License: MIT
|
6
6
|
Author: Martin Fadler
|
@@ -101,11 +101,16 @@ All notable changes to this project will be documented in this file.
|
|
101
101
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
102
102
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
103
103
|
|
104
|
+
## [0.5.15] - 2024-08-27
|
105
|
+
- Possibility to specify root directory in `ContentService.download_content`
|
106
|
+
|
107
|
+
## [0.5.14] - 2024-08-26
|
108
|
+
- Add AZURE_GPT_4o_MINI_2024_0718 to language model infos
|
109
|
+
|
104
110
|
## [0.5.13] - 2024-08-19
|
105
111
|
- Added `items` to `LanguageModelToolParameterProperty` schema to add support for parameters with list types.
|
106
112
|
- Added `returns` to `LanguageModelTool` schema to describe the return types of tool calls.
|
107
113
|
|
108
|
-
|
109
114
|
## [0.5.12] - 2024-08-7
|
110
115
|
- added `completedAt` datetime to `unique_sdk.Message.modify` and `unique_sdk.Message.modify_async`
|
111
116
|
- added `original_text` and `language` to `EventUserMessage`
|
@@ -15,18 +15,18 @@ unique_toolkit/chat/state.py,sha256=Cjgwv_2vhDFbV69xxsn7SefhaoIAEqLx3ferdVFCnOg,
|
|
15
15
|
unique_toolkit/chat/utils.py,sha256=ihm-wQykBWhB4liR3LnwPVPt_qGW6ETq21Mw4HY0THE,854
|
16
16
|
unique_toolkit/content/__init__.py,sha256=MSH2sxjQyKD2Sef92fzE5Dt9SihdzivB6yliSwJfTmQ,890
|
17
17
|
unique_toolkit/content/schemas.py,sha256=UlC5nBIaFkq9TD31LR6ioG9JRZ1ScmtABi0l06HZR70,2231
|
18
|
-
unique_toolkit/content/service.py,sha256=
|
18
|
+
unique_toolkit/content/service.py,sha256=iBS1ntg5xdL-i5lfDlN2MGYDTIdg3u-uxQH9h_ss3KM,13894
|
19
19
|
unique_toolkit/content/utils.py,sha256=Lake671plRsqNvO3pN_rmyVcpwbdED_KQpLcCnc4lv4,6902
|
20
20
|
unique_toolkit/embedding/__init__.py,sha256=dr8M9jvslQTxPpxgaGwzxY0FildiWf-DidN_cahPAWw,191
|
21
21
|
unique_toolkit/embedding/schemas.py,sha256=1GvKCaSk4jixzVQ2PKq8yDqwGEVY_hWclYtoAr6CC2g,96
|
22
22
|
unique_toolkit/embedding/service.py,sha256=Iiw-sbdkjuWlWMfLM9qyC4GNTJOotQAaVjkYvh5Su4Y,2370
|
23
23
|
unique_toolkit/embedding/utils.py,sha256=v86lo__bCJbxZBQ3OcLu5SuwT6NbFfWlcq8iyk6BuzQ,279
|
24
24
|
unique_toolkit/language_model/__init__.py,sha256=QgU_uwpVh1URQyVs6l-6Am4UwmEEhuGXNic3dUZ0FCc,1701
|
25
|
-
unique_toolkit/language_model/infos.py,sha256=
|
25
|
+
unique_toolkit/language_model/infos.py,sha256=JkugUAFFlrhTHXeM3A_R5QLkNSR9Ro85xWQFcdc2oM0,9307
|
26
26
|
unique_toolkit/language_model/schemas.py,sha256=h5zjZNk7O-wLKtRuiNtMCIbp5hEVXrAOviKonQcjFuI,4594
|
27
27
|
unique_toolkit/language_model/service.py,sha256=JjsOOcGDcR7db3yF3_oDXclEGfxqmwWpL5jor7Q42cU,10470
|
28
28
|
unique_toolkit/language_model/utils.py,sha256=WBPj1XKkDgxy_-T8HCZvsfkkSzj_1w4UZzNmyvdbBLY,1081
|
29
|
-
unique_toolkit-0.5.
|
30
|
-
unique_toolkit-0.5.
|
31
|
-
unique_toolkit-0.5.
|
32
|
-
unique_toolkit-0.5.
|
29
|
+
unique_toolkit-0.5.15.dist-info/LICENSE,sha256=bIeCWCYuoUU_MzNdg48-ubJSVm7qxakaRbzTiJ5uxrs,1065
|
30
|
+
unique_toolkit-0.5.15.dist-info/METADATA,sha256=YWF1EolvIQgwdP9-oV04EE-o6hWzA5HP69bl3_Ui400,10227
|
31
|
+
unique_toolkit-0.5.15.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
32
|
+
unique_toolkit-0.5.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|