unique_toolkit 0.8.26__py3-none-any.whl → 0.8.28__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/app/unique_settings.py +17 -11
- unique_toolkit/language_model/functions.py +1 -1
- unique_toolkit/language_model/service.py +1 -1
- unique_toolkit/tools/mcp/manager.py +3 -3
- unique_toolkit/tools/mcp/models.py +1 -0
- {unique_toolkit-0.8.26.dist-info → unique_toolkit-0.8.28.dist-info}/METADATA +6 -1
- {unique_toolkit-0.8.26.dist-info → unique_toolkit-0.8.28.dist-info}/RECORD +9 -9
- {unique_toolkit-0.8.26.dist-info → unique_toolkit-0.8.28.dist-info}/LICENSE +0 -0
- {unique_toolkit-0.8.26.dist-info → unique_toolkit-0.8.28.dist-info}/WHEEL +0 -0
|
@@ -2,7 +2,7 @@ import os
|
|
|
2
2
|
from logging import getLogger
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import Self, TypeVar
|
|
5
|
-
from urllib.parse import urlparse, urlunparse
|
|
5
|
+
from urllib.parse import ParseResult, urlparse, urlunparse
|
|
6
6
|
|
|
7
7
|
import unique_sdk
|
|
8
8
|
from platformdirs import user_config_dir
|
|
@@ -99,22 +99,28 @@ class UniqueApi(BaseSettings):
|
|
|
99
99
|
)
|
|
100
100
|
)
|
|
101
101
|
|
|
102
|
-
def
|
|
102
|
+
def base_path(self) -> tuple[ParseResult, str]:
|
|
103
103
|
parsed = urlparse(self.base_url)
|
|
104
|
+
base_path = "/public/chat/"
|
|
104
105
|
|
|
105
|
-
path = "/public/chat"
|
|
106
106
|
if parsed.hostname and (
|
|
107
|
-
"qa.unique" in parsed.hostname
|
|
107
|
+
"gateway.qa.unique" in parsed.hostname
|
|
108
|
+
or "gateway.unique" in parsed.hostname
|
|
108
109
|
):
|
|
109
|
-
|
|
110
|
-
return urlunparse(parsed._replace(path=path, query=None, fragment=None))
|
|
110
|
+
base_path = "/public/chat-gen2/"
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
path = "/public/chat/openai-proxy/"
|
|
115
|
-
if parsed.hostname and "qa.unique" in parsed.hostname:
|
|
116
|
-
path = "/public/chat-gen2/openai-proxy/"
|
|
112
|
+
if parsed.hostname and "localhost" in parsed.hostname:
|
|
113
|
+
base_path = "/public/"
|
|
117
114
|
|
|
115
|
+
return parsed, base_path
|
|
116
|
+
|
|
117
|
+
def sdk_url(self) -> str:
|
|
118
|
+
parsed, base_path = self.base_path()
|
|
119
|
+
return urlunparse(parsed._replace(path=base_path, query=None, fragment=None))
|
|
120
|
+
|
|
121
|
+
def openai_proxy_url(self) -> str:
|
|
122
|
+
parsed, base_path = self.base_path()
|
|
123
|
+
path = base_path + "openai-proxy/"
|
|
118
124
|
return urlunparse(parsed._replace(path=path, query=None, fragment=None))
|
|
119
125
|
|
|
120
126
|
|
|
@@ -94,9 +94,9 @@ def complete(
|
|
|
94
94
|
|
|
95
95
|
async def complete_async(
|
|
96
96
|
company_id: str,
|
|
97
|
-
user_id: str,
|
|
98
97
|
messages: LanguageModelMessages | list[ChatCompletionMessageParam],
|
|
99
98
|
model_name: LanguageModelName | str,
|
|
99
|
+
user_id: str | None = None,
|
|
100
100
|
temperature: float = DEFAULT_COMPLETE_TEMPERATURE,
|
|
101
101
|
timeout: int = DEFAULT_COMPLETE_TIMEOUT,
|
|
102
102
|
tools: list[LanguageModelTool | LanguageModelToolDescription] | None = None,
|
|
@@ -277,9 +277,9 @@ class LanguageModelService:
|
|
|
277
277
|
async def complete_async_util(
|
|
278
278
|
cls,
|
|
279
279
|
company_id: str,
|
|
280
|
-
user_id: str,
|
|
281
280
|
messages: LanguageModelMessages,
|
|
282
281
|
model_name: LanguageModelName | str,
|
|
282
|
+
user_id: str | None = None,
|
|
283
283
|
temperature: float = DEFAULT_COMPLETE_TEMPERATURE,
|
|
284
284
|
timeout: int = DEFAULT_COMPLETE_TIMEOUT,
|
|
285
285
|
tools: Optional[list[LanguageModelTool | LanguageModelToolDescription]] = None,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
|
|
3
|
-
from unique_toolkit.tools.config import ToolBuildConfig, ToolIcon, ToolSelectionPolicy
|
|
4
3
|
from unique_toolkit.app.schemas import ChatEvent, McpServer
|
|
5
|
-
from unique_toolkit.tools.
|
|
6
|
-
from unique_toolkit.tools.tool import Tool
|
|
4
|
+
from unique_toolkit.tools.config import ToolBuildConfig, ToolIcon, ToolSelectionPolicy
|
|
7
5
|
from unique_toolkit.tools.mcp.models import MCPToolConfig
|
|
8
6
|
from unique_toolkit.tools.mcp.tool_wrapper import MCPToolWrapper
|
|
7
|
+
from unique_toolkit.tools.schemas import BaseToolConfig
|
|
8
|
+
from unique_toolkit.tools.tool import Tool
|
|
9
9
|
from unique_toolkit.tools.tool_progress_reporter import ToolProgressReporter
|
|
10
10
|
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_toolkit
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.28
|
|
4
4
|
Summary:
|
|
5
5
|
License: Proprietary
|
|
6
6
|
Author: Martin Fadler
|
|
@@ -114,6 +114,11 @@ All notable changes to this project will be documented in this file.
|
|
|
114
114
|
|
|
115
115
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
116
116
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
117
|
+
## [0.8.28] - 2025-08-28
|
|
118
|
+
- Fix paths for `sdk_url` and `openai_proxy` for localhost
|
|
119
|
+
|
|
120
|
+
## [0.8.27] - 2025-08-28
|
|
121
|
+
- Fixed function "create_async" in language_model.functions : "user_id" argument should be optional.
|
|
117
122
|
|
|
118
123
|
## [0.8.26] - 2025-08-27
|
|
119
124
|
- Optimized MCP manager
|
|
@@ -15,7 +15,7 @@ unique_toolkit/app/init_sdk.py,sha256=5_oDoETr6akwYyBCb0ivTdMNu3SVgPSkrXcDS6ELyY
|
|
|
15
15
|
unique_toolkit/app/performance/async_tasks.py,sha256=H0l3OAcosLwNHZ8d2pd-Di4wHIXfclEvagi5kfqLFPA,1941
|
|
16
16
|
unique_toolkit/app/performance/async_wrapper.py,sha256=yVVcRDkcdyfjsxro-N29SBvi-7773wnfDplef6-y8xw,1077
|
|
17
17
|
unique_toolkit/app/schemas.py,sha256=uh7PR-YYXfdTnuO5V_eGrW96eJmP5tJ4jeePyU8tsNI,7888
|
|
18
|
-
unique_toolkit/app/unique_settings.py,sha256=
|
|
18
|
+
unique_toolkit/app/unique_settings.py,sha256=f9Ip1yBhIJqHpuHIo3ihCW2MGyQynBggEKDzlIOIlyg,9976
|
|
19
19
|
unique_toolkit/app/verification.py,sha256=GxFFwcJMy25fCA_Xe89wKW7bgqOu8PAs5y8QpHF0GSc,3861
|
|
20
20
|
unique_toolkit/chat/__init__.py,sha256=LRs2G-JTVuci4lbtHTkVUiNcZcSR6uqqfnAyo7af6nY,619
|
|
21
21
|
unique_toolkit/chat/constants.py,sha256=05kq6zjqUVB2d6_P7s-90nbljpB3ryxwCI-CAz0r2O4,83
|
|
@@ -80,12 +80,12 @@ unique_toolkit/history_manager/utils.py,sha256=iu4LsYOElx8HlZjcx3ZC75I-TmEYBiEP9
|
|
|
80
80
|
unique_toolkit/language_model/__init__.py,sha256=lRQyLlbwHbNFf4-0foBU13UGb09lwEeodbVsfsSgaCk,1971
|
|
81
81
|
unique_toolkit/language_model/builder.py,sha256=4OKfwJfj3TrgO1ezc_ewIue6W7BCQ2ZYQXUckWVPPTA,3369
|
|
82
82
|
unique_toolkit/language_model/constants.py,sha256=B-topqW0r83dkC_25DeQfnPk3n53qzIHUCBS7YJ0-1U,119
|
|
83
|
-
unique_toolkit/language_model/functions.py,sha256=
|
|
83
|
+
unique_toolkit/language_model/functions.py,sha256=4-zOzLsdjcfeTy6alqkYEBl-oVWptz9xLi8C5vdbWEg,16769
|
|
84
84
|
unique_toolkit/language_model/infos.py,sha256=2roY4jqVd5p11Cavc4JLqh8uqpynOKjs2_eb5OJhqkk,48810
|
|
85
85
|
unique_toolkit/language_model/prompt.py,sha256=JSawaLjQg3VR-E2fK8engFyJnNdk21zaO8pPIodzN4Q,3991
|
|
86
86
|
unique_toolkit/language_model/reference.py,sha256=nkX2VFz-IrUz8yqyc3G5jUMNwrNpxITBrMEKkbqqYoI,8583
|
|
87
87
|
unique_toolkit/language_model/schemas.py,sha256=EOgy-p1GRcS46Sq0qEsN8MfOMl-KCcvEd9aCmqm9d08,16497
|
|
88
|
-
unique_toolkit/language_model/service.py,sha256=
|
|
88
|
+
unique_toolkit/language_model/service.py,sha256=DYvqYlHiI7Bwq65RMGBJ995Wq_zUzRzPPnrpN2843zc,11776
|
|
89
89
|
unique_toolkit/language_model/utils.py,sha256=bPQ4l6_YO71w-zaIPanUUmtbXC1_hCvLK0tAFc3VCRc,1902
|
|
90
90
|
unique_toolkit/postprocessor/postprocessor_manager.py,sha256=yf34VMwZfwGjmDbVeMJ5JN3ET4N68V39EF9kiWVUa_Y,4213
|
|
91
91
|
unique_toolkit/protocols/support.py,sha256=V15WEIFKVMyF1QCnR8vIi4GrJy4dfTCB6d6JlqPZ58o,2341
|
|
@@ -102,8 +102,8 @@ unique_toolkit/thinking_manager/thinking_manager.py,sha256=AJfmrTXTr-DxBnJ2_zYYp
|
|
|
102
102
|
unique_toolkit/tools/config.py,sha256=E4lFQA4gCi3_j4hcdnd5YUHhbaWTyIGWrgD18QardQw,3796
|
|
103
103
|
unique_toolkit/tools/factory.py,sha256=w3uNHuYBIJ330Xi8PTdAkr8G3OMbQH2cBgvk5UT16oE,1253
|
|
104
104
|
unique_toolkit/tools/mcp/__init__.py,sha256=RLF_p-LDRC7GhiB3fdCi4u3bh6V9PY_w26fg61BLyco,122
|
|
105
|
-
unique_toolkit/tools/mcp/manager.py,sha256=
|
|
106
|
-
unique_toolkit/tools/mcp/models.py,sha256=
|
|
105
|
+
unique_toolkit/tools/mcp/manager.py,sha256=lQcCsfCMqW2j6uCwNmgYoQDwjm8YosvCh4-apw3KZKs,2683
|
|
106
|
+
unique_toolkit/tools/mcp/models.py,sha256=f9OXcGadBx2tDlhYFu-7oEkl5p9ppoDKTqZbca_NblQ,714
|
|
107
107
|
unique_toolkit/tools/mcp/tool_wrapper.py,sha256=w7Fbo4FSMYvtgSq7Sqt1dmAPvqHjoBQS-TwnSp0p6j0,9927
|
|
108
108
|
unique_toolkit/tools/schemas.py,sha256=rArQccbfIv7CWcozClAZ-BVlOwAsjpgL8KUab_WeO3k,4817
|
|
109
109
|
unique_toolkit/tools/test/test_mcp_manager.py,sha256=jnVKxqJyeJBDb6LvI8bM9dd8XPxrbXV0VCOHMhCdlug,14398
|
|
@@ -115,7 +115,7 @@ unique_toolkit/tools/utils/execution/execution.py,sha256=vjG2Y6awsGNtlvyQAGCTthQ
|
|
|
115
115
|
unique_toolkit/tools/utils/source_handling/schema.py,sha256=vzAyf6ZWNexjMO0OrnB8y2glGkvAilmGGQXd6zcDaKw,870
|
|
116
116
|
unique_toolkit/tools/utils/source_handling/source_formatting.py,sha256=C7uayNbdkNVJdEARA5CENnHtNY1SU6etlaqbgHNyxaQ,9152
|
|
117
117
|
unique_toolkit/tools/utils/source_handling/tests/test_source_formatting.py,sha256=oM5ZxEgzROrnX1229KViCAFjRxl9wCTzWZoinYSHleM,6979
|
|
118
|
-
unique_toolkit-0.8.
|
|
119
|
-
unique_toolkit-0.8.
|
|
120
|
-
unique_toolkit-0.8.
|
|
121
|
-
unique_toolkit-0.8.
|
|
118
|
+
unique_toolkit-0.8.28.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
|
|
119
|
+
unique_toolkit-0.8.28.dist-info/METADATA,sha256=hMjsYHTpU3nvOolbSR6CO-8uMdkYZyuap3y2cue-0ck,29161
|
|
120
|
+
unique_toolkit-0.8.28.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
121
|
+
unique_toolkit-0.8.28.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|