unique_toolkit 1.18.1__py3-none-any.whl → 1.19.0__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.

Potentially problematic release.


This version of unique_toolkit might be problematic. Click here for more details.

@@ -25,7 +25,10 @@ else:
25
25
 
26
26
 
27
27
  def get_langchain_client(
28
- unique_settings: UniqueSettings | None = None, model: str = "AZURE_GPT_4o_2024_0806"
28
+ *,
29
+ unique_settings: UniqueSettings | None = None,
30
+ model: str = "AZURE_GPT_4o_2024_0806",
31
+ additional_headers: dict[str, str] | None = None,
29
32
  ) -> ChatOpenAI:
30
33
  """Get a Langchain ChatOpenAI client instance.
31
34
 
@@ -41,9 +44,13 @@ def get_langchain_client(
41
44
  if unique_settings is None:
42
45
  unique_settings = UniqueSettings.from_env_auto()
43
46
 
47
+ default_headers = get_default_headers(unique_settings.app, unique_settings.auth)
48
+ if additional_headers is not None:
49
+ default_headers.update(additional_headers)
50
+
44
51
  return ChatOpenAI(
45
52
  base_url=unique_settings.api.openai_proxy_url(),
46
- default_headers=get_default_headers(unique_settings.app, unique_settings.auth),
53
+ default_headers=default_headers,
47
54
  model=model,
48
55
  api_key=unique_settings.app.key,
49
56
  )
@@ -22,7 +22,11 @@ else:
22
22
  raise OpenAINotInstalledError()
23
23
 
24
24
 
25
- def get_openai_client(unique_settings: UniqueSettings | None = None) -> OpenAI:
25
+ def get_openai_client(
26
+ *,
27
+ unique_settings: UniqueSettings | None = None,
28
+ additional_headers: dict[str, str] | None = None,
29
+ ) -> OpenAI:
26
30
  """Get an OpenAI client instance.
27
31
 
28
32
  Args:
@@ -38,6 +42,8 @@ def get_openai_client(unique_settings: UniqueSettings | None = None) -> OpenAI:
38
42
  unique_settings = UniqueSettings.from_env_auto()
39
43
 
40
44
  default_headers = get_default_headers(unique_settings.app, unique_settings.auth)
45
+ if additional_headers is not None:
46
+ default_headers.update(additional_headers)
41
47
 
42
48
  return OpenAI(
43
49
  api_key="dummy_key",
@@ -47,7 +53,9 @@ def get_openai_client(unique_settings: UniqueSettings | None = None) -> OpenAI:
47
53
 
48
54
 
49
55
  def get_async_openai_client(
56
+ *,
50
57
  unique_settings: UniqueSettings | None = None,
58
+ additional_headers: dict[str, str] | None = None,
51
59
  ) -> AsyncOpenAI:
52
60
  """Get an async OpenAI client instance.
53
61
 
@@ -65,6 +73,9 @@ def get_async_openai_client(
65
73
 
66
74
  default_headers = get_default_headers(unique_settings.app, unique_settings.auth)
67
75
 
76
+ if additional_headers is not None:
77
+ default_headers.update(additional_headers)
78
+
68
79
  return AsyncOpenAI(
69
80
  api_key="dummy_key",
70
81
  base_url=unique_settings.api.openai_proxy_url(),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 1.18.1
3
+ Version: 1.19.0
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Cedric Klinkert
@@ -118,6 +118,10 @@ All notable changes to this project will be documented in this file.
118
118
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
119
119
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
120
120
 
121
+
122
+ ## [1.19.0] - 2025-10-28
123
+ - Enable additional headers on openai and langchain client
124
+
121
125
  ## [1.18.1] - 2025-10-28
122
126
  - Fix bug where sub agent references were not properly displayed in the main agent response when the sub agent response was hidden.
123
127
 
@@ -136,10 +136,10 @@ unique_toolkit/embedding/schemas.py,sha256=1GvKCaSk4jixzVQ2PKq8yDqwGEVY_hWclYtoA
136
136
  unique_toolkit/embedding/service.py,sha256=XViQCbjG9yznIFhWjgBkla_4s7zM2lO12Cqob1FU63k,5283
137
137
  unique_toolkit/embedding/utils.py,sha256=v86lo__bCJbxZBQ3OcLu5SuwT6NbFfWlcq8iyk6BuzQ,279
138
138
  unique_toolkit/framework_utilities/__init__.py,sha256=fvAn9y4MRL1JgoO14ufQtLVRPRHn4jP07XRqt-TItCA,68
139
- unique_toolkit/framework_utilities/langchain/client.py,sha256=RwVZTH5SZzwwLjP5bZJv419EQyQyVUFJNZifERcBCxs,1870
139
+ unique_toolkit/framework_utilities/langchain/client.py,sha256=NxOLnzVMJds2JFMm5ZqTVTz1WMntrmWsLPU4-kwlzqE,2065
140
140
  unique_toolkit/framework_utilities/langchain/history.py,sha256=R9RuCeSFNaUO3OZ0G_LmIC4gmOCIANcl91MfyWLnZ1c,650
141
141
  unique_toolkit/framework_utilities/openai/__init__.py,sha256=CrHYoC7lv2pBscitLerAFweqy5jh1R671LA_jZQ4lWo,232
142
- unique_toolkit/framework_utilities/openai/client.py,sha256=ct1cqPcIK1wPl11G9sJV39ZnLJwKr2kDUDSra0FjvtM,2007
142
+ unique_toolkit/framework_utilities/openai/client.py,sha256=XtueQu_4tiar7lvu0yOOgU5QSE_cIXGiiHStesW4iXs,2317
143
143
  unique_toolkit/framework_utilities/openai/message_builder.py,sha256=RT1pZjxH42TFZlAxQ5zlqdKPvHKVTjc5t3JDUy58I7Q,6887
144
144
  unique_toolkit/framework_utilities/utils.py,sha256=JK7g2yMfEx3eMprug26769xqNpS5WJcizf8n2zWMBng,789
145
145
  unique_toolkit/language_model/__init__.py,sha256=lRQyLlbwHbNFf4-0foBU13UGb09lwEeodbVsfsSgaCk,1971
@@ -165,7 +165,7 @@ unique_toolkit/short_term_memory/service.py,sha256=5PeVBu1ZCAfyDb2HLVvlmqSbyzBBu
165
165
  unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
166
166
  unique_toolkit/smart_rules/compile.py,sha256=Ozhh70qCn2yOzRWr9d8WmJeTo7AQurwd3tStgBMPFLA,1246
167
167
  unique_toolkit/test_utilities/events.py,sha256=_mwV2bs5iLjxS1ynDCjaIq-gjjKhXYCK-iy3dRfvO3g,6410
168
- unique_toolkit-1.18.1.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
169
- unique_toolkit-1.18.1.dist-info/METADATA,sha256=JM7lTRErEGHbrIrH_VsVvp4NC2snqXYAzq89D6qOrF8,38686
170
- unique_toolkit-1.18.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
171
- unique_toolkit-1.18.1.dist-info/RECORD,,
168
+ unique_toolkit-1.19.0.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
169
+ unique_toolkit-1.19.0.dist-info/METADATA,sha256=vFbZDvCyQYheZ7FvASbBZh5M7PqjI4GoRVqDbGkcAKY,38772
170
+ unique_toolkit-1.19.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
171
+ unique_toolkit-1.19.0.dist-info/RECORD,,