unique_toolkit 1.77.1__tar.gz → 1.77.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.
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/PKG-INFO +1 -1
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/pyproject.toml +1 -1
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/postprocessors/generated_files.py +1 -113
- unique_toolkit-1.77.3/unique_toolkit/experimental/__init__.py +23 -0
- unique_toolkit-1.77.3/unique_toolkit/experimental/scheduled_task/__init__.py +71 -0
- unique_toolkit-1.77.3/unique_toolkit/experimental/scheduled_task/cron.py +90 -0
- unique_toolkit-1.77.3/unique_toolkit/experimental/scheduled_task/functions.py +311 -0
- unique_toolkit-1.77.3/unique_toolkit/experimental/scheduled_task/schemas.py +152 -0
- unique_toolkit-1.77.3/unique_toolkit/experimental/scheduled_task/service.py +285 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/README.md +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/_base_service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/_time_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/api_calling/human_verification_manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/base_model_type_attribute.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/chunk_relevancy_sorter/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/chunk_relevancy_sorter/exception.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/chunk_relevancy_sorter/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/chunk_relevancy_sorter/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/chunk_relevancy_sorter/tests/test_service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/config_checker/README.md +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/config_checker/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/config_checker/__main__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/config_checker/cli.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/config_checker/differ.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/config_checker/exporter.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/config_checker/models.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/config_checker/registry.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/config_checker/validator.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/default_language_model.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/docx_generator/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/docx_generator/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/docx_generator/pandoc_converter.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/docx_generator/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/docx_generator/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/docx_generator/template/Doc Template.docx +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/endpoint_builder.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/endpoint_requestor.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/event_bus.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/exception.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/execution.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/endpoint_builder.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/endpoint_requestor.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/README.md +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/agent.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/examples/data.csv +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/examples/example_usage.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/dataframe_handler/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/dataframe_handler/exceptions.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/dataframe_handler/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/dataframe_handler/utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/exceptions.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/prompts/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/prompts/system_prompt.j2 +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/prompts/user_prompt.j2 +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/template_handler/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/template_handler/default_template.j2 +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/template_handler/exceptions.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/template_handler/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/services/template_handler/utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/experimental/write_up_agent/utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/feature_flags/schema.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/pydantic/rjsf_tags.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/pydantic_helpers.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/referencing.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/string_utilities.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/tests/test_referencing.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/tests/test_string_utilities.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/token/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/token/image_token_counting.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/token/token_counting.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/token/tokenizers/deepseek/tokenizer.json +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/token/tokenizers/qwen/tokenizer.json +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/utils/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/utils/files.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/utils/image/encode.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/utils/jinja/helpers.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/utils/jinja/render.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/utils/jinja/schema.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/utils/jinja/utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/utils/structured_output/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/utils/structured_output/schema.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/utils/write_configuration.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/validate_required_values.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/_common/validators.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/debug_info_manager/debug_info_manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/debug_info_manager/test/test_debug_info_manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/context_relevancy/prompts/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/context_relevancy/prompts/system_prompt.j2 +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/context_relevancy/prompts/user_prompt.j2 +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/context_relevancy/schema.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/context_relevancy/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/evaluation_manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/exception.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/hallucination/constants.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/hallucination/hallucination_evaluation.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/hallucination/prompts/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/hallucination/prompts/system_prompt.j2 +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/hallucination/prompts/user_prompt.j2 +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/hallucination/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/hallucination/utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/output_parser.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/tests/fixtures.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/tests/test_config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/tests/test_context_relevancy_service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/tests/test_hallucination_constants.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/tests/test_hallucination_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/tests/test_output_parser.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/tests/test_prompt_loaders.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/evaluation/utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/feature_flags/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/feature_flags/feature_flags.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/history_manager/history_construction_with_contents.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/history_manager/history_manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/history_manager/loop_token_reducer.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/history_manager/utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/_iteration_handler_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/_responses_iteration_handler_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/_responses_stream_handler_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/_stream_handler_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/base.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/middleware/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/middleware/planning/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/middleware/planning/planning.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/middleware/planning/schema.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/runners/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/runners/basic.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/runners/mistral/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/runners/mistral/mistral_runner.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/runners/qwen/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/runners/qwen/helpers.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/loop_runner/runners/qwen/qwen_runner.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/message_log_manager/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/message_log_manager/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/postprocessor/postprocessor_manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/reference_manager/reference_manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/responses_api/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/responses_api/postprocessors/code_display.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/responses_api/postprocessors/generated_files.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/responses_api/stream_handler.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/short_term_memory_manager/persistent_short_term_memory_manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/thinking_manager/thinking_manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/evaluation/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/evaluation/_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/evaluation/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/evaluation/evaluator.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/evaluation/summarization_user_message.j2 +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/postprocessing/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/postprocessing/_display_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/postprocessing/_ref_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/postprocessing/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/postprocessing/display.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/postprocessing/references.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/postprocessing/test/test_display.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/postprocessing/test/test_display_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/postprocessing/test/test_ref_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/prompts.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/response_watcher/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/response_watcher/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/tool/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/tool/_memory.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/tool/_schema.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/tool/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/tool/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/a2a/tool/test/test_service_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/agent_chunks_hanlder.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/open_file_tool/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/open_file_tool/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/open_file_tool/runtime.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/open_file_tool/tool.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/todo/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/todo/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/todo/prompts/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/todo/prompts/execution_reminder.j2 +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/todo/prompts/system_prompt.j2 +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/todo/prompts/tool_description.j2 +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/todo/prompts/verification_nudge.j2 +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/todo/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/experimental/todo/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/factory.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/mcp/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/mcp/manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/mcp/models.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/mcp/tool_wrapper.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/openai_builtin/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/openai_builtin/base.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/postprocessors/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/postprocessors/code_display.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/openai_builtin/manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/test/test_mcp_manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/test/test_tool_progress_reporter.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/tool.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/tool_manager.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/tool_progress_reporter.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/utils/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/utils/source_handling/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/utils/source_handling/schema.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/utils/source_handling/source_formatting.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic/tools/utils/source_handling/tests/test_source_formatting.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic_table/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic_table/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/agentic_table/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/chat_event_filter_options_settings.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/dev_util.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/fast_api_factory.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/feature_flags.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/find_env_file.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/init_logging.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/init_sdk.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/performance/async_tasks.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/performance/async_wrapper.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/unique_settings.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/verification.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/app/webhook.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/chat/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/chat/cancellation.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/chat/constants.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/chat/deprecated/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/chat/functions.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/chat/rendering.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/chat/responses_api.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/chat/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/chat/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/chat/state.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/chat/utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/content/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/content/constants.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/content/functions.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/content/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/content/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/content/smart_rules.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/content/utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/data_extraction/README.md +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/data_extraction/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/data_extraction/augmented/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/data_extraction/augmented/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/data_extraction/base.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/data_extraction/basic/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/data_extraction/basic/config.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/data_extraction/basic/prompt.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/data_extraction/basic/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/elicitation/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/elicitation/constants.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/elicitation/exceptions.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/elicitation/functions.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/elicitation/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/elicitation/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/embedding/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/embedding/constants.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/embedding/functions.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/embedding/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/embedding/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/embedding/utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/framework_utilities/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/framework_utilities/langchain/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/framework_utilities/langchain/client.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/framework_utilities/langchain/history.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/framework_utilities/openai/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/framework_utilities/openai/client.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/framework_utilities/openai/message_builder.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/framework_utilities/utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/_responses_api_utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/builder.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/constants.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/default_language_model.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/functions.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/infos.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/prompt.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/reference.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/stream_transform.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/language_model/utils.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/monitoring/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/monitoring/middleware.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/monitoring/registry.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/protocols/support.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/services/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/services/chat_service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/services/factory.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/services/knowledge_base.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/short_term_memory/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/short_term_memory/constants.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/short_term_memory/functions.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/short_term_memory/schemas.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/short_term_memory/service.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/smart_rules/__init__.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/smart_rules/compile.py +0 -0
- {unique_toolkit-1.77.1 → unique_toolkit-1.77.3}/unique_toolkit/test_utilities/events.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: unique-toolkit
|
|
3
|
-
Version: 1.77.
|
|
3
|
+
Version: 1.77.3
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Cedric Klinkert, Martin Fadler, Sadique Sheik, Fabian Schläpfer, Pascal Hauri, Ejiroghene Oki-Peter, Rami Azouz, Ricardo Visini, Sanzio Monti
|
|
6
6
|
Author-email: Cedric Klinkert <cedric.klinkert@unique.ch>, Martin Fadler <martin.fadler@unique.ch>, Sadique Sheik <sadique@unique.ch>, Fabian Schläpfer <fabian@unique.ch>, Pascal Hauri <pascal@unique.ch>, Ejiroghene Oki-Peter <oki-peter.ejiroghene@unique.ai>, Rami Azouz <rami.ext@unique.ch>, Ricardo Visini <ricardo.visini@unique.ch>, Sanzio Monti <sanzio.monti@unique.ai>
|
|
@@ -358,7 +358,6 @@ class DisplayCodeInterpreterFilesPostProcessor(
|
|
|
358
358
|
logger, {"chat_id": chat_id or "n/a"}
|
|
359
359
|
)
|
|
360
360
|
|
|
361
|
-
self._orphan_code_blocks: list[CodeInterpreterBlock] = []
|
|
362
361
|
self._short_term_memory_manager = None
|
|
363
362
|
if chat_id is not None and user_id is not None and company_id is not None:
|
|
364
363
|
self._short_term_memory_manager = _init_short_term_memory_manager(
|
|
@@ -465,34 +464,11 @@ class DisplayCodeInterpreterFilesPostProcessor(
|
|
|
465
464
|
)
|
|
466
465
|
save_ms = (time.monotonic() - phase_t0) * 1000
|
|
467
466
|
|
|
468
|
-
phase_t0 = time.monotonic()
|
|
469
|
-
try:
|
|
470
|
-
if feature_flags.enable_code_execution_fence_un_17972.is_enabled(
|
|
471
|
-
self._company_id
|
|
472
|
-
):
|
|
473
|
-
self._orphan_code_blocks = await self._upload_orphan_code_as_txt(
|
|
474
|
-
loop_response
|
|
475
|
-
)
|
|
476
|
-
if self._orphan_code_blocks:
|
|
477
|
-
self._log.info(
|
|
478
|
-
"run() produced %d orphan code block(s)",
|
|
479
|
-
len(self._orphan_code_blocks),
|
|
480
|
-
)
|
|
481
|
-
else:
|
|
482
|
-
self._orphan_code_blocks = []
|
|
483
|
-
except Exception:
|
|
484
|
-
self._log.exception(
|
|
485
|
-
"run() failed to process orphan code blocks; "
|
|
486
|
-
"file replacement will still proceed."
|
|
487
|
-
)
|
|
488
|
-
self._orphan_code_blocks = []
|
|
489
|
-
orphan_ms = (time.monotonic() - phase_t0) * 1000
|
|
490
|
-
|
|
491
467
|
total_ms = (time.monotonic() - run_t0) * 1000
|
|
492
468
|
self._log.info(
|
|
493
469
|
"run() finished — content_map has %d entries (%d ok, %d failed). "
|
|
494
470
|
"Timing: total=%.0fms, load_stm=%.0fms, download_upload=%.0fms, "
|
|
495
|
-
"save_stm=%.0fms
|
|
471
|
+
"save_stm=%.0fms",
|
|
496
472
|
len(self._content_map),
|
|
497
473
|
len(succeeded),
|
|
498
474
|
len(failed),
|
|
@@ -500,7 +476,6 @@ class DisplayCodeInterpreterFilesPostProcessor(
|
|
|
500
476
|
load_ms,
|
|
501
477
|
download_upload_ms,
|
|
502
478
|
save_ms,
|
|
503
|
-
orphan_ms,
|
|
504
479
|
)
|
|
505
480
|
|
|
506
481
|
@override
|
|
@@ -624,25 +599,6 @@ class DisplayCodeInterpreterFilesPostProcessor(
|
|
|
624
599
|
if fences_changed:
|
|
625
600
|
self._log.info("Fence injection modified the message text")
|
|
626
601
|
|
|
627
|
-
if self._orphan_code_blocks:
|
|
628
|
-
for block in self._orphan_code_blocks:
|
|
629
|
-
for file in block.files:
|
|
630
|
-
loop_response.message.references.append(
|
|
631
|
-
ContentReference(
|
|
632
|
-
sequence_number=ref_number,
|
|
633
|
-
source_id=file.content_id,
|
|
634
|
-
source="node-ingestion-chunks",
|
|
635
|
-
url=f"unique://content/{file.content_id}",
|
|
636
|
-
name=file.filename,
|
|
637
|
-
)
|
|
638
|
-
)
|
|
639
|
-
ref_number += 1
|
|
640
|
-
changed = True
|
|
641
|
-
self._log.info(
|
|
642
|
-
"Added %d orphan code block(s) to message references",
|
|
643
|
-
len(self._orphan_code_blocks),
|
|
644
|
-
)
|
|
645
|
-
|
|
646
602
|
_warn_missing_content_ids(loop_response.message.text or "", self._content_map)
|
|
647
603
|
loop_response.message.text, dangling_replaced = _replace_dangling_sandbox_links(
|
|
648
604
|
loop_response.message.text
|
|
@@ -963,74 +919,6 @@ class DisplayCodeInterpreterFilesPostProcessor(
|
|
|
963
919
|
(time.monotonic() - t0) * 1000,
|
|
964
920
|
)
|
|
965
921
|
|
|
966
|
-
async def _upload_orphan_code_as_txt(
|
|
967
|
-
self, loop_response: ResponsesLanguageModelStreamResponse
|
|
968
|
-
) -> list[CodeInterpreterBlock]:
|
|
969
|
-
"""Upload source **code** from calls that produced no container files as .txt artifacts.
|
|
970
|
-
|
|
971
|
-
When code interpreter runs but generates no files or images, the response
|
|
972
|
-
text has no sandbox links for fence injection to hook onto. This method
|
|
973
|
-
converts those "orphan" calls into downloadable .txt files (the executed
|
|
974
|
-
code, not stdout) so the postprocessor can attach a reference for download.
|
|
975
|
-
|
|
976
|
-
Called only when the fence feature flag is enabled. Skipped entirely if
|
|
977
|
-
any container files were produced (normal fencing handles those).
|
|
978
|
-
"""
|
|
979
|
-
if loop_response.container_files:
|
|
980
|
-
return []
|
|
981
|
-
|
|
982
|
-
calls = loop_response.code_interpreter_calls
|
|
983
|
-
if not calls:
|
|
984
|
-
return []
|
|
985
|
-
|
|
986
|
-
assert self._chat_service is not None # Checked in __init__
|
|
987
|
-
|
|
988
|
-
use_numeric_suffix = len(calls) > 1
|
|
989
|
-
orphan_blocks: list[CodeInterpreterBlock] = []
|
|
990
|
-
|
|
991
|
-
for i, call in enumerate(calls):
|
|
992
|
-
if not call.code:
|
|
993
|
-
continue
|
|
994
|
-
|
|
995
|
-
# Always persist the executed source as the downloadable .txt (not stdout),
|
|
996
|
-
# so the attachment matches what ran in the sandbox.
|
|
997
|
-
txt_content = call.code
|
|
998
|
-
filename = f"code_{i + 1}.txt" if use_numeric_suffix else "code.txt"
|
|
999
|
-
|
|
1000
|
-
try:
|
|
1001
|
-
content = await self._build_retry()(
|
|
1002
|
-
self._chat_service.upload_to_chat_from_bytes_async,
|
|
1003
|
-
content=txt_content.encode("utf-8"),
|
|
1004
|
-
content_name=filename,
|
|
1005
|
-
mime_type="text/plain",
|
|
1006
|
-
skip_ingestion=True,
|
|
1007
|
-
hide_in_chat=True,
|
|
1008
|
-
)
|
|
1009
|
-
except Exception:
|
|
1010
|
-
self._log.exception(
|
|
1011
|
-
"Failed to upload orphan code block as txt for call %d ('%s'); "
|
|
1012
|
-
"falling back to legacy code block display.",
|
|
1013
|
-
i,
|
|
1014
|
-
filename,
|
|
1015
|
-
)
|
|
1016
|
-
continue
|
|
1017
|
-
|
|
1018
|
-
orphan_file = CodeInterpreterFile(
|
|
1019
|
-
filename=filename,
|
|
1020
|
-
content_id=content.id,
|
|
1021
|
-
type="document",
|
|
1022
|
-
)
|
|
1023
|
-
orphan_blocks.append(
|
|
1024
|
-
CodeInterpreterBlock(code=call.code, files=[orphan_file])
|
|
1025
|
-
)
|
|
1026
|
-
self._log.info(
|
|
1027
|
-
"Uploaded orphan code block as '%s' (content_id=%s)",
|
|
1028
|
-
filename,
|
|
1029
|
-
content.id,
|
|
1030
|
-
)
|
|
1031
|
-
|
|
1032
|
-
return orphan_blocks
|
|
1033
|
-
|
|
1034
922
|
|
|
1035
923
|
def _get_file_type(filename: str) -> CodeInterpreterFileType:
|
|
1036
924
|
mime = guess_type(filename)[0] or ""
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""``unique_toolkit.experimental`` — opt-in surface for experimental services.
|
|
2
|
+
|
|
3
|
+
.. warning::
|
|
4
|
+
|
|
5
|
+
Anything exported from this subpackage is **experimental**. The public API,
|
|
6
|
+
method names, argument shapes, and return types may change at any time and
|
|
7
|
+
are **not** covered by the toolkit's normal stability guarantees. Pin the
|
|
8
|
+
toolkit version if you depend on a specific shape.
|
|
9
|
+
|
|
10
|
+
Currently exposes:
|
|
11
|
+
|
|
12
|
+
- :class:`unique_toolkit.experimental.scheduled_task.ScheduledTasks` — cron-based
|
|
13
|
+
scheduled tasks that trigger assistants on a recurring schedule (wrapper over
|
|
14
|
+
:class:`unique_sdk.ScheduledTask`).
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from unique_toolkit.experimental.scheduled_task import (
|
|
18
|
+
ScheduledTasks as ScheduledTasks,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"ScheduledTasks",
|
|
23
|
+
]
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""``unique_toolkit.experimental.scheduled_task`` — cron-based assistant triggers.
|
|
2
|
+
|
|
3
|
+
.. warning::
|
|
4
|
+
|
|
5
|
+
**Experimental.** This subpackage is exposed under
|
|
6
|
+
:mod:`unique_toolkit.experimental` and its public API may change without
|
|
7
|
+
notice. It is not covered by the toolkit's normal stability guarantees.
|
|
8
|
+
|
|
9
|
+
A thin, typed wrapper around :class:`unique_sdk.ScheduledTask`. The single
|
|
10
|
+
entry point is :class:`ScheduledTasks`; the subpackage also re-exports the
|
|
11
|
+
Pydantic schemas used on responses, plus a :class:`Cron` ``StrEnum`` of
|
|
12
|
+
ready-made cron strings for the most common schedules.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from unique_toolkit.experimental.scheduled_task.cron import Cron as Cron
|
|
16
|
+
from unique_toolkit.experimental.scheduled_task.functions import (
|
|
17
|
+
create_scheduled_task as create_scheduled_task,
|
|
18
|
+
)
|
|
19
|
+
from unique_toolkit.experimental.scheduled_task.functions import (
|
|
20
|
+
create_scheduled_task_async as create_scheduled_task_async,
|
|
21
|
+
)
|
|
22
|
+
from unique_toolkit.experimental.scheduled_task.functions import (
|
|
23
|
+
delete_scheduled_task as delete_scheduled_task,
|
|
24
|
+
)
|
|
25
|
+
from unique_toolkit.experimental.scheduled_task.functions import (
|
|
26
|
+
delete_scheduled_task_async as delete_scheduled_task_async,
|
|
27
|
+
)
|
|
28
|
+
from unique_toolkit.experimental.scheduled_task.functions import (
|
|
29
|
+
get_scheduled_task as get_scheduled_task,
|
|
30
|
+
)
|
|
31
|
+
from unique_toolkit.experimental.scheduled_task.functions import (
|
|
32
|
+
get_scheduled_task_async as get_scheduled_task_async,
|
|
33
|
+
)
|
|
34
|
+
from unique_toolkit.experimental.scheduled_task.functions import (
|
|
35
|
+
list_scheduled_tasks as list_scheduled_tasks,
|
|
36
|
+
)
|
|
37
|
+
from unique_toolkit.experimental.scheduled_task.functions import (
|
|
38
|
+
list_scheduled_tasks_async as list_scheduled_tasks_async,
|
|
39
|
+
)
|
|
40
|
+
from unique_toolkit.experimental.scheduled_task.functions import (
|
|
41
|
+
update_scheduled_task as update_scheduled_task,
|
|
42
|
+
)
|
|
43
|
+
from unique_toolkit.experimental.scheduled_task.functions import (
|
|
44
|
+
update_scheduled_task_async as update_scheduled_task_async,
|
|
45
|
+
)
|
|
46
|
+
from unique_toolkit.experimental.scheduled_task.schemas import (
|
|
47
|
+
DeletedScheduledTask as DeletedScheduledTask,
|
|
48
|
+
)
|
|
49
|
+
from unique_toolkit.experimental.scheduled_task.schemas import (
|
|
50
|
+
ScheduledTask as ScheduledTask,
|
|
51
|
+
)
|
|
52
|
+
from unique_toolkit.experimental.scheduled_task.service import (
|
|
53
|
+
ScheduledTasks as ScheduledTasks,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
__all__ = [
|
|
57
|
+
"Cron",
|
|
58
|
+
"DeletedScheduledTask",
|
|
59
|
+
"ScheduledTask",
|
|
60
|
+
"ScheduledTasks",
|
|
61
|
+
"create_scheduled_task",
|
|
62
|
+
"create_scheduled_task_async",
|
|
63
|
+
"delete_scheduled_task",
|
|
64
|
+
"delete_scheduled_task_async",
|
|
65
|
+
"get_scheduled_task",
|
|
66
|
+
"get_scheduled_task_async",
|
|
67
|
+
"list_scheduled_tasks",
|
|
68
|
+
"list_scheduled_tasks_async",
|
|
69
|
+
"update_scheduled_task",
|
|
70
|
+
"update_scheduled_task_async",
|
|
71
|
+
]
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""Convenience catalogue of 5-field (UTC) cron strings for scheduled tasks.
|
|
2
|
+
|
|
3
|
+
The server stores schedules as plain cron strings. :class:`Cron` is a
|
|
4
|
+
:class:`~enum.StrEnum` of the most common schedules — every member *is* a
|
|
5
|
+
``str``, so you can drop it straight into :meth:`ScheduledTasks.create`
|
|
6
|
+
without any conversion. For schedules that aren't covered, pass a raw cron
|
|
7
|
+
string.
|
|
8
|
+
|
|
9
|
+
.. note::
|
|
10
|
+
|
|
11
|
+
All expressions are interpreted in **UTC** by the server.
|
|
12
|
+
|
|
13
|
+
.. warning::
|
|
14
|
+
|
|
15
|
+
**Experimental.** Ships under :mod:`unique_toolkit.experimental`. API may
|
|
16
|
+
change without notice.
|
|
17
|
+
|
|
18
|
+
Example
|
|
19
|
+
-------
|
|
20
|
+
|
|
21
|
+
>>> from unique_toolkit.experimental.scheduled_task import Cron
|
|
22
|
+
>>> Cron.DAILY_MIDNIGHT
|
|
23
|
+
<Cron.DAILY_MIDNIGHT: '0 0 * * *'>
|
|
24
|
+
>>> str(Cron.DAILY_MIDNIGHT)
|
|
25
|
+
'0 0 * * *'
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
from __future__ import annotations
|
|
29
|
+
|
|
30
|
+
from enum import StrEnum
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class Cron(StrEnum):
|
|
34
|
+
"""Named ready-made 5-field cron expressions (UTC).
|
|
35
|
+
|
|
36
|
+
Each member is a ``str`` subclass, so instances can be passed straight
|
|
37
|
+
through to anything expecting a cron string — including
|
|
38
|
+
:meth:`ScheduledTasks.create`.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
EVERY_MINUTE = "* * * * *"
|
|
42
|
+
"""Fires every minute."""
|
|
43
|
+
|
|
44
|
+
EVERY_FIVE_MINUTES = "*/5 * * * *"
|
|
45
|
+
"""Fires every 5 minutes."""
|
|
46
|
+
|
|
47
|
+
EVERY_FIFTEEN_MINUTES = "*/15 * * * *"
|
|
48
|
+
"""Fires every 15 minutes."""
|
|
49
|
+
|
|
50
|
+
EVERY_THIRTY_MINUTES = "*/30 * * * *"
|
|
51
|
+
"""Fires every 30 minutes."""
|
|
52
|
+
|
|
53
|
+
HOURLY = "0 * * * *"
|
|
54
|
+
"""Fires once an hour on the hour (``:00``)."""
|
|
55
|
+
|
|
56
|
+
DAILY_MIDNIGHT = "0 0 * * *"
|
|
57
|
+
"""Fires once a day at 00:00 UTC."""
|
|
58
|
+
|
|
59
|
+
DAILY_NOON = "0 12 * * *"
|
|
60
|
+
"""Fires once a day at 12:00 UTC."""
|
|
61
|
+
|
|
62
|
+
DAILY_9AM = "0 9 * * *"
|
|
63
|
+
"""Fires once a day at 09:00 UTC."""
|
|
64
|
+
|
|
65
|
+
WEEKDAYS_9AM = "0 9 * * 1-5"
|
|
66
|
+
"""Fires on weekdays (Mon-Fri) at 09:00 UTC."""
|
|
67
|
+
|
|
68
|
+
WEEKDAYS_MIDNIGHT = "0 0 * * 1-5"
|
|
69
|
+
"""Fires on weekdays (Mon-Fri) at 00:00 UTC."""
|
|
70
|
+
|
|
71
|
+
WEEKENDS_MIDNIGHT = "0 0 * * 0,6"
|
|
72
|
+
"""Fires on weekends (Sat & Sun) at 00:00 UTC."""
|
|
73
|
+
|
|
74
|
+
WEEKLY_SUNDAY_MIDNIGHT = "0 0 * * 0"
|
|
75
|
+
"""Fires every Sunday at 00:00 UTC."""
|
|
76
|
+
|
|
77
|
+
WEEKLY_MONDAY_MIDNIGHT = "0 0 * * 1"
|
|
78
|
+
"""Fires every Monday at 00:00 UTC."""
|
|
79
|
+
|
|
80
|
+
MONTHLY_FIRST_MIDNIGHT = "0 0 1 * *"
|
|
81
|
+
"""Fires on the 1st of every month at 00:00 UTC."""
|
|
82
|
+
|
|
83
|
+
MONTHLY_FIFTEENTH_MIDNIGHT = "0 0 15 * *"
|
|
84
|
+
"""Fires on the 15th of every month at 00:00 UTC."""
|
|
85
|
+
|
|
86
|
+
YEARLY_JAN_FIRST = "0 0 1 1 *"
|
|
87
|
+
"""Fires on January 1st at 00:00 UTC."""
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
__all__ = ["Cron"]
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"""Low-level function wrappers around :class:`unique_sdk.ScheduledTask`.
|
|
2
|
+
|
|
3
|
+
Each SDK operation gets a ``<verb>`` and ``<verb>_async`` pair. The functions
|
|
4
|
+
take ``user_id`` and ``company_id`` as the first two positional arguments (the
|
|
5
|
+
acting user's credentials) and return toolkit Pydantic models — SDK
|
|
6
|
+
``TypedDict``\\s never leak out of this module.
|
|
7
|
+
|
|
8
|
+
Notes on update semantics
|
|
9
|
+
-------------------------
|
|
10
|
+
|
|
11
|
+
:func:`update_scheduled_task` / :func:`update_scheduled_task_async` support two
|
|
12
|
+
mutually-exclusive intents for :attr:`chat_id`:
|
|
13
|
+
|
|
14
|
+
- Pass ``chat_id="chat_…"`` to repoint the task at a different chat.
|
|
15
|
+
- Pass ``clear_chat_id=True`` to drop the current link (the SDK sends
|
|
16
|
+
``chatId=None`` on the wire; the server then spawns a fresh chat on every
|
|
17
|
+
trigger).
|
|
18
|
+
- Omit both to leave the current chat setting untouched.
|
|
19
|
+
|
|
20
|
+
Mixing them raises :class:`TypeError` before the SDK call.
|
|
21
|
+
|
|
22
|
+
.. warning::
|
|
23
|
+
|
|
24
|
+
**Experimental.** Lives under :mod:`unique_toolkit.experimental`. The API
|
|
25
|
+
may change without notice.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
from __future__ import annotations
|
|
29
|
+
|
|
30
|
+
import asyncio
|
|
31
|
+
from typing import Any
|
|
32
|
+
|
|
33
|
+
import unique_sdk
|
|
34
|
+
|
|
35
|
+
from unique_toolkit.experimental.scheduled_task.schemas import (
|
|
36
|
+
DeletedScheduledTask,
|
|
37
|
+
ScheduledTask,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def create_scheduled_task(
|
|
42
|
+
user_id: str,
|
|
43
|
+
company_id: str,
|
|
44
|
+
*,
|
|
45
|
+
cron_expression: str,
|
|
46
|
+
assistant_id: str,
|
|
47
|
+
prompt: str,
|
|
48
|
+
enabled: bool = True,
|
|
49
|
+
chat_id: str | None = None,
|
|
50
|
+
) -> ScheduledTask:
|
|
51
|
+
"""Create a new cron-based scheduled task.
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
user_id: Acting user (SDK requirement).
|
|
55
|
+
company_id: Owning company (SDK requirement).
|
|
56
|
+
cron_expression: 5-field UTC cron expression (``"m h dom mon dow"``).
|
|
57
|
+
assistant_id: Assistant id to execute on every trigger.
|
|
58
|
+
prompt: Prompt text sent to the assistant on each run.
|
|
59
|
+
enabled: Whether the task is active from creation. Defaults to
|
|
60
|
+
``True`` so tasks fire as soon as they are registered; pass
|
|
61
|
+
``False`` to stage a task that can be enabled later via
|
|
62
|
+
:func:`update_scheduled_task`.
|
|
63
|
+
chat_id: Optional chat to continue; ``None`` (default) means a fresh
|
|
64
|
+
chat is created every run.
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
The created :class:`ScheduledTask` as echoed by the server.
|
|
68
|
+
"""
|
|
69
|
+
params: dict[str, Any] = {
|
|
70
|
+
"cronExpression": cron_expression,
|
|
71
|
+
"assistantId": assistant_id,
|
|
72
|
+
"prompt": prompt,
|
|
73
|
+
"enabled": enabled,
|
|
74
|
+
}
|
|
75
|
+
if chat_id is not None:
|
|
76
|
+
params["chatId"] = chat_id
|
|
77
|
+
|
|
78
|
+
payload = unique_sdk.ScheduledTask.create(
|
|
79
|
+
user_id=user_id,
|
|
80
|
+
company_id=company_id,
|
|
81
|
+
**params,
|
|
82
|
+
)
|
|
83
|
+
return ScheduledTask.model_validate(payload, by_alias=True, by_name=True)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
async def create_scheduled_task_async(
|
|
87
|
+
user_id: str,
|
|
88
|
+
company_id: str,
|
|
89
|
+
*,
|
|
90
|
+
cron_expression: str,
|
|
91
|
+
assistant_id: str,
|
|
92
|
+
prompt: str,
|
|
93
|
+
enabled: bool = True,
|
|
94
|
+
chat_id: str | None = None,
|
|
95
|
+
) -> ScheduledTask:
|
|
96
|
+
"""Async :func:`create_scheduled_task`."""
|
|
97
|
+
params: dict[str, Any] = {
|
|
98
|
+
"cronExpression": cron_expression,
|
|
99
|
+
"assistantId": assistant_id,
|
|
100
|
+
"prompt": prompt,
|
|
101
|
+
"enabled": enabled,
|
|
102
|
+
}
|
|
103
|
+
if chat_id is not None:
|
|
104
|
+
params["chatId"] = chat_id
|
|
105
|
+
|
|
106
|
+
payload = await unique_sdk.ScheduledTask.create_async(
|
|
107
|
+
user_id=user_id,
|
|
108
|
+
company_id=company_id,
|
|
109
|
+
**params,
|
|
110
|
+
)
|
|
111
|
+
return ScheduledTask.model_validate(payload, by_alias=True, by_name=True)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def list_scheduled_tasks(user_id: str, company_id: str) -> list[ScheduledTask]:
|
|
115
|
+
"""List every scheduled task visible to the acting user."""
|
|
116
|
+
result = unique_sdk.ScheduledTask.list(user_id=user_id, company_id=company_id)
|
|
117
|
+
return [
|
|
118
|
+
ScheduledTask.model_validate(task, by_alias=True, by_name=True)
|
|
119
|
+
for task in result
|
|
120
|
+
]
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
async def list_scheduled_tasks_async(
|
|
124
|
+
user_id: str, company_id: str
|
|
125
|
+
) -> list[ScheduledTask]:
|
|
126
|
+
"""Async :func:`list_scheduled_tasks`."""
|
|
127
|
+
result = await unique_sdk.ScheduledTask.list_async(
|
|
128
|
+
user_id=user_id, company_id=company_id
|
|
129
|
+
)
|
|
130
|
+
return [
|
|
131
|
+
ScheduledTask.model_validate(task, by_alias=True, by_name=True)
|
|
132
|
+
for task in result
|
|
133
|
+
]
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def get_scheduled_task(
|
|
137
|
+
user_id: str,
|
|
138
|
+
company_id: str,
|
|
139
|
+
*,
|
|
140
|
+
task_id: str,
|
|
141
|
+
) -> ScheduledTask:
|
|
142
|
+
"""Fetch the full detail of a single scheduled task by id."""
|
|
143
|
+
payload = unique_sdk.ScheduledTask.retrieve(
|
|
144
|
+
user_id=user_id,
|
|
145
|
+
company_id=company_id,
|
|
146
|
+
id=task_id,
|
|
147
|
+
)
|
|
148
|
+
return ScheduledTask.model_validate(payload, by_alias=True, by_name=True)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
async def get_scheduled_task_async(
|
|
152
|
+
user_id: str,
|
|
153
|
+
company_id: str,
|
|
154
|
+
*,
|
|
155
|
+
task_id: str,
|
|
156
|
+
) -> ScheduledTask:
|
|
157
|
+
"""Async :func:`get_scheduled_task`."""
|
|
158
|
+
payload = await unique_sdk.ScheduledTask.retrieve_async(
|
|
159
|
+
user_id=user_id,
|
|
160
|
+
company_id=company_id,
|
|
161
|
+
id=task_id,
|
|
162
|
+
)
|
|
163
|
+
return ScheduledTask.model_validate(payload, by_alias=True, by_name=True)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def update_scheduled_task(
|
|
167
|
+
user_id: str,
|
|
168
|
+
company_id: str,
|
|
169
|
+
*,
|
|
170
|
+
task_id: str,
|
|
171
|
+
cron_expression: str | None = None,
|
|
172
|
+
assistant_id: str | None = None,
|
|
173
|
+
prompt: str | None = None,
|
|
174
|
+
chat_id: str | None = None,
|
|
175
|
+
clear_chat_id: bool = False,
|
|
176
|
+
enabled: bool | None = None,
|
|
177
|
+
) -> ScheduledTask:
|
|
178
|
+
"""Update an existing scheduled task (server-side partial update).
|
|
179
|
+
|
|
180
|
+
Only the keyword arguments you pass are sent to the API; everything else is
|
|
181
|
+
left untouched. Pass ``clear_chat_id=True`` to remove the current chat link
|
|
182
|
+
(``chatId=None`` on the wire) — the server will then spin up a brand-new
|
|
183
|
+
chat on every future trigger.
|
|
184
|
+
|
|
185
|
+
Raises:
|
|
186
|
+
TypeError: If ``chat_id`` and ``clear_chat_id=True`` are combined.
|
|
187
|
+
"""
|
|
188
|
+
params = _build_update_params(
|
|
189
|
+
cron_expression=cron_expression,
|
|
190
|
+
assistant_id=assistant_id,
|
|
191
|
+
prompt=prompt,
|
|
192
|
+
chat_id=chat_id,
|
|
193
|
+
clear_chat_id=clear_chat_id,
|
|
194
|
+
enabled=enabled,
|
|
195
|
+
)
|
|
196
|
+
payload = unique_sdk.ScheduledTask.modify(
|
|
197
|
+
user_id=user_id,
|
|
198
|
+
company_id=company_id,
|
|
199
|
+
id=task_id,
|
|
200
|
+
**params,
|
|
201
|
+
)
|
|
202
|
+
return ScheduledTask.model_validate(payload, by_alias=True, by_name=True)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
async def update_scheduled_task_async(
|
|
206
|
+
user_id: str,
|
|
207
|
+
company_id: str,
|
|
208
|
+
*,
|
|
209
|
+
task_id: str,
|
|
210
|
+
cron_expression: str | None = None,
|
|
211
|
+
assistant_id: str | None = None,
|
|
212
|
+
prompt: str | None = None,
|
|
213
|
+
chat_id: str | None = None,
|
|
214
|
+
clear_chat_id: bool = False,
|
|
215
|
+
enabled: bool | None = None,
|
|
216
|
+
) -> ScheduledTask:
|
|
217
|
+
"""Async :func:`update_scheduled_task`."""
|
|
218
|
+
params = _build_update_params(
|
|
219
|
+
cron_expression=cron_expression,
|
|
220
|
+
assistant_id=assistant_id,
|
|
221
|
+
prompt=prompt,
|
|
222
|
+
chat_id=chat_id,
|
|
223
|
+
clear_chat_id=clear_chat_id,
|
|
224
|
+
enabled=enabled,
|
|
225
|
+
)
|
|
226
|
+
payload = await unique_sdk.ScheduledTask.modify_async(
|
|
227
|
+
user_id=user_id,
|
|
228
|
+
company_id=company_id,
|
|
229
|
+
id=task_id,
|
|
230
|
+
**params,
|
|
231
|
+
)
|
|
232
|
+
return ScheduledTask.model_validate(payload, by_alias=True, by_name=True)
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def delete_scheduled_task(
|
|
236
|
+
user_id: str,
|
|
237
|
+
company_id: str,
|
|
238
|
+
*,
|
|
239
|
+
task_id: str,
|
|
240
|
+
) -> DeletedScheduledTask:
|
|
241
|
+
"""Permanently delete a scheduled task. This action cannot be undone."""
|
|
242
|
+
payload = unique_sdk.ScheduledTask.delete(
|
|
243
|
+
user_id=user_id,
|
|
244
|
+
company_id=company_id,
|
|
245
|
+
id=task_id,
|
|
246
|
+
)
|
|
247
|
+
return DeletedScheduledTask.model_validate(payload, by_alias=True, by_name=True)
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
async def delete_scheduled_task_async(
|
|
251
|
+
user_id: str,
|
|
252
|
+
company_id: str,
|
|
253
|
+
*,
|
|
254
|
+
task_id: str,
|
|
255
|
+
) -> DeletedScheduledTask:
|
|
256
|
+
"""Async :func:`delete_scheduled_task`.
|
|
257
|
+
|
|
258
|
+
Falls back to :func:`asyncio.to_thread` if the SDK method does not provide
|
|
259
|
+
an ``_async`` variant, so the event loop is never blocked.
|
|
260
|
+
"""
|
|
261
|
+
sdk_async = getattr(unique_sdk.ScheduledTask, "delete_async", None)
|
|
262
|
+
if sdk_async is None:
|
|
263
|
+
return await asyncio.to_thread(
|
|
264
|
+
delete_scheduled_task,
|
|
265
|
+
user_id,
|
|
266
|
+
company_id,
|
|
267
|
+
task_id=task_id,
|
|
268
|
+
)
|
|
269
|
+
payload = await sdk_async(
|
|
270
|
+
user_id=user_id,
|
|
271
|
+
company_id=company_id,
|
|
272
|
+
id=task_id,
|
|
273
|
+
)
|
|
274
|
+
return DeletedScheduledTask.model_validate(payload, by_alias=True, by_name=True)
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
def _build_update_params(
|
|
278
|
+
*,
|
|
279
|
+
cron_expression: str | None,
|
|
280
|
+
assistant_id: str | None,
|
|
281
|
+
prompt: str | None,
|
|
282
|
+
chat_id: str | None,
|
|
283
|
+
clear_chat_id: bool,
|
|
284
|
+
enabled: bool | None,
|
|
285
|
+
) -> dict[str, Any]:
|
|
286
|
+
"""Translate toolkit kwargs into the SDK ``ScheduledTask.ModifyParams`` shape.
|
|
287
|
+
|
|
288
|
+
Fields that were not provided are omitted entirely (partial update). The
|
|
289
|
+
``chat_id`` / ``clear_chat_id`` pair is mutually exclusive; passing both is
|
|
290
|
+
a usage error and raises :class:`TypeError` here — never at the SDK layer.
|
|
291
|
+
"""
|
|
292
|
+
if chat_id is not None and clear_chat_id:
|
|
293
|
+
raise TypeError(
|
|
294
|
+
"update_scheduled_task: pass either chat_id= to set a new chat or "
|
|
295
|
+
"clear_chat_id=True to clear it, not both."
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
params: dict[str, Any] = {}
|
|
299
|
+
if cron_expression is not None:
|
|
300
|
+
params["cronExpression"] = cron_expression
|
|
301
|
+
if assistant_id is not None:
|
|
302
|
+
params["assistantId"] = assistant_id
|
|
303
|
+
if prompt is not None:
|
|
304
|
+
params["prompt"] = prompt
|
|
305
|
+
if chat_id is not None:
|
|
306
|
+
params["chatId"] = chat_id
|
|
307
|
+
elif clear_chat_id:
|
|
308
|
+
params["chatId"] = None
|
|
309
|
+
if enabled is not None:
|
|
310
|
+
params["enabled"] = enabled
|
|
311
|
+
return params
|