unique_orchestrator 1.4.3__py3-none-any.whl → 1.5.1__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_orchestrator might be problematic. Click here for more details.
- unique_orchestrator/config.py +6 -0
- unique_orchestrator/unique_ai_builder.py +32 -3
- {unique_orchestrator-1.4.3.dist-info → unique_orchestrator-1.5.1.dist-info}/METADATA +10 -1
- {unique_orchestrator-1.4.3.dist-info → unique_orchestrator-1.5.1.dist-info}/RECORD +6 -6
- {unique_orchestrator-1.4.3.dist-info → unique_orchestrator-1.5.1.dist-info}/LICENSE +0 -0
- {unique_orchestrator-1.4.3.dist-info → unique_orchestrator-1.5.1.dist-info}/WHEEL +0 -0
unique_orchestrator/config.py
CHANGED
|
@@ -29,6 +29,9 @@ from unique_toolkit.agentic.tools.a2a import (
|
|
|
29
29
|
)
|
|
30
30
|
from unique_toolkit.agentic.tools.a2a.evaluation import SubAgentEvaluationServiceConfig
|
|
31
31
|
from unique_toolkit.agentic.tools.config import get_configuration_dict
|
|
32
|
+
from unique_toolkit.agentic.tools.openai_builtin.manager import (
|
|
33
|
+
OpenAICodeInterpreterConfig,
|
|
34
|
+
)
|
|
32
35
|
from unique_toolkit.agentic.tools.tool import ToolBuildConfig
|
|
33
36
|
from unique_toolkit.language_model.default_language_model import DEFAULT_GPT_4o
|
|
34
37
|
from unique_web_search.config import WebSearchConfig
|
|
@@ -255,6 +258,9 @@ class ResponsesApiConfig(BaseModel):
|
|
|
255
258
|
default="OPENAI_API_KEY",
|
|
256
259
|
description="[TEMPORARY] The environment variable that contains the API key for the direct Azure client.",
|
|
257
260
|
)
|
|
261
|
+
code_interpreter: (
|
|
262
|
+
Annotated[OpenAICodeInterpreterConfig, Field(title="Active")] | DeactivatedNone
|
|
263
|
+
) = Field(default=None, description="Config for openai code interpreter")
|
|
258
264
|
|
|
259
265
|
generated_files_scope_id: str = Field(
|
|
260
266
|
default="<SCOPE_ID_PLACEHOLDER>",
|
|
@@ -52,6 +52,7 @@ from unique_toolkit.agentic.tools.a2a import (
|
|
|
52
52
|
)
|
|
53
53
|
from unique_toolkit.agentic.tools.config import ToolBuildConfig
|
|
54
54
|
from unique_toolkit.agentic.tools.mcp.manager import MCPManager
|
|
55
|
+
from unique_toolkit.agentic.tools.openai_builtin.base import OpenAIBuiltInToolName
|
|
55
56
|
from unique_toolkit.agentic.tools.tool_manager import (
|
|
56
57
|
OpenAIBuiltInToolManager,
|
|
57
58
|
ResponsesApiToolManager,
|
|
@@ -257,6 +258,25 @@ async def _build_responses(
|
|
|
257
258
|
debug_info_manager: DebugInfoManager,
|
|
258
259
|
) -> UniqueAIResponsesApi:
|
|
259
260
|
client = _get_openai_client_from_env(config, use_v1=True)
|
|
261
|
+
code_interpreter_config = (
|
|
262
|
+
config.agent.experimental.responses_api_config.code_interpreter
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
tool_names = [tool.name for tool in config.space.tools]
|
|
266
|
+
if (
|
|
267
|
+
code_interpreter_config is not None
|
|
268
|
+
and OpenAIBuiltInToolName.CODE_INTERPRETER not in tool_names
|
|
269
|
+
):
|
|
270
|
+
logger.info("Automatically adding code interpreter to the tools")
|
|
271
|
+
config = config.model_copy(deep=True)
|
|
272
|
+
config.space.tools.append(
|
|
273
|
+
ToolBuildConfig(
|
|
274
|
+
name=OpenAIBuiltInToolName.CODE_INTERPRETER,
|
|
275
|
+
configuration=code_interpreter_config,
|
|
276
|
+
)
|
|
277
|
+
)
|
|
278
|
+
common_components.tool_manager_config.tools = config.space.tools
|
|
279
|
+
|
|
260
280
|
builtin_tool_manager = OpenAIBuiltInToolManager(
|
|
261
281
|
uploaded_files=common_components.uploaded_documents,
|
|
262
282
|
chat_id=event.payload.chat_id,
|
|
@@ -355,17 +375,24 @@ def _build_completions(
|
|
|
355
375
|
common_components: _CommonComponents,
|
|
356
376
|
debug_info_manager: DebugInfoManager,
|
|
357
377
|
) -> UniqueAI:
|
|
358
|
-
|
|
378
|
+
# Uploaded content behavior is always to force uploaded search tool:
|
|
379
|
+
# 1. Add it to forced tools if there are tool choices.
|
|
380
|
+
# 2. Simply force it if there are no tool choices.
|
|
381
|
+
# 3. Not available if not uploaded documents.
|
|
382
|
+
UPLOADED_DOCUMENTS = len(common_components.uploaded_documents) > 0
|
|
383
|
+
TOOL_CHOICES = len(event.payload.tool_choices) > 0
|
|
384
|
+
if UPLOADED_DOCUMENTS:
|
|
359
385
|
logger.info(
|
|
360
386
|
f"Adding UploadedSearchTool with {len(common_components.uploaded_documents)} documents"
|
|
361
387
|
)
|
|
362
|
-
|
|
388
|
+
common_components.tool_manager_config.tools.append(
|
|
363
389
|
ToolBuildConfig(
|
|
364
390
|
name=UploadedSearchTool.name,
|
|
365
391
|
display_name=UploadedSearchTool.name,
|
|
366
392
|
configuration=UploadedSearchConfig(),
|
|
367
|
-
)
|
|
393
|
+
)
|
|
368
394
|
)
|
|
395
|
+
if TOOL_CHOICES and UPLOADED_DOCUMENTS:
|
|
369
396
|
event.payload.tool_choices.append(str(UploadedSearchTool.name))
|
|
370
397
|
|
|
371
398
|
tool_manager = ToolManager(
|
|
@@ -376,6 +403,8 @@ def _build_completions(
|
|
|
376
403
|
mcp_manager=common_components.mcp_manager,
|
|
377
404
|
a2a_manager=common_components.a2a_manager,
|
|
378
405
|
)
|
|
406
|
+
if not TOOL_CHOICES and UPLOADED_DOCUMENTS:
|
|
407
|
+
tool_manager.add_forced_tool(UploadedSearchTool.name)
|
|
379
408
|
|
|
380
409
|
postprocessor_manager = PostprocessorManager(
|
|
381
410
|
logger=logger,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_orchestrator
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.1
|
|
4
4
|
Summary:
|
|
5
5
|
License: Proprietary
|
|
6
6
|
Author: Andreas Hauri
|
|
@@ -33,6 +33,15 @@ All notable changes to this project will be documented in this file.
|
|
|
33
33
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
34
34
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
35
35
|
|
|
36
|
+
## [1.5.1] - 2025-10-17
|
|
37
|
+
- revert behavior of unique ai upload and chat to
|
|
38
|
+
1. Add upload and chat tool to forced tools if there are tool choices
|
|
39
|
+
2. Simply force it if there are no tool choices.
|
|
40
|
+
3. Tool not available when no uploaded documents
|
|
41
|
+
|
|
42
|
+
## [1.5.0] - 2025-10-16
|
|
43
|
+
- Make code interpreter configurable through spaces 2.0.
|
|
44
|
+
|
|
36
45
|
## [1.4.3] - 2025-10-16
|
|
37
46
|
- Fix issue with openai base url
|
|
38
47
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
unique_orchestrator/config.py,sha256=
|
|
1
|
+
unique_orchestrator/config.py,sha256=IwYUrPUzyanKA8sQpS5J-u1WzsBnqQlKRv-vUM_2uRU,11361
|
|
2
2
|
unique_orchestrator/prompts/generic_reference_prompt.jinja2,sha256=fYPaiE-N1gSoOqu85OeEBa_ttAim8grOhHuOHJjSHNU,2663
|
|
3
3
|
unique_orchestrator/prompts/system_prompt.jinja2,sha256=YXFdx3PG2p4TKfjEpz7guIw2GaKoY-4zRMEzXaKhHXE,7213
|
|
4
4
|
unique_orchestrator/prompts/user_message_prompt.jinja2,sha256=BQokpBh3H2J-rFk8i-PRph3jy4T1gAJPPb1mxxRWNuM,878
|
|
5
5
|
unique_orchestrator/tests/test_unique_ai_reference_order.py,sha256=8mZeVP1k8neH4qrFW3oa3zwIdaq2c7R1VvurC7kjBU8,4445
|
|
6
6
|
unique_orchestrator/unique_ai.py,sha256=PqeDaXtr2krqQ_xqhr1Kb9j0A3rPaCT0BqIvnJlFVbU,18845
|
|
7
|
-
unique_orchestrator/unique_ai_builder.py,sha256=
|
|
8
|
-
unique_orchestrator-1.
|
|
9
|
-
unique_orchestrator-1.
|
|
10
|
-
unique_orchestrator-1.
|
|
11
|
-
unique_orchestrator-1.
|
|
7
|
+
unique_orchestrator/unique_ai_builder.py,sha256=SFN6gYBl6mIiQq3G2rVvlzlnOqImZtpy49SeYSb1Pgk,17491
|
|
8
|
+
unique_orchestrator-1.5.1.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
|
|
9
|
+
unique_orchestrator-1.5.1.dist-info/METADATA,sha256=wkRfcqHp8kE4M2WUifMvil01tyE2Oseit7Nc0rjGG5A,3162
|
|
10
|
+
unique_orchestrator-1.5.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
11
|
+
unique_orchestrator-1.5.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|