unique_toolkit 0.5.13__tar.gz → 0.5.15__tar.gz

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 (33) hide show
  1. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/CHANGELOG.md +6 -1
  2. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/PKG-INFO +7 -2
  3. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/pyproject.toml +1 -1
  4. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/content/service.py +4 -2
  5. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/language_model/infos.py +11 -0
  6. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/LICENSE +0 -0
  7. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/README.md +0 -0
  8. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/__init__.py +0 -0
  9. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/_common/_base_service.py +0 -0
  10. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/_common/_time_utils.py +0 -0
  11. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/app/__init__.py +0 -0
  12. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/app/init_logging.py +0 -0
  13. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/app/init_sdk.py +0 -0
  14. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/app/performance/async_tasks.py +0 -0
  15. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/app/performance/async_wrapper.py +0 -0
  16. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/app/schemas.py +0 -0
  17. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/app/verification.py +0 -0
  18. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/chat/__init__.py +0 -0
  19. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/chat/schemas.py +0 -0
  20. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/chat/service.py +0 -0
  21. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/chat/state.py +0 -0
  22. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/chat/utils.py +0 -0
  23. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/content/__init__.py +0 -0
  24. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/content/schemas.py +0 -0
  25. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/content/utils.py +0 -0
  26. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/embedding/__init__.py +0 -0
  27. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/embedding/schemas.py +0 -0
  28. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/embedding/service.py +0 -0
  29. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/embedding/utils.py +0 -0
  30. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/language_model/__init__.py +0 -0
  31. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/language_model/schemas.py +0 -0
  32. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/language_model/service.py +0 -0
  33. {unique_toolkit-0.5.13 → unique_toolkit-0.5.15}/unique_toolkit/language_model/utils.py +0 -0
@@ -5,11 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.5.15] - 2024-08-27
9
+ - Possibility to specify root directory in `ContentService.download_content`
10
+
11
+ ## [0.5.14] - 2024-08-26
12
+ - Add AZURE_GPT_4o_MINI_2024_0718 to language model infos
13
+
8
14
  ## [0.5.13] - 2024-08-19
9
15
  - Added `items` to `LanguageModelToolParameterProperty` schema to add support for parameters with list types.
10
16
  - Added `returns` to `LanguageModelTool` schema to describe the return types of tool calls.
11
17
 
12
-
13
18
  ## [0.5.12] - 2024-08-7
14
19
  - added `completedAt` datetime to `unique_sdk.Message.modify` and `unique_sdk.Message.modify_async`
15
20
  - added `original_text` and `language` to `EventUserMessage`
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 0.5.13
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`
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "unique_toolkit"
3
- version = "0.5.13"
3
+ version = "0.5.15"
4
4
  description = ""
5
5
  authors = [
6
6
  "Martin Fadler <martin.fadler@unique.ch>",
@@ -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="/tmp")
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
+ )
File without changes