unique_toolkit 1.19.1__tar.gz → 1.19.3__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.
Potentially problematic release.
This version of unique_toolkit might be problematic. Click here for more details.
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/CHANGELOG.md +9 -1
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/PKG-INFO +10 -2
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/pyproject.toml +1 -1
- unique_toolkit-1.19.3/unique_toolkit/_common/feature_flags/schema.py +9 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/history_manager/history_manager.py +4 -7
- unique_toolkit-1.19.3/unique_toolkit/agentic/history_manager/utils.py +96 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/tool/service.py +0 -9
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/mcp/tool_wrapper.py +0 -7
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/test/test_mcp_manager.py +0 -5
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/tool.py +0 -11
- unique_toolkit-1.19.3/unique_toolkit/chat/rendering.py +34 -0
- unique_toolkit-1.19.1/unique_toolkit/_common/feature_flags/schema.py +0 -13
- unique_toolkit-1.19.1/unique_toolkit/agentic/history_manager/utils.py +0 -173
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/LICENSE +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/README.md +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/_base_service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/_time_utils.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/api_calling/human_verification_manager.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/base_model_type_attribute.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/chunk_relevancy_sorter/config.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/chunk_relevancy_sorter/exception.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/chunk_relevancy_sorter/schemas.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/chunk_relevancy_sorter/service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/chunk_relevancy_sorter/tests/test_service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/default_language_model.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/endpoint_builder.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/endpoint_requestor.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/exception.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/pydantic/rjsf_tags.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/pydantic_helpers.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/string_utilities.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/token/image_token_counting.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/token/token_counting.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/utils/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/utils/files.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/utils/structured_output/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/utils/structured_output/schema.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/utils/write_configuration.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/validate_required_values.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/validators.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/debug_info_manager/debug_info_manager.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/debug_info_manager/test/test_debug_info_manager.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/config.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/context_relevancy/prompts.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/context_relevancy/schema.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/context_relevancy/service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/evaluation_manager.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/exception.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/hallucination/constants.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/hallucination/hallucination_evaluation.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/hallucination/prompts.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/hallucination/service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/hallucination/utils.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/output_parser.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/schemas.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/tests/test_context_relevancy_service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/tests/test_output_parser.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/history_manager/history_construction_with_contents.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/history_manager/loop_token_reducer.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/postprocessor/postprocessor_manager.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/reference_manager/reference_manager.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/responses_api/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/responses_api/postprocessors/code_display.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/responses_api/postprocessors/generated_files.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/responses_api/stream_handler.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/short_term_memory_manager/persistent_short_term_memory_manager.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/thinking_manager/thinking_manager.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/config.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/evaluation/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/evaluation/_utils.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/evaluation/config.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/evaluation/evaluator.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/evaluation/summarization_user_message.j2 +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/manager.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/postprocessing/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/postprocessing/_display.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/postprocessing/_utils.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/postprocessing/config.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/postprocessing/postprocessor.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/postprocessing/test/test_consolidate_references.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/postprocessing/test/test_display.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/postprocessing/test/test_postprocessor_reference_functions.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/prompts.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/tool/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/tool/_memory.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/tool/_schema.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/tool/config.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/agent_chunks_hanlder.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/config.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/factory.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/mcp/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/mcp/manager.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/mcp/models.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/openai_builtin/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/openai_builtin/base.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/config.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/openai_builtin/manager.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/schemas.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/test/test_tool_progress_reporter.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/tool_manager.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/tool_progress_reporter.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/utils/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/utils/execution/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/utils/execution/execution.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/utils/source_handling/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/utils/source_handling/schema.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/utils/source_handling/source_formatting.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/utils/source_handling/tests/test_source_formatting.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/app/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/app/dev_util.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/app/init_logging.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/app/init_sdk.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/app/performance/async_tasks.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/app/performance/async_wrapper.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/app/schemas.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/app/unique_settings.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/app/verification.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/chat/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/chat/constants.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/chat/deprecated/service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/chat/functions.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/chat/responses_api.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/chat/schemas.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/chat/service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/chat/state.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/chat/utils.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/content/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/content/constants.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/content/functions.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/content/schemas.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/content/service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/content/smart_rules.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/content/utils.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/embedding/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/embedding/constants.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/embedding/functions.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/embedding/schemas.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/embedding/service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/embedding/utils.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/framework_utilities/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/framework_utilities/langchain/client.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/framework_utilities/langchain/history.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/framework_utilities/openai/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/framework_utilities/openai/client.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/framework_utilities/openai/message_builder.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/framework_utilities/utils.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/language_model/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/language_model/builder.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/language_model/constants.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/language_model/default_language_model.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/language_model/functions.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/language_model/infos.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/language_model/prompt.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/language_model/reference.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/language_model/schemas.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/language_model/service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/language_model/utils.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/protocols/support.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/services/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/services/chat_service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/services/knowledge_base.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/short_term_memory/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/short_term_memory/constants.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/short_term_memory/functions.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/short_term_memory/schemas.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/short_term_memory/service.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/smart_rules/__init__.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/smart_rules/compile.py +0 -0
- {unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/test_utilities/events.py +0 -0
|
@@ -5,11 +5,19 @@ 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
|
+
|
|
9
|
+
|
|
10
|
+
## [1.19.3] - 2025-10-29
|
|
11
|
+
- More documentation on advanced rendering
|
|
12
|
+
|
|
13
|
+
## [1.19.2] - 2025-10-29
|
|
14
|
+
- Removing unused tool specific `get_tool_call_result_for_loop_history` function
|
|
15
|
+
- Removing unused experimental config `full_sources_serialize_dump` in `history_manager`
|
|
16
|
+
|
|
8
17
|
## [1.19.1] - 2025-10-29
|
|
9
18
|
- Make api operations more flexible
|
|
10
19
|
- Make verification button text adaptable
|
|
11
20
|
|
|
12
|
-
|
|
13
21
|
## [1.19.0] - 2025-10-28
|
|
14
22
|
- Enable additional headers on openai and langchain client
|
|
15
23
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_toolkit
|
|
3
|
-
Version: 1.19.
|
|
3
|
+
Version: 1.19.3
|
|
4
4
|
Summary:
|
|
5
5
|
License: Proprietary
|
|
6
6
|
Author: Cedric Klinkert
|
|
@@ -118,11 +118,19 @@ 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
|
+
|
|
123
|
+
## [1.19.3] - 2025-10-29
|
|
124
|
+
- More documentation on advanced rendering
|
|
125
|
+
|
|
126
|
+
## [1.19.2] - 2025-10-29
|
|
127
|
+
- Removing unused tool specific `get_tool_call_result_for_loop_history` function
|
|
128
|
+
- Removing unused experimental config `full_sources_serialize_dump` in `history_manager`
|
|
129
|
+
|
|
121
130
|
## [1.19.1] - 2025-10-29
|
|
122
131
|
- Make api operations more flexible
|
|
123
132
|
- Make verification button text adaptable
|
|
124
133
|
|
|
125
|
-
|
|
126
134
|
## [1.19.0] - 2025-10-28
|
|
127
135
|
- Enable additional headers on openai and langchain client
|
|
128
136
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
|
|
3
|
+
from unique_toolkit.agentic.tools.config import get_configuration_dict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class FeatureExtendedSourceSerialization(BaseModel):
|
|
7
|
+
"""Mixin for experimental feature in Source serialization"""
|
|
8
|
+
|
|
9
|
+
model_config = get_configuration_dict()
|
|
@@ -3,6 +3,9 @@ from typing import Annotated, Awaitable, Callable
|
|
|
3
3
|
|
|
4
4
|
from pydantic import BaseModel, Field
|
|
5
5
|
|
|
6
|
+
from unique_toolkit._common.feature_flags.schema import (
|
|
7
|
+
FeatureExtendedSourceSerialization,
|
|
8
|
+
)
|
|
6
9
|
from unique_toolkit._common.validators import LMI
|
|
7
10
|
from unique_toolkit.agentic.history_manager.loop_token_reducer import LoopTokenReducer
|
|
8
11
|
from unique_toolkit.agentic.history_manager.utils import transform_chunks_to_string
|
|
@@ -42,11 +45,7 @@ class UploadedContentConfig(BaseModel):
|
|
|
42
45
|
)
|
|
43
46
|
|
|
44
47
|
|
|
45
|
-
class ExperimentalFeatures(
|
|
46
|
-
full_sources_serialize_dump: bool = Field(
|
|
47
|
-
default=False,
|
|
48
|
-
description="If True, the sources will be serialized in full, otherwise only the content will be serialized.",
|
|
49
|
-
)
|
|
48
|
+
class ExperimentalFeatures(FeatureExtendedSourceSerialization): ...
|
|
50
49
|
|
|
51
50
|
|
|
52
51
|
class HistoryManagerConfig(BaseModel):
|
|
@@ -172,8 +171,6 @@ class HistoryManager:
|
|
|
172
171
|
stringified_sources, sources = transform_chunks_to_string(
|
|
173
172
|
content_chunks,
|
|
174
173
|
self._source_enumerator,
|
|
175
|
-
None, # Use None for SourceFormatConfig
|
|
176
|
-
self._config.experimental_features.full_sources_serialize_dump,
|
|
177
174
|
)
|
|
178
175
|
|
|
179
176
|
self._source_enumerator += len(
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import logging
|
|
3
|
+
from copy import deepcopy
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
from unique_toolkit.agentic.tools.schemas import Source
|
|
7
|
+
from unique_toolkit.content.schemas import ContentChunk
|
|
8
|
+
from unique_toolkit.language_model.schemas import (
|
|
9
|
+
LanguageModelAssistantMessage,
|
|
10
|
+
LanguageModelMessage,
|
|
11
|
+
LanguageModelToolMessage,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def convert_tool_interactions_to_content_messages(
|
|
18
|
+
loop_history: list[LanguageModelMessage],
|
|
19
|
+
) -> list[LanguageModelMessage]:
|
|
20
|
+
new_loop_history = []
|
|
21
|
+
copy_loop_history = deepcopy(loop_history)
|
|
22
|
+
|
|
23
|
+
for message in copy_loop_history:
|
|
24
|
+
if isinstance(message, LanguageModelAssistantMessage) and message.tool_calls:
|
|
25
|
+
new_loop_history.append(_convert_tool_call_to_content(message))
|
|
26
|
+
|
|
27
|
+
elif isinstance(message, LanguageModelToolMessage):
|
|
28
|
+
new_loop_history.append(_convert_tool_call_response_to_content(message))
|
|
29
|
+
else:
|
|
30
|
+
new_loop_history.append(message)
|
|
31
|
+
|
|
32
|
+
return new_loop_history
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _convert_tool_call_to_content(
|
|
36
|
+
assistant_message: LanguageModelAssistantMessage,
|
|
37
|
+
) -> LanguageModelAssistantMessage:
|
|
38
|
+
assert assistant_message.tool_calls is not None
|
|
39
|
+
new_content = "The assistant requested the following tool_call:"
|
|
40
|
+
for tool_call in assistant_message.tool_calls:
|
|
41
|
+
new_content += (
|
|
42
|
+
f"\n\n- {tool_call.function.name}: {tool_call.function.arguments}"
|
|
43
|
+
)
|
|
44
|
+
assistant_message.tool_calls = None
|
|
45
|
+
assistant_message.content = new_content
|
|
46
|
+
|
|
47
|
+
return assistant_message
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _convert_tool_call_response_to_content(
|
|
51
|
+
tool_message: LanguageModelToolMessage,
|
|
52
|
+
) -> LanguageModelAssistantMessage:
|
|
53
|
+
new_content = f"The assistant received the following tool_call_response: {tool_message.name}, {tool_message.content}"
|
|
54
|
+
assistant_message = LanguageModelAssistantMessage(
|
|
55
|
+
content=new_content,
|
|
56
|
+
)
|
|
57
|
+
return assistant_message
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def transform_chunks_to_string(
|
|
61
|
+
content_chunks: list[ContentChunk],
|
|
62
|
+
max_source_number: int,
|
|
63
|
+
) -> tuple[str, list[dict[str, Any]]]:
|
|
64
|
+
"""Transform content chunks into a string of sources.
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
content_chunks (list[ContentChunk]): The content chunks to transform
|
|
68
|
+
max_source_number (int): The maximum source number to use
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
str: String for the tool call response
|
|
72
|
+
"""
|
|
73
|
+
if not content_chunks:
|
|
74
|
+
return "No relevant sources found.", []
|
|
75
|
+
sources: list[dict[str, Any]] = [
|
|
76
|
+
{
|
|
77
|
+
"source_number": max_source_number + i,
|
|
78
|
+
"content": chunk.text,
|
|
79
|
+
}
|
|
80
|
+
for i, chunk in enumerate(content_chunks)
|
|
81
|
+
]
|
|
82
|
+
return json.dumps(sources), sources
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def load_sources_from_string(
|
|
86
|
+
source_string: str,
|
|
87
|
+
) -> list[Source] | None:
|
|
88
|
+
"""Transform JSON string from language model tool message in the tool call response into Source objects"""
|
|
89
|
+
|
|
90
|
+
try:
|
|
91
|
+
# First, try parsing as JSON (new format)
|
|
92
|
+
sources_data = json.loads(source_string)
|
|
93
|
+
return [Source.model_validate(source) for source in sources_data]
|
|
94
|
+
except (json.JSONDecodeError, ValueError):
|
|
95
|
+
logger.warning("Failed to parse source string")
|
|
96
|
+
return None
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/tool/service.py
RENAMED
|
@@ -18,7 +18,6 @@ from unique_toolkit.agentic.tools.a2a.tool._schema import (
|
|
|
18
18
|
from unique_toolkit.agentic.tools.a2a.tool.config import (
|
|
19
19
|
SubAgentToolConfig,
|
|
20
20
|
)
|
|
21
|
-
from unique_toolkit.agentic.tools.agent_chunks_hanlder import AgentChunksHandler
|
|
22
21
|
from unique_toolkit.agentic.tools.factory import ToolFactory
|
|
23
22
|
from unique_toolkit.agentic.tools.schemas import ToolCallResponse
|
|
24
23
|
from unique_toolkit.agentic.tools.tool import Tool
|
|
@@ -31,7 +30,6 @@ from unique_toolkit.language_model import (
|
|
|
31
30
|
LanguageModelFunction,
|
|
32
31
|
LanguageModelToolDescription,
|
|
33
32
|
)
|
|
34
|
-
from unique_toolkit.language_model.schemas import LanguageModelMessage
|
|
35
33
|
|
|
36
34
|
|
|
37
35
|
class SubAgentResponseSubscriber(Protocol):
|
|
@@ -199,13 +197,6 @@ class SubAgentTool(Tool[SubAgentToolConfig]):
|
|
|
199
197
|
content=response_text_with_references,
|
|
200
198
|
)
|
|
201
199
|
|
|
202
|
-
@override
|
|
203
|
-
def get_tool_call_result_for_loop_history(
|
|
204
|
-
self,
|
|
205
|
-
tool_response: ToolCallResponse,
|
|
206
|
-
agent_chunks_handler: AgentChunksHandler,
|
|
207
|
-
) -> LanguageModelMessage: ... # Empty as method is deprecated
|
|
208
|
-
|
|
209
200
|
async def _get_chat_id(self) -> str | None:
|
|
210
201
|
if not self.config.reuse_chat:
|
|
211
202
|
return None
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/mcp/tool_wrapper.py
RENAMED
|
@@ -13,7 +13,6 @@ from unique_toolkit.agentic.tools.tool_progress_reporter import (
|
|
|
13
13
|
ToolProgressReporter,
|
|
14
14
|
)
|
|
15
15
|
from unique_toolkit.app.schemas import ChatEvent, McpServer, McpTool
|
|
16
|
-
from unique_toolkit.language_model import LanguageModelMessage
|
|
17
16
|
from unique_toolkit.language_model.schemas import (
|
|
18
17
|
LanguageModelFunction,
|
|
19
18
|
LanguageModelToolDescription,
|
|
@@ -99,12 +98,6 @@ class MCPToolWrapper(Tool[MCPToolConfig]):
|
|
|
99
98
|
"""Return evaluation checks based on tool response"""
|
|
100
99
|
return []
|
|
101
100
|
|
|
102
|
-
def get_tool_call_result_for_loop_history(
|
|
103
|
-
self,
|
|
104
|
-
tool_response: ToolCallResponse,
|
|
105
|
-
) -> LanguageModelMessage:
|
|
106
|
-
raise NotImplementedError("function is not supported")
|
|
107
|
-
|
|
108
101
|
async def run(self, tool_call: LanguageModelFunction) -> ToolCallResponse:
|
|
109
102
|
"""Execute the MCP tool using SDK to call public API"""
|
|
110
103
|
self.logger.info(f"Running MCP tool: {self.name}")
|
|
@@ -50,11 +50,6 @@ class MockInternalSearchTool(Tool[BaseToolConfig]):
|
|
|
50
50
|
def tool_format_information_for_system_prompt(self) -> str:
|
|
51
51
|
return "Use this tool to search for content"
|
|
52
52
|
|
|
53
|
-
def get_tool_call_result_for_loop_history(self, tool_response):
|
|
54
|
-
from unique_toolkit.language_model.schemas import LanguageModelMessage
|
|
55
|
-
|
|
56
|
-
return LanguageModelMessage(role="tool", content="Mock search result")
|
|
57
|
-
|
|
58
53
|
def evaluation_check_list(self):
|
|
59
54
|
return []
|
|
60
55
|
|
|
@@ -5,7 +5,6 @@ from typing import Any, Generic, TypeVar, cast
|
|
|
5
5
|
from typing_extensions import deprecated
|
|
6
6
|
|
|
7
7
|
from unique_toolkit.agentic.evaluation.schemas import EvaluationMetricName
|
|
8
|
-
from unique_toolkit.agentic.tools.agent_chunks_hanlder import AgentChunksHandler
|
|
9
8
|
from unique_toolkit.agentic.tools.config import ToolBuildConfig, ToolSelectionPolicy
|
|
10
9
|
from unique_toolkit.agentic.tools.schemas import (
|
|
11
10
|
BaseToolConfig,
|
|
@@ -20,7 +19,6 @@ from unique_toolkit.chat.service import (
|
|
|
20
19
|
from unique_toolkit.language_model import LanguageModelToolDescription
|
|
21
20
|
from unique_toolkit.language_model.schemas import (
|
|
22
21
|
LanguageModelFunction,
|
|
23
|
-
LanguageModelMessage,
|
|
24
22
|
)
|
|
25
23
|
from unique_toolkit.language_model.service import LanguageModelService
|
|
26
24
|
|
|
@@ -100,15 +98,6 @@ class Tool(ABC, Generic[ConfigType]):
|
|
|
100
98
|
"""
|
|
101
99
|
return ""
|
|
102
100
|
|
|
103
|
-
@deprecated("Do not use as is bound to loop agent only")
|
|
104
|
-
@abstractmethod
|
|
105
|
-
def get_tool_call_result_for_loop_history(
|
|
106
|
-
self,
|
|
107
|
-
tool_response: ToolCallResponse,
|
|
108
|
-
agent_chunks_handler: AgentChunksHandler,
|
|
109
|
-
) -> LanguageModelMessage:
|
|
110
|
-
raise NotImplementedError
|
|
111
|
-
|
|
112
101
|
@deprecated(
|
|
113
102
|
"Do not use. The tool should not determine how"
|
|
114
103
|
"it is checked. This should be defined by the user"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from urllib.parse import quote
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def create_prompt_button_string(
|
|
5
|
+
*,
|
|
6
|
+
button_text: str,
|
|
7
|
+
next_user_message: str,
|
|
8
|
+
) -> str:
|
|
9
|
+
"""
|
|
10
|
+
Create a prompt button string.
|
|
11
|
+
|
|
12
|
+
Args:
|
|
13
|
+
button_text: The text of the button.
|
|
14
|
+
next_user_message: The message to send when the button is clicked.
|
|
15
|
+
|
|
16
|
+
Returns:
|
|
17
|
+
A string that can be used to create a prompt button.
|
|
18
|
+
A prompt button includes the `next_user_message` to the user prompt windown.
|
|
19
|
+
"""
|
|
20
|
+
next_user_message = quote(next_user_message)
|
|
21
|
+
return f"[{button_text}](https://prompt={next_user_message})"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def create_latex_formula_string(latex_expression: str) -> str:
|
|
25
|
+
"""
|
|
26
|
+
Create a LaTeX string.
|
|
27
|
+
|
|
28
|
+
Args:
|
|
29
|
+
latex_expression: The LaTeX expression to create.
|
|
30
|
+
|
|
31
|
+
Returns:
|
|
32
|
+
A string that can be used to create a LaTeX string.
|
|
33
|
+
"""
|
|
34
|
+
return f"\\[{latex_expression}\\]"
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
from pydantic import BaseModel, Field
|
|
2
|
-
|
|
3
|
-
from unique_toolkit.agentic.tools.config import get_configuration_dict
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class FeatureExtendedSourceSerialization(BaseModel):
|
|
7
|
-
"""Mixin for experimental feature in Source serialization"""
|
|
8
|
-
|
|
9
|
-
model_config = get_configuration_dict()
|
|
10
|
-
full_sources_serialize_dump: bool = Field(
|
|
11
|
-
default=False,
|
|
12
|
-
description="Whether to include the full source object in the tool response. If True, includes the full Source object. If False, uses the old format with only source_number and content.",
|
|
13
|
-
)
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
import logging
|
|
3
|
-
from copy import deepcopy
|
|
4
|
-
|
|
5
|
-
from unique_toolkit.agentic.tools.schemas import Source
|
|
6
|
-
from unique_toolkit.agentic.tools.utils.source_handling.schema import (
|
|
7
|
-
SourceFormatConfig,
|
|
8
|
-
)
|
|
9
|
-
from unique_toolkit.content.schemas import ContentChunk, ContentMetadata
|
|
10
|
-
from unique_toolkit.language_model.schemas import (
|
|
11
|
-
LanguageModelAssistantMessage,
|
|
12
|
-
LanguageModelMessage,
|
|
13
|
-
LanguageModelToolMessage,
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
logger = logging.getLogger(__name__)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def convert_tool_interactions_to_content_messages(
|
|
20
|
-
loop_history: list[LanguageModelMessage],
|
|
21
|
-
) -> list[LanguageModelMessage]:
|
|
22
|
-
new_loop_history = []
|
|
23
|
-
copy_loop_history = deepcopy(loop_history)
|
|
24
|
-
|
|
25
|
-
for message in copy_loop_history:
|
|
26
|
-
if isinstance(message, LanguageModelAssistantMessage) and message.tool_calls:
|
|
27
|
-
new_loop_history.append(_convert_tool_call_to_content(message))
|
|
28
|
-
|
|
29
|
-
elif isinstance(message, LanguageModelToolMessage):
|
|
30
|
-
new_loop_history.append(_convert_tool_call_response_to_content(message))
|
|
31
|
-
else:
|
|
32
|
-
new_loop_history.append(message)
|
|
33
|
-
|
|
34
|
-
return new_loop_history
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
def _convert_tool_call_to_content(
|
|
38
|
-
assistant_message: LanguageModelAssistantMessage,
|
|
39
|
-
) -> LanguageModelAssistantMessage:
|
|
40
|
-
assert assistant_message.tool_calls is not None
|
|
41
|
-
new_content = "The assistant requested the following tool_call:"
|
|
42
|
-
for tool_call in assistant_message.tool_calls:
|
|
43
|
-
new_content += (
|
|
44
|
-
f"\n\n- {tool_call.function.name}: {tool_call.function.arguments}"
|
|
45
|
-
)
|
|
46
|
-
assistant_message.tool_calls = None
|
|
47
|
-
assistant_message.content = new_content
|
|
48
|
-
|
|
49
|
-
return assistant_message
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def _convert_tool_call_response_to_content(
|
|
53
|
-
tool_message: LanguageModelToolMessage,
|
|
54
|
-
) -> LanguageModelAssistantMessage:
|
|
55
|
-
new_content = f"The assistant received the following tool_call_response: {tool_message.name}, {tool_message.content}"
|
|
56
|
-
assistant_message = LanguageModelAssistantMessage(
|
|
57
|
-
content=new_content,
|
|
58
|
-
)
|
|
59
|
-
return assistant_message
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def transform_chunks_to_string(
|
|
63
|
-
content_chunks: list[ContentChunk],
|
|
64
|
-
max_source_number: int,
|
|
65
|
-
cfg: SourceFormatConfig | None,
|
|
66
|
-
full_sources_serialize_dump: bool = False,
|
|
67
|
-
) -> tuple[str, list[Source]]:
|
|
68
|
-
"""Transform content chunks into a string of sources.
|
|
69
|
-
|
|
70
|
-
Args:
|
|
71
|
-
content_chunks (list[ContentChunk]): The content chunks to transform
|
|
72
|
-
max_source_number (int): The maximum source number to use
|
|
73
|
-
feature_full_sources (bool, optional): Whether to include the full source object. Defaults to False which is the old format.
|
|
74
|
-
|
|
75
|
-
Returns:
|
|
76
|
-
str: String for the tool call response
|
|
77
|
-
"""
|
|
78
|
-
if not content_chunks:
|
|
79
|
-
return "No relevant sources found.", []
|
|
80
|
-
if full_sources_serialize_dump:
|
|
81
|
-
sources = [
|
|
82
|
-
Source(
|
|
83
|
-
source_number=max_source_number + i,
|
|
84
|
-
key=chunk.key,
|
|
85
|
-
id=chunk.id,
|
|
86
|
-
order=chunk.order,
|
|
87
|
-
content=chunk.text,
|
|
88
|
-
chunk_id=chunk.chunk_id,
|
|
89
|
-
metadata=(
|
|
90
|
-
_format_metadata(chunk.metadata, cfg) or None
|
|
91
|
-
if chunk.metadata
|
|
92
|
-
else None
|
|
93
|
-
),
|
|
94
|
-
url=chunk.url,
|
|
95
|
-
).model_dump(
|
|
96
|
-
exclude_none=True,
|
|
97
|
-
exclude_defaults=True,
|
|
98
|
-
by_alias=True,
|
|
99
|
-
)
|
|
100
|
-
for i, chunk in enumerate(content_chunks)
|
|
101
|
-
]
|
|
102
|
-
else:
|
|
103
|
-
sources = [
|
|
104
|
-
{
|
|
105
|
-
"source_number": max_source_number + i,
|
|
106
|
-
"content": chunk.text,
|
|
107
|
-
**(
|
|
108
|
-
{"metadata": meta}
|
|
109
|
-
if (
|
|
110
|
-
meta := _format_metadata(chunk.metadata, cfg)
|
|
111
|
-
) # only add when not empty
|
|
112
|
-
else {}
|
|
113
|
-
),
|
|
114
|
-
}
|
|
115
|
-
for i, chunk in enumerate(content_chunks)
|
|
116
|
-
]
|
|
117
|
-
return json.dumps(sources), sources
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
def load_sources_from_string(
|
|
121
|
-
source_string: str,
|
|
122
|
-
) -> list[Source] | None:
|
|
123
|
-
"""Transform JSON string from language model tool message in the tool call response into Source objects"""
|
|
124
|
-
|
|
125
|
-
try:
|
|
126
|
-
# First, try parsing as JSON (new format)
|
|
127
|
-
sources_data = json.loads(source_string)
|
|
128
|
-
return [Source.model_validate(source) for source in sources_data]
|
|
129
|
-
except (json.JSONDecodeError, ValueError):
|
|
130
|
-
logger.warning("Failed to parse source string")
|
|
131
|
-
return None
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
def _format_metadata(
|
|
135
|
-
metadata: ContentMetadata | None,
|
|
136
|
-
cfg: SourceFormatConfig | None,
|
|
137
|
-
) -> str:
|
|
138
|
-
"""
|
|
139
|
-
Build the concatenated tag string from the chunk's metadata
|
|
140
|
-
and the templates found in cfg.sections.
|
|
141
|
-
Example result:
|
|
142
|
-
"<|topic|>GenAI<|/topic|>\n<|date|>This document is from: 2025-04-29<|/date|>\n"
|
|
143
|
-
"""
|
|
144
|
-
if metadata is None:
|
|
145
|
-
return ""
|
|
146
|
-
|
|
147
|
-
if cfg is None or not cfg.sections:
|
|
148
|
-
# If no configuration is provided, return empty string
|
|
149
|
-
return ""
|
|
150
|
-
|
|
151
|
-
meta_dict = metadata.model_dump(exclude_none=True, by_alias=True)
|
|
152
|
-
sections = cfg.sections
|
|
153
|
-
|
|
154
|
-
parts: list[str] = []
|
|
155
|
-
for key, template in sections.items():
|
|
156
|
-
if key in meta_dict:
|
|
157
|
-
parts.append(template.format(meta_dict[key]))
|
|
158
|
-
|
|
159
|
-
return "".join(parts)
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
### In case we do not want any formatting of metadata we could use this function
|
|
163
|
-
# def _filtered_metadata(
|
|
164
|
-
# meta: ContentMetadata | None,
|
|
165
|
-
# cfg: SourceFormatConfig,
|
|
166
|
-
# ) -> dict[str, str] | None:
|
|
167
|
-
# if meta is None:
|
|
168
|
-
# return None
|
|
169
|
-
|
|
170
|
-
# allowed = set(cfg.sections)
|
|
171
|
-
# raw = meta.model_dump(exclude_none=True, by_alias=True)
|
|
172
|
-
# pruned = {k: v for k, v in raw.items() if k in allowed}
|
|
173
|
-
# return pruned or None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/base_model_type_attribute.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/default_language_model.py
RENAMED
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/endpoint_requestor.py
RENAMED
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/pydantic/rjsf_tags.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/token/image_token_counting.py
RENAMED
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/token/token_counting.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/utils/write_configuration.py
RENAMED
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/_common/validate_required_values.py
RENAMED
|
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
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/exception.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/output_parser.py
RENAMED
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/evaluation/schemas.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/responses_api/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/__init__.py
RENAMED
|
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
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/tool/__init__.py
RENAMED
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/tool/_memory.py
RENAMED
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/tool/_schema.py
RENAMED
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/a2a/tool/config.py
RENAMED
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/agent_chunks_hanlder.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/mcp/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/openai_builtin/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/tool_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/agentic/tools/utils/__init__.py
RENAMED
|
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
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/app/performance/async_tasks.py
RENAMED
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/app/performance/async_wrapper.py
RENAMED
|
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
|
|
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
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/framework_utilities/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/framework_utilities/openai/client.py
RENAMED
|
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
|
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/short_term_memory/__init__.py
RENAMED
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/short_term_memory/constants.py
RENAMED
|
File without changes
|
{unique_toolkit-1.19.1 → unique_toolkit-1.19.3}/unique_toolkit/short_term_memory/functions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|