unique_toolkit 0.8.11__py3-none-any.whl → 0.8.12__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.
@@ -8,6 +8,7 @@ from typing_extensions import deprecated
8
8
 
9
9
  from unique_toolkit._common.validate_required_values import validate_required_values
10
10
  from unique_toolkit.app.schemas import BaseEvent, ChatEvent, Event
11
+ from unique_toolkit.app.unique_settings import UniqueSettings
11
12
  from unique_toolkit.content import DOMAIN_NAME
12
13
  from unique_toolkit.content.constants import DEFAULT_SEARCH_LANGUAGE
13
14
  from unique_toolkit.content.functions import (
@@ -53,7 +54,7 @@ class ContentService:
53
54
  *,
54
55
  company_id: str,
55
56
  user_id: str,
56
- chat_id: str | None,
57
+ chat_id: str | None = None,
57
58
  metadata_filter: dict | None = None,
58
59
  ): ...
59
60
 
@@ -107,6 +108,19 @@ class ContentService:
107
108
  metadata_filter=metadata_filter,
108
109
  )
109
110
 
111
+ @classmethod
112
+ def from_settings(
113
+ cls, settings: UniqueSettings, metadata_filter: dict | None = None
114
+ ):
115
+ """
116
+ Initialize the ContentService with a settings object.
117
+ """
118
+ return cls(
119
+ company_id=settings.auth.company_id.get_secret_value(),
120
+ user_id=settings.auth.user_id.get_secret_value(),
121
+ metadata_filter=metadata_filter,
122
+ )
123
+
110
124
  @property
