unique_toolkit 0.5.21__tar.gz → 0.5.22__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.21 → unique_toolkit-0.5.22}/CHANGELOG.md +4 -1
  2. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/PKG-INFO +5 -2
  3. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/pyproject.toml +1 -1
  4. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/language_model/__init__.py +3 -0
  5. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/language_model/schemas.py +9 -0
  6. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/LICENSE +0 -0
  7. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/README.md +0 -0
  8. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/__init__.py +0 -0
  9. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/_common/_base_service.py +0 -0
  10. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/_common/_time_utils.py +0 -0
  11. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/app/__init__.py +0 -0
  12. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/app/init_logging.py +0 -0
  13. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/app/init_sdk.py +0 -0
  14. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/app/performance/async_tasks.py +0 -0
  15. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/app/performance/async_wrapper.py +0 -0
  16. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/app/schemas.py +0 -0
  17. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/app/verification.py +0 -0
  18. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/chat/__init__.py +0 -0
  19. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/chat/schemas.py +0 -0
  20. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/chat/service.py +0 -0
  21. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/chat/state.py +0 -0
  22. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/chat/utils.py +0 -0
  23. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/content/__init__.py +0 -0
  24. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/content/schemas.py +0 -0
  25. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/content/service.py +0 -0
  26. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/content/utils.py +0 -0
  27. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/embedding/__init__.py +0 -0
  28. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/embedding/schemas.py +0 -0
  29. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/embedding/service.py +0 -0
  30. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/embedding/utils.py +0 -0
  31. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/language_model/infos.py +0 -0
  32. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/language_model/service.py +0 -0
  33. {unique_toolkit-0.5.21 → unique_toolkit-0.5.22}/unique_toolkit/language_model/utils.py +0 -0
@@ -5,8 +5,11 @@ 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.22] - 2024-09-17
9
+ - Add `LanguageModelToolMessage` as additional `LanguageModelMessage`
10
+
8
11
  ## [0.5.21] - 2024-09-16
9
- - Add `tool` as new role `ChatMessage`, as well as `tool_calls` and `tool_call_id` as additional parameters
12
+ - Add `tool` as new role to `ChatMessage`, as well as `tool_calls` and `tool_call_id` as additional parameters
10
13
 
11
14
  ## [0.5.20] - 2024-09-16
12
15
  - `LanguageModelService` now supports complete_util_async that can be called without instantiating the class, currently being used in the Hallucination service and evaluation API
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 0.5.21
3
+ Version: 0.5.22
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: Martin Fadler
@@ -100,8 +100,11 @@ 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.22] - 2024-09-17
104
+ - Add `LanguageModelToolMessage` as additional `LanguageModelMessage`
105
+
103
106
  ## [0.5.21] - 2024-09-16
104
- - Add `tool` as new role `ChatMessage`, as well as `tool_calls` and `tool_call_id` as additional parameters
107
+ - Add `tool` as new role to `ChatMessage`, as well as `tool_calls` and `tool_call_id` as additional parameters
105
108
 
106
109
  ## [0.5.20] - 2024-09-16
107
110
  - `LanguageModelService` now supports complete_util_async that can be called without instantiating the class, currently being used in the Hallucination service and evaluation API
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "unique_toolkit"
3
- version = "0.5.21"
3
+ version = "0.5.22"
4
4
  description = ""
5
5
  authors = [
6
6
  "Martin Fadler <martin.fadler@unique.ch>",
@@ -39,6 +39,9 @@ from .schemas import (
39
39
  from .schemas import (
40
40
  LanguageModelTool as LanguageModelTool,
41
41
  )
42
+ from .schemas import (
43
+ LanguageModelToolMessage as LanguageModelToolMessage,
44
+ )
42
45
  from .schemas import (
43
46
  LanguageModelToolParameterProperty as LanguageModelToolParameterProperty,
44
47
  )
@@ -17,6 +17,7 @@ class LanguageModelMessageRole(StrEnum):
17
17
  USER = "user"
18
18
  SYSTEM = "system"
19
19
  ASSISTANT = "assistant"
20
+ TOOL = "tool"
20
21
 
21
22
 
22
23
  class LanguageModelFunction(BaseModel):
@@ -72,6 +73,14 @@ class LanguageModelAssistantMessage(LanguageModelMessage):
72
73
  return LanguageModelMessageRole.ASSISTANT
73
74
 
74
75
 
76
+ class LanguageModelToolMessage(LanguageModelMessage):
77
+ role: LanguageModelMessageRole = LanguageModelMessageRole.TOOL
78
+
79
+ @field_validator("role", mode="before")
80
+ def set_role(cls, value):
81
+ return LanguageModelMessageRole.TOOL
82
+
83
+
75
84
  class LanguageModelMessages(RootModel):
76
85
  root: list[LanguageModelMessage]
77
86
 
File without changes