unique_orchestrator 1.5.1__tar.gz → 1.6.0__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.
- {unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/CHANGELOG.md +6 -0
- {unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/PKG-INFO +8 -2
- {unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/pyproject.toml +2 -2
- {unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/unique_orchestrator/config.py +5 -0
- {unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/unique_orchestrator/unique_ai.py +23 -4
- {unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/unique_orchestrator/unique_ai_builder.py +9 -0
- {unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/LICENSE +0 -0
- {unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/README.md +0 -0
- {unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/unique_orchestrator/prompts/generic_reference_prompt.jinja2 +0 -0
- {unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/unique_orchestrator/prompts/system_prompt.jinja2 +0 -0
- {unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/unique_orchestrator/prompts/user_message_prompt.jinja2 +0 -0
- {unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/unique_orchestrator/tests/test_unique_ai_reference_order.py +0 -0
|
@@ -5,6 +5,12 @@ 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
|
+
## [1.6.0] - 2025-10-27
|
|
9
|
+
- Add temporary config option `sleep_time_before_update` to avoid rendering issues with sub agent responses`
|
|
10
|
+
|
|
11
|
+
## [1.5.2] - 2025-10-23
|
|
12
|
+
- Run evaluation and post processing in parallel
|
|
13
|
+
|
|
8
14
|
## [1.5.1] - 2025-10-17
|
|
9
15
|
- revert behavior of unique ai upload and chat to
|
|
10
16
|
1. Add upload and chat tool to forced tools if there are tool choices
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_orchestrator
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0
|
|
4
4
|
Summary:
|
|
5
5
|
License: Proprietary
|
|
6
6
|
Author: Andreas Hauri
|
|
@@ -19,7 +19,7 @@ Requires-Dist: unique-follow-up-questions (>=1.1.2,<2.0.0)
|
|
|
19
19
|
Requires-Dist: unique-internal-search (>=1.0.1,<2.0.0)
|
|
20
20
|
Requires-Dist: unique-sdk (>=0.10.24,<0.11.0)
|
|
21
21
|
Requires-Dist: unique-stock-ticker (>=1.0.2,<2.0.0)
|
|
22
|
-
Requires-Dist: unique-toolkit (>=1.
|
|
22
|
+
Requires-Dist: unique-toolkit (>=1.18.0,<2.0.0)
|
|
23
23
|
Requires-Dist: unique-web-search (>=1.3.1,<2.0.0)
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
25
|
|
|
@@ -33,6 +33,12 @@ 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.6.0] - 2025-10-27
|
|
37
|
+
- Add temporary config option `sleep_time_before_update` to avoid rendering issues with sub agent responses`
|
|
38
|
+
|
|
39
|
+
## [1.5.2] - 2025-10-23
|
|
40
|
+
- Run evaluation and post processing in parallel
|
|
41
|
+
|
|
36
42
|
## [1.5.1] - 2025-10-17
|
|
37
43
|
- revert behavior of unique ai upload and chat to
|
|
38
44
|
1. Add upload and chat tool to forced tools if there are tool choices
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "unique_orchestrator"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.6.0"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = ["Andreas Hauri <andreas.hauri@unique.ai>"]
|
|
6
6
|
readme = ["README.md", "CHANGELOG.md"]
|
|
@@ -15,7 +15,7 @@ python-dotenv = "^1.0.1"
|
|
|
15
15
|
pytest = "^8.4.1"
|
|
16
16
|
unique-sdk = "^0.10.24"
|
|
17
17
|
|
|
18
|
-
unique-toolkit = "^1.
|
|
18
|
+
unique-toolkit = "^1.18.0"
|
|
19
19
|
unique-stock-ticker = "^1.0.2"
|
|
20
20
|
unique-follow-up-questions = "^1.1.2"
|
|
21
21
|
unique-internal-search = "^1.0.1"
|
|
@@ -230,6 +230,11 @@ class SubAgentsConfig(BaseModel):
|
|
|
230
230
|
| DeactivatedNone
|
|
231
231
|
) = SubAgentEvaluationServiceConfig()
|
|
232
232
|
|
|
233
|
+
sleep_time_before_update: float = Field(
|
|
234
|
+
default=0.5,
|
|
235
|
+
description="Time to sleep before updating the main agent message to display the sub agent responses. Temporary fix to avoid rendering issues.",
|
|
236
|
+
)
|
|
237
|
+
|
|
233
238
|
|
|
234
239
|
class ResponsesApiConfig(BaseModel):
|
|
235
240
|
model_config = get_configuration_dict(frozen=True)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import asyncio
|
|
1
2
|
from datetime import datetime
|
|
2
3
|
from logging import Logger
|
|
3
4
|
|
|
@@ -14,6 +15,7 @@ from unique_toolkit.agentic.reference_manager.reference_manager import Reference
|
|
|
14
15
|
from unique_toolkit.agentic.thinking_manager.thinking_manager import ThinkingManager
|
|
15
16
|
from unique_toolkit.agentic.tools.tool_manager import (
|
|
16
17
|
ResponsesApiToolManager,
|
|
18
|
+
SafeTaskExecutor,
|
|
17
19
|
ToolManager,
|
|
18
20
|
)
|
|
19
21
|
from unique_toolkit.app.schemas import ChatEvent, McpServer
|
|
@@ -338,14 +340,31 @@ class UniqueAI:
|
|
|
338
340
|
self, loop_response: LanguageModelStreamResponse
|
|
339
341
|
) -> bool:
|
|
340
342
|
"""Handle the case where no tool calls are returned."""
|
|
343
|
+
task_executor = SafeTaskExecutor(
|
|
344
|
+
logger=self._logger,
|
|
345
|
+
)
|
|
346
|
+
|
|
341
347
|
selected_evaluation_names = self._tool_manager.get_evaluation_check_list()
|
|
342
|
-
evaluation_results =
|
|
343
|
-
|
|
348
|
+
evaluation_results = task_executor.execute_async(
|
|
349
|
+
self._evaluation_manager.run_evaluations,
|
|
350
|
+
selected_evaluation_names,
|
|
351
|
+
loop_response,
|
|
352
|
+
self._latest_assistant_id,
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
postprocessor_result = task_executor.execute_async(
|
|
356
|
+
self._postprocessor_manager.run_postprocessors,
|
|
357
|
+
loop_response.model_copy(deep=True),
|
|
344
358
|
)
|
|
345
359
|
|
|
346
|
-
await
|
|
360
|
+
_, evaluation_results = await asyncio.gather(
|
|
361
|
+
postprocessor_result,
|
|
362
|
+
evaluation_results,
|
|
363
|
+
)
|
|
347
364
|
|
|
348
|
-
if not all(
|
|
365
|
+
if evaluation_results.success and not all(
|
|
366
|
+
result.is_positive for result in evaluation_results.unpack()
|
|
367
|
+
):
|
|
349
368
|
self._logger.warning(
|
|
350
369
|
"we should add here the retry counter add an instruction and retry the loop for now we just exit the loop"
|
|
351
370
|
) # TODO: add retry counter and instruction
|
{unique_orchestrator-1.5.1 → unique_orchestrator-1.6.0}/unique_orchestrator/unique_ai_builder.py
RENAMED
|
@@ -50,6 +50,9 @@ from unique_toolkit.agentic.tools.a2a import (
|
|
|
50
50
|
SubAgentEvaluationService,
|
|
51
51
|
SubAgentResponsesPostprocessor,
|
|
52
52
|
)
|
|
53
|
+
from unique_toolkit.agentic.tools.a2a.postprocessing.postprocessor import (
|
|
54
|
+
SubAgentResponsesPostprocessorConfig,
|
|
55
|
+
)
|
|
53
56
|
from unique_toolkit.agentic.tools.config import ToolBuildConfig
|
|
54
57
|
from unique_toolkit.agentic.tools.mcp.manager import MCPManager
|
|
55
58
|
from unique_toolkit.agentic.tools.openai_builtin.base import OpenAIBuiltInToolName
|
|
@@ -342,6 +345,7 @@ async def _build_responses(
|
|
|
342
345
|
user_id=event.user_id,
|
|
343
346
|
company_id=event.company_id,
|
|
344
347
|
chat_id=event.payload.chat_id,
|
|
348
|
+
sleep_time_before_update=config.agent.experimental.sub_agents_config.sleep_time_before_update,
|
|
345
349
|
)
|
|
346
350
|
_add_sub_agents_evaluation(
|
|
347
351
|
evaluation_manager=common_components.evaluation_manager,
|
|
@@ -419,6 +423,7 @@ def _build_completions(
|
|
|
419
423
|
user_id=event.user_id,
|
|
420
424
|
company_id=event.company_id,
|
|
421
425
|
chat_id=event.payload.chat_id,
|
|
426
|
+
sleep_time_before_update=config.agent.experimental.sub_agents_config.sleep_time_before_update,
|
|
422
427
|
)
|
|
423
428
|
_add_sub_agents_evaluation(
|
|
424
429
|
evaluation_manager=common_components.evaluation_manager,
|
|
@@ -451,6 +456,7 @@ def _add_sub_agents_postprocessor(
|
|
|
451
456
|
user_id: str,
|
|
452
457
|
company_id: str,
|
|
453
458
|
chat_id: str,
|
|
459
|
+
sleep_time_before_update: float,
|
|
454
460
|
) -> None:
|
|
455
461
|
sub_agents = tool_manager.sub_agents
|
|
456
462
|
if len(sub_agents) > 0:
|
|
@@ -458,6 +464,9 @@ def _add_sub_agents_postprocessor(
|
|
|
458
464
|
user_id=user_id,
|
|
459
465
|
main_agent_chat_id=chat_id,
|
|
460
466
|
company_id=company_id,
|
|
467
|
+
config=SubAgentResponsesPostprocessorConfig(
|
|
468
|
+
sleep_time_before_update=sleep_time_before_update,
|
|
469
|
+
),
|
|
461
470
|
)
|
|
462
471
|
postprocessor_manager.add_postprocessor(sub_agent_responses_postprocessor)
|
|
463
472
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|