unique_deep_research 2026.28.0.dev4__tar.gz → 2026.28.0.dev5__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_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/PKG-INFO +2 -2
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/pyproject.toml +2 -2
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/service.py +31 -17
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/README.md +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/__init__.py +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/config.py +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/markdown_utils.py +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/templates/clarifying_agent.j2 +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/templates/openai/oai_research_system_message.j2 +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/templates/report_cleanup_prompt.j2 +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/templates/research_instructions_agent.j2 +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/templates/unique/compress_research_system.j2 +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/templates/unique/lead_agent_system.j2 +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/templates/unique/report_writer_system_open_deep_research.j2 +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/templates/unique/research_agent_system.j2 +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/unique_custom/__init__.py +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/unique_custom/agents.py +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/unique_custom/citation.py +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/unique_custom/state.py +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/unique_custom/tools.py +0 -0
- {unique_deep_research-2026.28.0.dev4 → unique_deep_research-2026.28.0.dev5}/unique_deep_research/unique_custom/utils.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: unique-deep-research
|
|
3
|
-
Version: 2026.28.0.
|
|
3
|
+
Version: 2026.28.0.dev5
|
|
4
4
|
Summary: Deep Research Tool for complex research tasks
|
|
5
5
|
Author: Martin Fadler, Sadique Sheik, Fabian Schläpfer, Pascal Hauri
|
|
6
6
|
Author-email: Martin Fadler <martin.fadler@unique.ch>, Sadique Sheik <sadique@unique.ch>, Fabian Schläpfer <fabian@unique.ch>, Pascal Hauri <pascal@unique.ch>
|
|
7
7
|
License: Proprietary
|
|
8
8
|
Requires-Dist: pydantic>=2.8.2,<3
|
|
9
9
|
Requires-Dist: typing-extensions>=4.9.0,<5
|
|
10
|
-
Requires-Dist: unique-toolkit>=2026.28.0.
|
|
10
|
+
Requires-Dist: unique-toolkit>=2026.28.0.dev18,<2026.28.0rc0
|
|
11
11
|
Requires-Dist: jinja2>=3.1.2,<4
|
|
12
12
|
Requires-Dist: openai>=1.99.0,<3
|
|
13
13
|
Requires-Dist: langgraph>=1.0.0,<2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "unique_deep_research"
|
|
3
|
-
version = "2026.28.0.
|
|
3
|
+
version = "2026.28.0.dev5"
|
|
4
4
|
description = "Deep Research Tool for complex research tasks"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { text = "Proprietary" }
|
|
@@ -14,7 +14,7 @@ requires-python = ">=3.12,<4"
|
|
|
14
14
|
dependencies = [
|
|
15
15
|
"pydantic>=2.8.2,<3",
|
|
16
16
|
"typing-extensions>=4.9.0,<5",
|
|
17
|
-
"unique-toolkit>=2026.28.0.
|
|
17
|
+
"unique-toolkit>=2026.28.0.dev18,<2026.28.0rc0",
|
|
18
18
|
"jinja2>=3.1.2,<4",
|
|
19
19
|
"openai>=1.99.0,<3",
|
|
20
20
|
"langgraph>=1.0.0,<2",
|
|
@@ -28,6 +28,7 @@ from unique_toolkit.agentic.tools.agent_chunks_hanlder import AgentChunksHandler
|
|
|
28
28
|
from unique_toolkit.agentic.tools.factory import ToolFactory
|
|
29
29
|
from unique_toolkit.agentic.tools.schemas import ToolCallResponse
|
|
30
30
|
from unique_toolkit.agentic.tools.tool import Tool
|
|
31
|
+
from unique_toolkit.agentic.tools.tool_progress_reporter import ToolProgressReporter
|
|
31
32
|
from unique_toolkit.app.schemas import ChatEvent
|
|
32
33
|
from unique_toolkit.chat.cancellation import CancellationEvent
|
|
33
34
|
from unique_toolkit.chat.schemas import (
|
|
@@ -38,10 +39,11 @@ from unique_toolkit.chat.schemas import (
|
|
|
38
39
|
MessageLogStatus,
|
|
39
40
|
MessageLogUncitedReferences,
|
|
40
41
|
)
|
|
41
|
-
from unique_toolkit.chat.service import LanguageModelToolDescription
|
|
42
|
+
from unique_toolkit.chat.service import ChatService, LanguageModelToolDescription
|
|
42
43
|
from unique_toolkit.content.schemas import ContentReference
|
|
43
44
|
from unique_toolkit.content.service import ContentService
|
|
44
45
|
from unique_toolkit.framework_utilities.openai.client import get_async_openai_client
|
|
46
|
+
from unique_toolkit.language_model import LanguageModelService
|
|
45
47
|
from unique_toolkit.language_model.schemas import (
|
|
46
48
|
LanguageModelFunction,
|
|
47
49
|
LanguageModelMessage,
|
|
@@ -107,9 +109,21 @@ class DeepResearchTool(Tool[DeepResearchToolConfig]):
|
|
|
107
109
|
self,
|
|
108
110
|
configuration: DeepResearchToolConfig,
|
|
109
111
|
event: ChatEvent,
|
|
110
|
-
tool_progress_reporter,
|
|
112
|
+
tool_progress_reporter: ToolProgressReporter | None = None,
|
|
113
|
+
*,
|
|
114
|
+
chat_service: ChatService | None = None,
|
|
115
|
+
language_model_service: LanguageModelService | None = None,
|
|
111
116
|
):
|
|
112
|
-
|
|
117
|
+
if chat_service is not None and language_model_service is not None:
|
|
118
|
+
super().__init__(
|
|
119
|
+
configuration,
|
|
120
|
+
event,
|
|
121
|
+
tool_progress_reporter,
|
|
122
|
+
chat_service=chat_service,
|
|
123
|
+
language_model_service=language_model_service,
|
|
124
|
+
)
|
|
125
|
+
else:
|
|
126
|
+
super().__init__(configuration, event, tool_progress_reporter)
|
|
113
127
|
self.chat_id = event.payload.chat_id
|
|
114
128
|
self.company_id = event.company_id
|
|
115
129
|
self.user_id = event.user_id
|
|
@@ -290,7 +304,7 @@ class DeepResearchTool(Tool[DeepResearchToolConfig]):
|
|
|
290
304
|
if await self.is_followup_question_answer() and not self.is_message_execution():
|
|
291
305
|
_LOGGER.info("This is a follow-up question answer")
|
|
292
306
|
self.chat_service.create_message_execution(
|
|
293
|
-
message_id=self.
|
|
307
|
+
message_id=self.chat_service.assistant_message_id,
|
|
294
308
|
type=MessageExecutionType.DEEP_RESEARCH,
|
|
295
309
|
)
|
|
296
310
|
self.write_message_log_text_message(
|
|
@@ -347,7 +361,7 @@ class DeepResearchTool(Tool[DeepResearchToolConfig]):
|
|
|
347
361
|
|
|
348
362
|
# put message in short term memory to remember that we asked the followup questions
|
|
349
363
|
await self.memory_service.save_async(
|
|
350
|
-
MemorySchema(message_id=self.
|
|
364
|
+
MemorySchema(message_id=self.chat_service.assistant_message_id),
|
|
351
365
|
)
|
|
352
366
|
return ToolCallResponse(
|
|
353
367
|
id=tool_call.id or "",
|
|
@@ -369,7 +383,7 @@ class DeepResearchTool(Tool[DeepResearchToolConfig]):
|
|
|
369
383
|
percentage = 100 if status == MessageExecutionUpdateStatus.COMPLETED else 0
|
|
370
384
|
|
|
371
385
|
await self.chat_service.update_message_execution_async(
|
|
372
|
-
message_id=self.
|
|
386
|
+
message_id=self.chat_service.assistant_message_id,
|
|
373
387
|
status=status,
|
|
374
388
|
percentage_completed=percentage,
|
|
375
389
|
)
|
|
@@ -405,7 +419,7 @@ class DeepResearchTool(Tool[DeepResearchToolConfig]):
|
|
|
405
419
|
def write_message_log_text_message(self, text: str):
|
|
406
420
|
create_message_log_entry(
|
|
407
421
|
self.chat_service,
|
|
408
|
-
self.
|
|
422
|
+
self.chat_service.assistant_message_id,
|
|
409
423
|
text,
|
|
410
424
|
MessageLogStatus.COMPLETED,
|
|
411
425
|
details=MessageLogDetails(data=[]),
|
|
@@ -468,7 +482,7 @@ class DeepResearchTool(Tool[DeepResearchToolConfig]):
|
|
|
468
482
|
"notes": [],
|
|
469
483
|
"final_report": "",
|
|
470
484
|
"chat_service": self.chat_service,
|
|
471
|
-
"message_id": self.
|
|
485
|
+
"message_id": self.chat_service.assistant_message_id,
|
|
472
486
|
}
|
|
473
487
|
|
|
474
488
|
# Prepare configuration for LangGraph
|
|
@@ -486,7 +500,7 @@ class DeepResearchTool(Tool[DeepResearchToolConfig]):
|
|
|
486
500
|
"openai_client": self.client,
|
|
487
501
|
"chat_service": self.chat_service,
|
|
488
502
|
"content_service": self.content_service,
|
|
489
|
-
"message_id": self.
|
|
503
|
+
"message_id": self.chat_service.assistant_message_id,
|
|
490
504
|
"citation_manager": citation_manager,
|
|
491
505
|
"additional_openai_proxy_headers": additional_openai_proxy_headers,
|
|
492
506
|
},
|
|
@@ -652,11 +666,11 @@ class DeepResearchTool(Tool[DeepResearchToolConfig]):
|
|
|
652
666
|
if isinstance(event.item, ResponseReasoningItem):
|
|
653
667
|
for summary in event.item.summary:
|
|
654
668
|
self.chat_service.create_message_log(
|
|
655
|
-
message_id=self.
|
|
669
|
+
message_id=self.chat_service.assistant_message_id,
|
|
656
670
|
text=summary.text,
|
|
657
671
|
status=MessageLogStatus.COMPLETED,
|
|
658
672
|
order=get_next_message_order(
|
|
659
|
-
self.
|
|
673
|
+
self.chat_service.assistant_message_id
|
|
660
674
|
),
|
|
661
675
|
uncited_references=MessageLogUncitedReferences(
|
|
662
676
|
data=[],
|
|
@@ -671,11 +685,11 @@ class DeepResearchTool(Tool[DeepResearchToolConfig]):
|
|
|
671
685
|
) and isinstance(event.item.action.query, str):
|
|
672
686
|
_LOGGER.info("OpenAI web search")
|
|
673
687
|
self.chat_service.create_message_log(
|
|
674
|
-
message_id=self.
|
|
688
|
+
message_id=self.chat_service.assistant_message_id,
|
|
675
689
|
text="**Searching the web**",
|
|
676
690
|
status=MessageLogStatus.COMPLETED,
|
|
677
691
|
order=get_next_message_order(
|
|
678
|
-
self.
|
|
692
|
+
self.chat_service.assistant_message_id
|
|
679
693
|
),
|
|
680
694
|
uncited_references=MessageLogUncitedReferences(
|
|
681
695
|
data=[],
|
|
@@ -718,11 +732,11 @@ class DeepResearchTool(Tool[DeepResearchToolConfig]):
|
|
|
718
732
|
)
|
|
719
733
|
continue
|
|
720
734
|
self.chat_service.create_message_log(
|
|
721
|
-
message_id=self.
|
|
735
|
+
message_id=self.chat_service.assistant_message_id,
|
|
722
736
|
text="**Reading website**",
|
|
723
737
|
status=MessageLogStatus.COMPLETED,
|
|
724
738
|
order=get_next_message_order(
|
|
725
|
-
self.
|
|
739
|
+
self.chat_service.assistant_message_id
|
|
726
740
|
),
|
|
727
741
|
uncited_references=MessageLogUncitedReferences(
|
|
728
742
|
data=[
|
|
@@ -745,11 +759,11 @@ class DeepResearchTool(Tool[DeepResearchToolConfig]):
|
|
|
745
759
|
)
|
|
746
760
|
case "response.failed":
|
|
747
761
|
self.chat_service.create_message_log(
|
|
748
|
-
message_id=self.
|
|
762
|
+
message_id=self.chat_service.assistant_message_id,
|
|
749
763
|
text=f"Failed to complete research: {event.response.error}",
|
|
750
764
|
status=MessageLogStatus.FAILED,
|
|
751
765
|
order=get_next_message_order(
|
|
752
|
-
self.
|
|
766
|
+
self.chat_service.assistant_message_id
|
|
753
767
|
),
|
|
754
768
|
uncited_references=MessageLogUncitedReferences(
|
|
755
769
|
data=[],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|