111
125
  @deprecated(
112
126
  "The event property is deprecated and will be removed in a future version."
@@ -5,6 +5,7 @@ from typing_extensions import deprecated
5
5
  from unique_toolkit._common._base_service import BaseService
6
6
  from unique_toolkit._common.validate_required_values import validate_required_values
7
7
  from unique_toolkit.app.schemas import BaseEvent, Event
8
+ from unique_toolkit.app.unique_settings import UniqueSettings
8
9
  from unique_toolkit.embedding.constants import DEFAULT_TIMEOUT
9
10
  from unique_toolkit.embedding.functions import embed_texts, embed_texts_async
10
11
  from unique_toolkit.embedding.schemas import Embeddings
@@ -54,6 +55,16 @@ class EmbeddingService(BaseService):
54
55
  """
55
56
  return cls(company_id=event.company_id, user_id=event.user_id)
56
57
 
58
+ @classmethod
59
+ def from_settings(cls, settings: UniqueSettings):
60
+ """
61
+ Initialize the EmbeddingService with a settings object.
62
+ """
63
+ return cls(
64
+ company_id=settings.auth.company_id.get_secret_value(),
65
+ user_id=settings.auth.user_id.get_secret_value(),
66
+ )
67
+
57
68
  @property
58
69
  @deprecated(
59
70
  "The event property is deprecated and will be removed in a future version."
@@ -6,6 +6,7 @@ from typing_extensions import deprecated
6
6
 
7
7
  from unique_toolkit._common.validate_required_values import validate_required_values
8
8
  from unique_toolkit.app.schemas import BaseEvent, ChatEvent, Event
9
+ from unique_toolkit.app.unique_settings import UniqueSettings
9
10
  from unique_toolkit.content.schemas import ContentChunk
10
11
  from unique_toolkit.language_model.constants import (
11
12
  DEFAULT_COMPLETE_TEMPERATURE,
@@ -89,6 +90,16 @@ class LanguageModelService:
89
90
  """
90
91
  return cls(company_id=event.company_id, user_id=event.user_id)
91
92
 
93
+ @classmethod
94
+ def from_settings(cls, settings: UniqueSettings):
95
+ """
96
+ Initialize the LanguageModelService with a settings object.
97
+ """
98
+ return cls(
99
+ company_id=settings.auth.company_id.get_secret_value(),
100
+ user_id=settings.auth.user_id.get_secret_value(),
101
+ )
102
+
92
103
  @property
93
104
  @deprecated(
94
105
  "The event property is deprecated and will be removed in a future version."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 0.8.11
3
+ Version: 0.8.12
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Martin Fadler
@@ -114,6 +114,10 @@ All notable changes to this project will be documented in this file.
114
114
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
115
115
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
116
116
 
117
+ ## [0.8.12] - 2025-08-18
118
+ - Fix no tool call respoonse in ChatMessage -> Open Ai messages translation
119
+ - Add simple append method to OpenAIMessageBuilder
120
+
117
121
  ## [0.8.11] - 2025-08-15
118
122
  - Fix no tool call respoonse in ChatMessage -> Open Ai messages translation
119
123
  - Add simple append method to OpenAIMessageBuilder
@@ -24,13 +24,13 @@ unique_toolkit/content/__init__.py,sha256=EdJg_A_7loEtCQf4cah3QARQreJx6pdz89Rm96
24
24
  unique_toolkit/content/constants.py,sha256=1iy4Y67xobl5VTnJB6SxSyuoBWbdLl9244xfVMUZi5o,60
25
25
  unique_toolkit/content/functions.py,sha256=HZtDIAH3ZxWleq5Si_v30n_7vTnNRu6BCxpTHb9TxdA,18635
26
26
  unique_toolkit/content/schemas.py,sha256=KJ604BOx0vBh2AwlTCZkOo55aHsI6yj8vxDAARKKqEo,2995
27
- unique_toolkit/content/service.py,sha256=GA4KHNmppp2L2TRKbFUI1grYUJbuNscfoVBYTPilY7s,20972
27
+ unique_toolkit/content/service.py,sha256=3zUu3vUcPV8Mb_v1TCyi2hicGVMLNBamKB3Q6-z1trY,21455
28
28
  unique_toolkit/content/utils.py,sha256=qNVmHTuETaPNGqheg7TbgPr1_1jbNHDc09N5RrmUIyo,7901
29
29
  unique_toolkit/embedding/__init__.py,sha256=uUyzjonPvuDCYsvXCIt7ErQXopLggpzX-MEQd3_e2kE,250
30
30
  unique_toolkit/embedding/constants.py,sha256=Lj8-Lcy1FvuC31PM9Exq7vaFuxQV4pEI1huUMFX-J2M,52
31
31
  unique_toolkit/embedding/functions.py,sha256=3qp-BfuMAbnp8YB04rh3xH8vsJuCBPizoy-JeaBFtoQ,1944
32
32
  unique_toolkit/embedding/schemas.py,sha256=1GvKCaSk4jixzVQ2PKq8yDqwGEVY_hWclYtoAr6CC2g,96
33
- unique_toolkit/embedding/service.py,sha256=z1MwwaeEloLvgT8rwUAydlt28TnKZ9TkcPgdYIyqZvs,4657
33
+ unique_toolkit/embedding/service.py,sha256=2KjYlUKxeh-Je8S1mOPiQ735pqAmdbeztycVNJxcUXA,5039
34
34
  unique_toolkit/embedding/utils.py,sha256=v86lo__bCJbxZBQ3OcLu5SuwT6NbFfWlcq8iyk6BuzQ,279
35
35
  unique_toolkit/evaluators/__init__.py,sha256=3Rfpnowm7MUXHWmeU4UV4s_3Hk-sw3V20oBwQCYlejQ,50
36
36
  unique_toolkit/evaluators/config.py,sha256=_DIXToJ-hGNpDAdWa7Q6GMjAsxiC_DquLF-SS5s9rTE,717
@@ -59,7 +59,7 @@ unique_toolkit/language_model/infos.py,sha256=7huMpiDhGdWyhFBZx9dVLXdSkONSrxHL1F
59
59
  unique_toolkit/language_model/prompt.py,sha256=JSawaLjQg3VR-E2fK8engFyJnNdk21zaO8pPIodzN4Q,3991
60
60
  unique_toolkit/language_model/reference.py,sha256=nkX2VFz-IrUz8yqyc3G5jUMNwrNpxITBrMEKkbqqYoI,8583
61
61
  unique_toolkit/language_model/schemas.py,sha256=p95cAwrYmEBupI8f7JZY17aJTKEHvtqF88hMIzS5r_k,16259
62
- unique_toolkit/language_model/service.py,sha256=zlvC_t9T1wixwcGDPRxl6yYniaKl2725NxWrbW51jUs,11290
62
+ unique_toolkit/language_model/service.py,sha256=N_I3VtK5B0G8s5c6TcBVWM7CcLGqakDhEdHQ_z-Hcok,11676
63
63
  unique_toolkit/language_model/utils.py,sha256=bPQ4l6_YO71w-zaIPanUUmtbXC1_hCvLK0tAFc3VCRc,1902
64
64
  unique_toolkit/protocols/support.py,sha256=V15WEIFKVMyF1QCnR8vIi4GrJy4dfTCB6d6JlqPZ58o,2341
65
65
  unique_toolkit/reference_manager/reference_manager.py,sha256=FNCW4CQSsimS8UG7OTdu4-JNQXUMhPrOfRuKAbK9vvE,2305
@@ -82,7 +82,7 @@ unique_toolkit/tools/utils/execution/execution.py,sha256=vjG2Y6awsGNtlvyQAGCTthQ
82
82
  unique_toolkit/tools/utils/source_handling/schema.py,sha256=pvNhtL2daDLpCVIQpfdn6R35GvKmITVLXjZNLAwpgUE,871
83
83
  unique_toolkit/tools/utils/source_handling/source_formatting.py,sha256=C7uayNbdkNVJdEARA5CENnHtNY1SU6etlaqbgHNyxaQ,9152
84
84
  unique_toolkit/tools/utils/source_handling/tests/test_source_formatting.py,sha256=zu3AJnYH9CMqZPrxKEH3IgI-fM3nlvIBuspJG6W6B18,6978
85
- unique_toolkit-0.8.11.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
86
- unique_toolkit-0.8.11.dist-info/METADATA,sha256=tfIpLbuPa7_CQnJ9BM6ZWxmgvdOhptwhJFAS9z_vaJA,27224
87
- unique_toolkit-0.8.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
88
- unique_toolkit-0.8.11.dist-info/RECORD,,
85
+ unique_toolkit-0.8.12.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
86
+ unique_toolkit-0.8.12.dist-info/METADATA,sha256=EFm6wn8_fM4GsB6o9AypQeB49rtgJ9HX_c6lFk_sm8M,27377
87
+ unique_toolkit-0.8.12.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
88
+ unique_toolkit-0.8.12.dist-info/RECORD,,