unique-toolkit 1.50.2__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.50.2/PKG-INFO +129 -0
- unique_toolkit-1.50.2/README.md +86 -0
- unique_toolkit-1.50.2/pyproject.toml +129 -0
- unique_toolkit-1.50.2/unique_toolkit/__init__.py +83 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/__init__.py +1 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/_base_service.py +10 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/_time_utils.py +5 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/api_calling/human_verification_manager.py +357 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/base_model_type_attribute.py +303 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/chunk_relevancy_sorter/config.py +51 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/chunk_relevancy_sorter/exception.py +5 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/chunk_relevancy_sorter/schemas.py +46 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/chunk_relevancy_sorter/service.py +387 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/chunk_relevancy_sorter/tests/test_service.py +275 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/config_checker/README.md +418 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/config_checker/__init__.py +42 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/config_checker/__main__.py +6 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/config_checker/cli.py +319 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/config_checker/differ.py +178 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/config_checker/exporter.py +195 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/config_checker/models.py +52 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/config_checker/registry.py +201 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/config_checker/validator.py +303 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/default_language_model.py +15 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/docx_generator/__init__.py +13 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/docx_generator/config.py +12 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/docx_generator/pandoc_converter.py +58 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/docx_generator/schemas.py +73 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/docx_generator/service.py +216 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/docx_generator/template/Doc Template.docx +0 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/endpoint_builder.py +368 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/endpoint_requestor.py +480 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/event_bus.py +102 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/exception.py +57 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/execution.py +286 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/endpoint_builder.py +368 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/endpoint_requestor.py +488 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/README.md +848 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/__init__.py +22 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/agent.py +170 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/config.py +42 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/examples/data.csv +13 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/examples/example_usage.py +78 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/schemas.py +36 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/__init__.py +13 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/dataframe_handler/__init__.py +19 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/dataframe_handler/exceptions.py +29 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/dataframe_handler/service.py +150 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/dataframe_handler/utils.py +130 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/__init__.py +27 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/config.py +56 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/exceptions.py +79 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/prompts/config.py +34 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/prompts/system_prompt.j2 +15 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/prompts/user_prompt.j2 +21 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/generation_handler/service.py +355 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/template_handler/__init__.py +29 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/template_handler/default_template.j2 +37 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/template_handler/exceptions.py +39 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/template_handler/service.py +191 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/services/template_handler/utils.py +182 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/experimental/write_up_agent/utils.py +24 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/feature_flags/schema.py +9 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/pydantic/rjsf_tags.py +1072 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/pydantic_helpers.py +174 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/referencing.py +53 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/string_utilities.py +140 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/tests/test_referencing.py +521 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/tests/test_string_utilities.py +506 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/token/__init__.py +17 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/token/image_token_counting.py +67 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/token/token_counting.py +225 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/token/tokenizers/deepseek/tokenizer.json +263174 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/token/tokenizers/qwen/tokenizer.json +303282 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/utils/__init__.py +1 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/utils/files.py +126 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/utils/image/encode.py +25 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/utils/jinja/helpers.py +10 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/utils/jinja/render.py +18 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/utils/jinja/schema.py +65 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/utils/jinja/utils.py +80 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/utils/structured_output/__init__.py +1 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/utils/structured_output/schema.py +5 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/utils/write_configuration.py +51 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/validate_required_values.py +21 -0
- unique_toolkit-1.50.2/unique_toolkit/_common/validators.py +96 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/__init__.py +1 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/debug_info_manager/debug_info_manager.py +35 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/debug_info_manager/test/test_debug_info_manager.py +315 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/config.py +47 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/context_relevancy/prompts/__init__.py +13 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/context_relevancy/prompts/system_prompt.j2 +24 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/context_relevancy/prompts/user_prompt.j2 +15 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/context_relevancy/schema.py +80 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/context_relevancy/service.py +241 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/evaluation_manager.py +218 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/exception.py +5 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/hallucination/constants.py +73 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/hallucination/hallucination_evaluation.py +109 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/hallucination/prompts/__init__.py +13 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/hallucination/prompts/system_prompt.j2 +35 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/hallucination/prompts/user_prompt.j2 +27 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/hallucination/service.py +62 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/hallucination/utils.py +311 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/output_parser.py +48 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/schemas.py +102 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/tests/fixtures.py +102 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/tests/test_config.py +247 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/tests/test_context_relevancy_service.py +273 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/tests/test_hallucination_constants.py +634 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/tests/test_hallucination_utils.py +1009 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/tests/test_output_parser.py +146 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/tests/test_prompt_loaders.py +348 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/evaluation/utils.py +8 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/feature_flags/__init__.py +6 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/feature_flags/feature_flags.py +124 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/history_manager/history_construction_with_contents.py +266 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/history_manager/history_manager.py +254 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/history_manager/loop_token_reducer.py +566 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/history_manager/utils.py +96 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/__init__.py +43 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/_iteration_handler_utils.py +95 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/_responses_iteration_handler_utils.py +63 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/_responses_stream_handler_utils.py +90 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/_stream_handler_utils.py +57 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/base.py +87 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/middleware/__init__.py +11 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/middleware/planning/__init__.py +9 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/middleware/planning/planning.py +94 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/middleware/planning/schema.py +82 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/runners/__init__.py +23 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/runners/basic.py +71 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/runners/qwen/__init__.py +17 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/runners/qwen/helpers.py +48 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/loop_runner/runners/qwen/qwen_runner.py +121 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/message_log_manager/__init__.py +5 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/message_log_manager/service.py +279 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/postprocessor/postprocessor_manager.py +212 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/reference_manager/reference_manager.py +103 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/responses_api/__init__.py +19 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/responses_api/postprocessors/code_display.py +26 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/responses_api/postprocessors/generated_files.py +30 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/responses_api/stream_handler.py +15 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/short_term_memory_manager/persistent_short_term_memory_manager.py +141 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/thinking_manager/thinking_manager.py +103 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/__init__.py +1 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/__init__.py +36 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/config.py +17 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/evaluation/__init__.py +15 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/evaluation/_utils.py +66 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/evaluation/config.py +55 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/evaluation/evaluator.py +260 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/evaluation/summarization_user_message.j2 +9 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/manager.py +55 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/postprocessing/__init__.py +21 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/postprocessing/_display_utils.py +240 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/postprocessing/_ref_utils.py +84 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/postprocessing/config.py +80 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/postprocessing/display.py +264 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/postprocessing/references.py +101 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/postprocessing/test/test_display.py +421 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/postprocessing/test/test_display_utils.py +2103 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/postprocessing/test/test_ref_utils.py +603 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/prompts.py +48 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/response_watcher/__init__.py +6 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/response_watcher/service.py +91 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/tool/__init__.py +4 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/tool/_memory.py +26 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/tool/_schema.py +9 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/tool/config.py +189 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/tool/service.py +513 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/a2a/tool/test/test_service_utils.py +829 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/agent_chunks_hanlder.py +65 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/config.py +128 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/factory.py +44 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/mcp/__init__.py +4 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/mcp/manager.py +71 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/mcp/models.py +28 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/mcp/tool_wrapper.py +391 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/openai_builtin/__init__.py +19 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/openai_builtin/base.py +46 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/__init__.py +21 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/config.py +136 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/postprocessors/__init__.py +15 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/postprocessors/code_display.py +71 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/postprocessors/generated_files.py +355 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/openai_builtin/code_interpreter/service.py +250 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/openai_builtin/manager.py +81 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/schemas.py +149 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/test/test_mcp_manager.py +536 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/test/test_tool_progress_reporter.py +445 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/tool.py +187 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/tool_manager.py +495 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/tool_progress_reporter.py +285 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/utils/__init__.py +0 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/utils/source_handling/__init__.py +0 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/utils/source_handling/schema.py +21 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/utils/source_handling/source_formatting.py +207 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic/tools/utils/source_handling/tests/test_source_formatting.py +216 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic_table/__init__.py +62 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic_table/schemas.py +345 -0
- unique_toolkit-1.50.2/unique_toolkit/agentic_table/service.py +452 -0
- unique_toolkit-1.50.2/unique_toolkit/app/__init__.py +54 -0
- unique_toolkit-1.50.2/unique_toolkit/app/dev_util.py +180 -0
- unique_toolkit-1.50.2/unique_toolkit/app/fast_api_factory.py +139 -0
- unique_toolkit-1.50.2/unique_toolkit/app/init_logging.py +31 -0
- unique_toolkit-1.50.2/unique_toolkit/app/init_sdk.py +72 -0
- unique_toolkit-1.50.2/unique_toolkit/app/performance/async_tasks.py +70 -0
- unique_toolkit-1.50.2/unique_toolkit/app/performance/async_wrapper.py +39 -0
- unique_toolkit-1.50.2/unique_toolkit/app/schemas.py +334 -0
- unique_toolkit-1.50.2/unique_toolkit/app/unique_settings.py +380 -0
- unique_toolkit-1.50.2/unique_toolkit/app/verification.py +112 -0
- unique_toolkit-1.50.2/unique_toolkit/app/webhook.py +77 -0
- unique_toolkit-1.50.2/unique_toolkit/chat/__init__.py +20 -0
- unique_toolkit-1.50.2/unique_toolkit/chat/cancellation.py +176 -0
- unique_toolkit-1.50.2/unique_toolkit/chat/constants.py +3 -0
- unique_toolkit-1.50.2/unique_toolkit/chat/deprecated/service.py +304 -0
- unique_toolkit-1.50.2/unique_toolkit/chat/functions.py +1404 -0
- unique_toolkit-1.50.2/unique_toolkit/chat/rendering.py +34 -0
- unique_toolkit-1.50.2/unique_toolkit/chat/responses_api.py +465 -0
- unique_toolkit-1.50.2/unique_toolkit/chat/schemas.py +239 -0
- unique_toolkit-1.50.2/unique_toolkit/chat/service.py +157 -0
- unique_toolkit-1.50.2/unique_toolkit/chat/state.py +50 -0
- unique_toolkit-1.50.2/unique_toolkit/chat/utils.py +34 -0
- unique_toolkit-1.50.2/unique_toolkit/content/__init__.py +38 -0
- unique_toolkit-1.50.2/unique_toolkit/content/constants.py +2 -0
- unique_toolkit-1.50.2/unique_toolkit/content/functions.py +969 -0
- unique_toolkit-1.50.2/unique_toolkit/content/schemas.py +219 -0
- unique_toolkit-1.50.2/unique_toolkit/content/service.py +802 -0
- unique_toolkit-1.50.2/unique_toolkit/content/smart_rules.py +301 -0
- unique_toolkit-1.50.2/unique_toolkit/content/utils.py +244 -0
- unique_toolkit-1.50.2/unique_toolkit/data_extraction/README.md +96 -0
- unique_toolkit-1.50.2/unique_toolkit/data_extraction/__init__.py +11 -0
- unique_toolkit-1.50.2/unique_toolkit/data_extraction/augmented/__init__.py +5 -0
- unique_toolkit-1.50.2/unique_toolkit/data_extraction/augmented/service.py +93 -0
- unique_toolkit-1.50.2/unique_toolkit/data_extraction/base.py +25 -0
- unique_toolkit-1.50.2/unique_toolkit/data_extraction/basic/__init__.py +11 -0
- unique_toolkit-1.50.2/unique_toolkit/data_extraction/basic/config.py +18 -0
- unique_toolkit-1.50.2/unique_toolkit/data_extraction/basic/prompt.py +13 -0
- unique_toolkit-1.50.2/unique_toolkit/data_extraction/basic/service.py +55 -0
- unique_toolkit-1.50.2/unique_toolkit/elicitation/__init__.py +37 -0
- unique_toolkit-1.50.2/unique_toolkit/elicitation/constants.py +1 -0
- unique_toolkit-1.50.2/unique_toolkit/elicitation/exceptions.py +99 -0
- unique_toolkit-1.50.2/unique_toolkit/elicitation/functions.py +367 -0
- unique_toolkit-1.50.2/unique_toolkit/elicitation/schemas.py +179 -0
- unique_toolkit-1.50.2/unique_toolkit/elicitation/service.py +330 -0
- unique_toolkit-1.50.2/unique_toolkit/embedding/__init__.py +8 -0
- unique_toolkit-1.50.2/unique_toolkit/embedding/constants.py +2 -0
- unique_toolkit-1.50.2/unique_toolkit/embedding/functions.py +79 -0
- unique_toolkit-1.50.2/unique_toolkit/embedding/schemas.py +5 -0
- unique_toolkit-1.50.2/unique_toolkit/embedding/service.py +187 -0
- unique_toolkit-1.50.2/unique_toolkit/embedding/utils.py +11 -0
- unique_toolkit-1.50.2/unique_toolkit/framework_utilities/__init__.py +1 -0
- unique_toolkit-1.50.2/unique_toolkit/framework_utilities/langchain/__init__.py +10 -0
- unique_toolkit-1.50.2/unique_toolkit/framework_utilities/langchain/client.py +71 -0
- unique_toolkit-1.50.2/unique_toolkit/framework_utilities/langchain/history.py +19 -0
- unique_toolkit-1.50.2/unique_toolkit/framework_utilities/openai/__init__.py +6 -0
- unique_toolkit-1.50.2/unique_toolkit/framework_utilities/openai/client.py +84 -0
- unique_toolkit-1.50.2/unique_toolkit/framework_utilities/openai/message_builder.py +229 -0
- unique_toolkit-1.50.2/unique_toolkit/framework_utilities/utils.py +23 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/__init__.py +79 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/_responses_api_utils.py +93 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/builder.py +103 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/constants.py +4 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/default_language_model.py +37 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/functions.py +672 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/infos.py +2176 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/prompt.py +124 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/reference.py +244 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/schemas.py +726 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/service.py +358 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/stream_transform.py +82 -0
- unique_toolkit-1.50.2/unique_toolkit/language_model/utils.py +68 -0
- unique_toolkit-1.50.2/unique_toolkit/protocols/support.py +145 -0
- unique_toolkit-1.50.2/unique_toolkit/services/__init__.py +7 -0
- unique_toolkit-1.50.2/unique_toolkit/services/chat_service.py +2182 -0
- unique_toolkit-1.50.2/unique_toolkit/services/knowledge_base.py +1120 -0
- unique_toolkit-1.50.2/unique_toolkit/short_term_memory/__init__.py +5 -0
- unique_toolkit-1.50.2/unique_toolkit/short_term_memory/constants.py +1 -0
- unique_toolkit-1.50.2/unique_toolkit/short_term_memory/functions.py +297 -0
- unique_toolkit-1.50.2/unique_toolkit/short_term_memory/schemas.py +54 -0
- unique_toolkit-1.50.2/unique_toolkit/short_term_memory/service.py +322 -0
- unique_toolkit-1.50.2/unique_toolkit/smart_rules/__init__.py +0 -0
- unique_toolkit-1.50.2/unique_toolkit/smart_rules/compile.py +56 -0
- unique_toolkit-1.50.2/unique_toolkit/test_utilities/events.py +199 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: unique-toolkit
|
|
3
|
+
Version: 1.50.2
|
|
4
|
+
Summary:
|
|
5
|
+
Author: Cedric Klinkert, Martin Fadler, Sadique Sheik, Fabian Schläpfer, Pascal Hauri, Ejiroghene Oki-Peter, Rami Azouz, Ricardo Visini, Sanzio Monti
|
|
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>
|
|
7
|
+
License: Proprietary
|
|
8
|
+
Requires-Dist: typing-extensions>=4.9.0,<5
|
|
9
|
+
Requires-Dist: pydantic>=2.11.0,<3
|
|
10
|
+
Requires-Dist: pyhumps>=3.8.0,<4
|
|
11
|
+
Requires-Dist: numpy>=2.4.2,<3
|
|
12
|
+
Requires-Dist: tiktoken>=0.12.0,<0.13
|
|
13
|
+
Requires-Dist: tokenizers>=0.21.0,<0.22
|
|
14
|
+
Requires-Dist: pydantic-settings>=2.10.1,<3
|
|
15
|
+
Requires-Dist: sseclient>=0.0.27,<0.0.28
|
|
16
|
+
Requires-Dist: openai>=1.105.0,<2
|
|
17
|
+
Requires-Dist: platformdirs>=4.0.0,<5
|
|
18
|
+
Requires-Dist: pillow>=12.1.1
|
|
19
|
+
Requires-Dist: unique-sdk>=0.10.80,<0.11
|
|
20
|
+
Requires-Dist: jambo>=0.1.2,<0.2
|
|
21
|
+
Requires-Dist: jinja2>=3.1.6,<4
|
|
22
|
+
Requires-Dist: docxtpl>=0.20.1,<0.21
|
|
23
|
+
Requires-Dist: markdown-it-py>=4.0.0,<5
|
|
24
|
+
Requires-Dist: python-docx>=1.1.0,<2
|
|
25
|
+
Requires-Dist: requests>=2.32.0,<3
|
|
26
|
+
Requires-Dist: httpx>=0.28.0,<0.29
|
|
27
|
+
Requires-Dist: aiohttp>=3.12.0,<4
|
|
28
|
+
Requires-Dist: pandas>=2.3.0,<3
|
|
29
|
+
Requires-Dist: click>=8.1.0,<9
|
|
30
|
+
Requires-Dist: deepdiff>=8.6.1,<9
|
|
31
|
+
Requires-Dist: pypandoc>=1.16.2,<2
|
|
32
|
+
Requires-Dist: fastapi>=0.121.0,<0.122 ; extra == 'fastapi'
|
|
33
|
+
Requires-Dist: starlette>=0.49.1 ; extra == 'fastapi'
|
|
34
|
+
Requires-Dist: uvicorn>=0.37.0,<0.38 ; extra == 'fastapi'
|
|
35
|
+
Requires-Dist: openai>=1.105.0,<2 ; extra == 'langchain'
|
|
36
|
+
Requires-Dist: langchain>=0.3.27,<0.4 ; extra == 'langchain'
|
|
37
|
+
Requires-Dist: langchain-openai>=0.3.28,<0.4 ; extra == 'langchain'
|
|
38
|
+
Requires-Dist: langchain-core>=0.3.0,<0.4 ; extra == 'langchain'
|
|
39
|
+
Requires-Python: >=3.12
|
|
40
|
+
Provides-Extra: fastapi
|
|
41
|
+
Provides-Extra: langchain
|
|
42
|
+
Description-Content-Type: text/markdown
|
|
43
|
+
|
|
44
|
+
# Unique Toolkit
|
|
45
|
+
|
|
46
|
+
This package provides highlevel abstractions and methods on top of `unique_sdk` to ease application development for the Unique Platform.
|
|
47
|
+
|
|
48
|
+
The Toolkit is structured along the following domains:
|
|
49
|
+
- `unique_toolkit.chat`
|
|
50
|
+
- `unique_toolkit.content`
|
|
51
|
+
- `unique_toolkit.embedding`
|
|
52
|
+
- `unique_toolkit.language_model`
|
|
53
|
+
- `unique_toolkit.short_term_memory`
|
|
54
|
+
|
|
55
|
+
Each domain comprises a set of schemas (in `schemas.py`) are used in functions (in `functions.py`) which encapsulates the basic functionalities to interact with the plattform.
|
|
56
|
+
The above domains represent the internal structure of the Unique platform.
|
|
57
|
+
|
|
58
|
+
For the `developers` we expose interfaces via `services` classes that correspond directly to an frontend or an entity the `user` interacts with.
|
|
59
|
+
|
|
60
|
+
The following services are currently available:
|
|
61
|
+
|
|
62
|
+
| Service | Responsability |
|
|
63
|
+
|--|--|
|
|
64
|
+
| ChatService | All interactions with the chat interface |
|
|
65
|
+
| KnowledgeBaseService | All interaction with the knowledgebase |
|
|
66
|
+
|
|
67
|
+
The services can be directly import as
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
from unique_toolkit import ChatService, KnowledgeBaseService
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
In addition, the `unique_toolkit.app` module provides functions to initialize apps and dev utilities to interact with the Unique platform.
|
|
74
|
+
|
|
75
|
+
## Changelog
|
|
76
|
+
|
|
77
|
+
See the [CHANGELOG.md](https://github.com/Unique-AG/ai/blob/main/unique_toolkit/CHANGELOG.md) file for details on changes and version history.
|
|
78
|
+
|
|
79
|
+
# Domains
|
|
80
|
+
|
|
81
|
+
## App
|
|
82
|
+
|
|
83
|
+
The `unique_toolkit.app` module encompasses functions for initializing and securing apps that will interact with the Unique platform.
|
|
84
|
+
|
|
85
|
+
- `init_logging.py` can be used to initalize the logger either with unique dictConfig or an any other dictConfig.
|
|
86
|
+
- `init_sdk.py` can be used to initialize the sdk using the correct env variables and retrieving the endpoint secret.
|
|
87
|
+
- `schemas.py` contains the Event schema which can be used to parse and validate the unique.chat.external-module.chosen event.
|
|
88
|
+
- `verification.py` can be used to verify the endpoint secret and construct the event.
|
|
89
|
+
|
|
90
|
+
## Chat
|
|
91
|
+
|
|
92
|
+
The `unique_toolkit.chat` module encompasses all chat related functionality.
|
|
93
|
+
|
|
94
|
+
- `functions.py` comprises the functions to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message.
|
|
95
|
+
- `schemas.py` comprises all relevant schemas, e.g., ChatMessage, used in the ChatService.
|
|
96
|
+
- `utils.py` comprises utility functions to use and convert ChatMessage objects in assistants, e.g., convert_chat_history_to_injectable_string converts the chat history to a string that can be injected into a prompt.
|
|
97
|
+
|
|
98
|
+
## Content
|
|
99
|
+
|
|
100
|
+
The `unique_toolkit.content` module encompasses all content related functionality. Content can be any type of textual data that is stored in the Knowledgebase on the Unique platform. During the ingestion of the content, the content is parsed, split in chunks, indexed, and stored in the database.
|
|
101
|
+
|
|
102
|
+
- `functions.py` comprises the functions to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message.
|
|
103
|
+
- `schemas.py` comprises all relevant schemas, e.g., Content and ContentChunk, used in the ContentService.
|
|
104
|
+
- `utils.py` comprise utility functions to manipulate Content and ContentChunk objects, e.g., sort_content_chunks and merge_content_chunks.
|
|
105
|
+
|
|
106
|
+
## Embedding (To be Deprecated)
|
|
107
|
+
|
|
108
|
+
The `unique_toolkit.embedding` module encompasses all embedding related functionality. Embeddings are used to represent textual data in a high-dimensional space. The embeddings can be used to calculate the similarity between two texts, for instance.
|
|
109
|
+
|
|
110
|
+
- `functions.py` comprises the functions to embed text and calculate the similarity between two texts.
|
|
111
|
+
- `service.py` encompasses the EmbeddingService and provides an interface to interact with the embeddings, e.g., embed text and calculate the similarity between two texts.
|
|
112
|
+
- `schemas.py` comprises all relevant schemas, e.g., Embeddings, used in the EmbeddingService.
|
|
113
|
+
|
|
114
|
+
## Language Model
|
|
115
|
+
|
|
116
|
+
The `unique_toolkit.language_model` module encompasses all language model related functionality and information on the different language models deployed through the
|
|
117
|
+
Unique platform.
|
|
118
|
+
|
|
119
|
+
- `infos.py` comprises the information on all language models deployed through the Unique platform. We recommend to use the LanguageModel class, initialized with the LanguageModelName, e.g., LanguageModel(LanguageModelName.AZURE_GPT_4o_2024_1120) to get the information on the specific language model like the name, version, token limits or retirement date.
|
|
120
|
+
- `functions.py` comprises the functions to complete and stream complete to chat.
|
|
121
|
+
- `schemas.py` comprises all relevant schemas, e.g., LanguageModelResponse, used in the LanguageModelService.
|
|
122
|
+
- `utils.py` comprises utility functions to parse the output of the language model, e.g., convert_string_to_json finds and parses the last json object in a string.
|
|
123
|
+
|
|
124
|
+
## Short Term Memory
|
|
125
|
+
|
|
126
|
+
The `unique_toolkit.short_term_memory` module encompasses all short term memory related functionality.
|
|
127
|
+
|
|
128
|
+
- `functions.py` comprises the functions to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message.
|
|
129
|
+
- `schemas.py` comprises all relevant schemas, e.g., ShortTermMemory, used in the ShortTermMemoryService.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Unique Toolkit
|
|
2
|
+
|
|
3
|
+
This package provides highlevel abstractions and methods on top of `unique_sdk` to ease application development for the Unique Platform.
|
|
4
|
+
|
|
5
|
+
The Toolkit is structured along the following domains:
|
|
6
|
+
- `unique_toolkit.chat`
|
|
7
|
+
- `unique_toolkit.content`
|
|
8
|
+
- `unique_toolkit.embedding`
|
|
9
|
+
- `unique_toolkit.language_model`
|
|
10
|
+
- `unique_toolkit.short_term_memory`
|
|
11
|
+
|
|
12
|
+
Each domain comprises a set of schemas (in `schemas.py`) are used in functions (in `functions.py`) which encapsulates the basic functionalities to interact with the plattform.
|
|
13
|
+
The above domains represent the internal structure of the Unique platform.
|
|
14
|
+
|
|
15
|
+
For the `developers` we expose interfaces via `services` classes that correspond directly to an frontend or an entity the `user` interacts with.
|
|
16
|
+
|
|
17
|
+
The following services are currently available:
|
|
18
|
+
|
|
19
|
+
| Service | Responsability |
|
|
20
|
+
|--|--|
|
|
21
|
+
| ChatService | All interactions with the chat interface |
|
|
22
|
+
| KnowledgeBaseService | All interaction with the knowledgebase |
|
|
23
|
+
|
|
24
|
+
The services can be directly import as
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
from unique_toolkit import ChatService, KnowledgeBaseService
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
In addition, the `unique_toolkit.app` module provides functions to initialize apps and dev utilities to interact with the Unique platform.
|
|
31
|
+
|
|
32
|
+
## Changelog
|
|
33
|
+
|
|
34
|
+
See the [CHANGELOG.md](https://github.com/Unique-AG/ai/blob/main/unique_toolkit/CHANGELOG.md) file for details on changes and version history.
|
|
35
|
+
|
|
36
|
+
# Domains
|
|
37
|
+
|
|
38
|
+
## App
|
|
39
|
+
|
|
40
|
+
The `unique_toolkit.app` module encompasses functions for initializing and securing apps that will interact with the Unique platform.
|
|
41
|
+
|
|
42
|
+
- `init_logging.py` can be used to initalize the logger either with unique dictConfig or an any other dictConfig.
|
|
43
|
+
- `init_sdk.py` can be used to initialize the sdk using the correct env variables and retrieving the endpoint secret.
|
|
44
|
+
- `schemas.py` contains the Event schema which can be used to parse and validate the unique.chat.external-module.chosen event.
|
|
45
|
+
- `verification.py` can be used to verify the endpoint secret and construct the event.
|
|
46
|
+
|
|
47
|
+
## Chat
|
|
48
|
+
|
|
49
|
+
The `unique_toolkit.chat` module encompasses all chat related functionality.
|
|
50
|
+
|
|
51
|
+
- `functions.py` comprises the functions to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message.
|
|
52
|
+
- `schemas.py` comprises all relevant schemas, e.g., ChatMessage, used in the ChatService.
|
|
53
|
+
- `utils.py` comprises utility functions to use and convert ChatMessage objects in assistants, e.g., convert_chat_history_to_injectable_string converts the chat history to a string that can be injected into a prompt.
|
|
54
|
+
|
|
55
|
+
## Content
|
|
56
|
+
|
|
57
|
+
The `unique_toolkit.content` module encompasses all content related functionality. Content can be any type of textual data that is stored in the Knowledgebase on the Unique platform. During the ingestion of the content, the content is parsed, split in chunks, indexed, and stored in the database.
|
|
58
|
+
|
|
59
|
+
- `functions.py` comprises the functions to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message.
|
|
60
|
+
- `schemas.py` comprises all relevant schemas, e.g., Content and ContentChunk, used in the ContentService.
|
|
61
|
+
- `utils.py` comprise utility functions to manipulate Content and ContentChunk objects, e.g., sort_content_chunks and merge_content_chunks.
|
|
62
|
+
|
|
63
|
+
## Embedding (To be Deprecated)
|
|
64
|
+
|
|
65
|
+
The `unique_toolkit.embedding` module encompasses all embedding related functionality. Embeddings are used to represent textual data in a high-dimensional space. The embeddings can be used to calculate the similarity between two texts, for instance.
|
|
66
|
+
|
|
67
|
+
- `functions.py` comprises the functions to embed text and calculate the similarity between two texts.
|
|
68
|
+
- `service.py` encompasses the EmbeddingService and provides an interface to interact with the embeddings, e.g., embed text and calculate the similarity between two texts.
|
|
69
|
+
- `schemas.py` comprises all relevant schemas, e.g., Embeddings, used in the EmbeddingService.
|
|
70
|
+
|
|
71
|
+
## Language Model
|
|
72
|
+
|
|
73
|
+
The `unique_toolkit.language_model` module encompasses all language model related functionality and information on the different language models deployed through the
|
|
74
|
+
Unique platform.
|
|
75
|
+
|
|
76
|
+
- `infos.py` comprises the information on all language models deployed through the Unique platform. We recommend to use the LanguageModel class, initialized with the LanguageModelName, e.g., LanguageModel(LanguageModelName.AZURE_GPT_4o_2024_1120) to get the information on the specific language model like the name, version, token limits or retirement date.
|
|
77
|
+
- `functions.py` comprises the functions to complete and stream complete to chat.
|
|
78
|
+
- `schemas.py` comprises all relevant schemas, e.g., LanguageModelResponse, used in the LanguageModelService.
|
|
79
|
+
- `utils.py` comprises utility functions to parse the output of the language model, e.g., convert_string_to_json finds and parses the last json object in a string.
|
|
80
|
+
|
|
81
|
+
## Short Term Memory
|
|
82
|
+
|
|
83
|
+
The `unique_toolkit.short_term_memory` module encompasses all short term memory related functionality.
|
|
84
|
+
|
|
85
|
+
- `functions.py` comprises the functions to manage and load the chat history and interact with the chat ui, e.g., creating a new assistant message.
|
|
86
|
+
- `schemas.py` comprises all relevant schemas, e.g., ShortTermMemory, used in the ShortTermMemoryService.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "unique_toolkit"
|
|
3
|
+
version = "1.50.2"
|
|
4
|
+
description = ""
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
|
+
authors = [
|
|
8
|
+
{ name = "Cedric Klinkert", email = "cedric.klinkert@unique.ch" },
|
|
9
|
+
{ name = "Martin Fadler", email = "martin.fadler@unique.ch" },
|
|
10
|
+
{ name = "Sadique Sheik", email = "sadique@unique.ch" },
|
|
11
|
+
{ name = "Fabian Schläpfer", email = "fabian@unique.ch" },
|
|
12
|
+
{ name = "Pascal Hauri", email = "pascal@unique.ch" },
|
|
13
|
+
{ name = "Ejiroghene Oki-Peter", email = "oki-peter.ejiroghene@unique.ai" },
|
|
14
|
+
{ name = "Rami Azouz", email = "rami.ext@unique.ch" },
|
|
15
|
+
{ name = "Ricardo Visini", email = "ricardo.visini@unique.ch" },
|
|
16
|
+
{ name = "Sanzio Monti", email = "sanzio.monti@unique.ai" },
|
|
17
|
+
]
|
|
18
|
+
license = { text = "Proprietary" }
|
|
19
|
+
dependencies = [
|
|
20
|
+
"typing-extensions>=4.9.0,<5",
|
|
21
|
+
"pydantic>=2.11.0,<3",
|
|
22
|
+
"pyhumps>=3.8.0,<4",
|
|
23
|
+
"numpy>=2.4.2,<3",
|
|
24
|
+
"tiktoken>=0.12.0,<0.13",
|
|
25
|
+
"tokenizers>=0.21.0,<0.22",
|
|
26
|
+
"pydantic-settings>=2.10.1,<3",
|
|
27
|
+
"sseclient>=0.0.27,<0.0.28",
|
|
28
|
+
"openai>=1.105.0,<2",
|
|
29
|
+
"platformdirs>=4.0.0,<5",
|
|
30
|
+
"pillow>=12.1.1",
|
|
31
|
+
"unique-sdk>=0.10.80,<0.11",
|
|
32
|
+
"jambo>=0.1.2,<0.2",
|
|
33
|
+
"jinja2>=3.1.6,<4",
|
|
34
|
+
"docxtpl>=0.20.1,<0.21",
|
|
35
|
+
"markdown-it-py>=4.0.0,<5",
|
|
36
|
+
"python-docx>=1.1.0,<2",
|
|
37
|
+
"requests>=2.32.0,<3",
|
|
38
|
+
"httpx>=0.28.0,<0.29",
|
|
39
|
+
"aiohttp>=3.12.0,<4",
|
|
40
|
+
"pandas>=2.3.0,<3",
|
|
41
|
+
"click>=8.1.0,<9",
|
|
42
|
+
"deepdiff>=8.6.1,<9",
|
|
43
|
+
"pypandoc>=1.16.2,<2",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[project.optional-dependencies]
|
|
47
|
+
langchain = [
|
|
48
|
+
"openai>=1.105.0,<2",
|
|
49
|
+
"langchain>=0.3.27,<0.4",
|
|
50
|
+
"langchain-openai>=0.3.28,<0.4",
|
|
51
|
+
"langchain-core>=0.3.0,<0.4",
|
|
52
|
+
]
|
|
53
|
+
fastapi = [
|
|
54
|
+
"fastapi>=0.121.0,<0.122",
|
|
55
|
+
"starlette>=0.49.1",
|
|
56
|
+
"uvicorn>=0.37.0,<0.38",
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
[build-system]
|
|
60
|
+
requires = ["uv_build>=0.8.14,<0.9.0"]
|
|
61
|
+
build-backend = "uv_build"
|
|
62
|
+
|
|
63
|
+
[tool.uv.build-backend]
|
|
64
|
+
module-root = ""
|
|
65
|
+
|
|
66
|
+
[dependency-groups]
|
|
67
|
+
dev = [
|
|
68
|
+
"ruff==0.12.10",
|
|
69
|
+
"pytest>=7.4.3,<8",
|
|
70
|
+
"tox>=4.11.4,<5",
|
|
71
|
+
"pyright>=1.1.341,<2",
|
|
72
|
+
"basedpyright>=1.33.0,<2",
|
|
73
|
+
"pytest-cov>=4.1.0,<5",
|
|
74
|
+
"pre-commit>=3.7.1,<4",
|
|
75
|
+
"pytest-asyncio>=0.23.8,<0.24",
|
|
76
|
+
"pytest-mock>=3.14.0,<4",
|
|
77
|
+
"ipykernel>=6.29.5,<7",
|
|
78
|
+
"deptry>=0.24.0,<0.25",
|
|
79
|
+
"poethepoet>=0.32.0,<0.33",
|
|
80
|
+
"isort>=6.0.1,<7",
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
[tool.uv]
|
|
84
|
+
constraint-dependencies = [
|
|
85
|
+
"starlette>=0.49.1",
|
|
86
|
+
"lxml>=5.0.0",
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
[tool.poe.tasks]
|
|
90
|
+
lint = "ruff check ."
|
|
91
|
+
lint-fix = "ruff check . --fix"
|
|
92
|
+
format = "ruff format ."
|
|
93
|
+
test = "pytest"
|
|
94
|
+
typecheck = "basedpyright"
|
|
95
|
+
depcheck = "deptry ."
|
|
96
|
+
coverage = "pytest --cov=unique_toolkit --cov-report=term-missing"
|
|
97
|
+
ci-typecheck = { shell = "bash $(git rev-parse --show-toplevel)/.github/scripts/dev.sh typecheck" }
|
|
98
|
+
ci-coverage = { shell = "bash $(git rev-parse --show-toplevel)/.github/scripts/dev.sh coverage" }
|
|
99
|
+
|
|
100
|
+
[tool.pytest.ini_options]
|
|
101
|
+
addopts = "--strict-markers"
|
|
102
|
+
asyncio_mode = "auto"
|
|
103
|
+
markers = [
|
|
104
|
+
"ai: AI-generated tests",
|
|
105
|
+
"verified: AI-generated tests with human verification",
|
|
106
|
+
"wip: Work in progress tests"
|
|
107
|
+
]
|
|
108
|
+
filterwarnings = ["ignore::DeprecationWarning"]
|
|
109
|
+
|
|
110
|
+
[tool.deptry]
|
|
111
|
+
known_first_party = ["unique_toolkit"]
|
|
112
|
+
extend_exclude = ["docs", "tests", "unique_toolkit/.*/test", "unique_toolkit/.*/tests"]
|
|
113
|
+
|
|
114
|
+
[tool.deptry.per_rule_ignores]
|
|
115
|
+
DEP002 = ["langchain", "fastapi", "starlette", "uvicorn"]
|
|
116
|
+
DEP004 = ["langchain_openai", "langchain_core"]
|
|
117
|
+
|
|
118
|
+
[tool.ruff]
|
|
119
|
+
target-version = "py312"
|
|
120
|
+
exclude = [".venv", "docs"]
|
|
121
|
+
|
|
122
|
+
[tool.ruff.lint]
|
|
123
|
+
extend-select = ["I"]
|
|
124
|
+
|
|
125
|
+
[tool.basedpyright]
|
|
126
|
+
pythonVersion = "3.12"
|
|
127
|
+
typeCheckingMode = "standard"
|
|
128
|
+
include = ["unique_toolkit"]
|
|
129
|
+
exclude = ["**/tests/**", "**/test_*.py"]
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Re-export commonly used classes for easier imports
|
|
2
|
+
from unique_toolkit.chat import ChatService
|
|
3
|
+
from unique_toolkit.content import ContentService
|
|
4
|
+
from unique_toolkit.data_extraction import (
|
|
5
|
+
StructuredOutputDataExtractor,
|
|
6
|
+
StructuredOutputDataExtractorConfig,
|
|
7
|
+
)
|
|
8
|
+
from unique_toolkit.embedding import EmbeddingService
|
|
9
|
+
from unique_toolkit.framework_utilities.openai.client import (
|
|
10
|
+
get_async_openai_client,
|
|
11
|
+
get_openai_client,
|
|
12
|
+
)
|
|
13
|
+
from unique_toolkit.language_model import (
|
|
14
|
+
LanguageModelMessages,
|
|
15
|
+
LanguageModelName,
|
|
16
|
+
LanguageModelService,
|
|
17
|
+
LanguageModelToolDescription,
|
|
18
|
+
)
|
|
19
|
+
from unique_toolkit.services.knowledge_base import KnowledgeBaseService
|
|
20
|
+
from unique_toolkit.short_term_memory import ShortTermMemoryService
|
|
21
|
+
|
|
22
|
+
# Conditionally import config_checker (requires pydantic-settings)
|
|
23
|
+
try:
|
|
24
|
+
from unique_toolkit._common.config_checker import (
|
|
25
|
+
ConfigDiffer, # noqa: F401, I001
|
|
26
|
+
ConfigEntry, # noqa: F401, I001
|
|
27
|
+
ConfigExporter, # noqa: F401, I001
|
|
28
|
+
ConfigRegistry, # noqa: F401, I001
|
|
29
|
+
ConfigValidator, # noqa: F401, I001
|
|
30
|
+
DefaultChangeReport, # noqa: F401, I001
|
|
31
|
+
ExportManifest, # noqa: F401, I001
|
|
32
|
+
ValidationReport, # noqa: F401, I001
|
|
33
|
+
register_config, # noqa: F401, I001
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
_CONFIG_CHECKER_AVAILABLE = True
|
|
37
|
+
except ImportError:
|
|
38
|
+
_CONFIG_CHECKER_AVAILABLE = False
|
|
39
|
+
|
|
40
|
+
# Conditionally import langchain utilities if langchain is installed
|
|
41
|
+
try:
|
|
42
|
+
from unique_toolkit.framework_utilities.langchain.client import get_langchain_client # noqa: F401, I001
|
|
43
|
+
|
|
44
|
+
_LANGCHAIN_AVAILABLE = True
|
|
45
|
+
except ImportError:
|
|
46
|
+
_LANGCHAIN_AVAILABLE = False
|
|
47
|
+
|
|
48
|
+
# You can add other classes you frequently use here as well
|
|
49
|
+
|
|
50
|
+
__all__ = [
|
|
51
|
+
"ChatService",
|
|
52
|
+
"ContentService",
|
|
53
|
+
"EmbeddingService",
|
|
54
|
+
"get_openai_client",
|
|
55
|
+
"get_async_openai_client",
|
|
56
|
+
"KnowledgeBaseService",
|
|
57
|
+
"LanguageModelMessages",
|
|
58
|
+
"LanguageModelName",
|
|
59
|
+
"LanguageModelService",
|
|
60
|
+
"LanguageModelToolDescription",
|
|
61
|
+
"ShortTermMemoryService",
|
|
62
|
+
"StructuredOutputDataExtractor",
|
|
63
|
+
"StructuredOutputDataExtractorConfig",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
# Add config_checker exports if available
|
|
67
|
+
if _CONFIG_CHECKER_AVAILABLE:
|
|
68
|
+
__all__.extend(
|
|
69
|
+
[
|
|
70
|
+
"ConfigDiffer",
|
|
71
|
+
"ConfigEntry",
|
|
72
|
+
"ConfigExporter",
|
|
73
|
+
"ConfigRegistry",
|
|
74
|
+
"ConfigValidator",
|
|
75
|
+
"DefaultChangeReport",
|
|
76
|
+
"ExportManifest",
|
|
77
|
+
"ValidationReport",
|
|
78
|
+
"register_config",
|
|
79
|
+
]
|
|
80
|
+
)
|
|
81
|
+
# Add langchain-specific exports if available
|
|
82
|
+
if _LANGCHAIN_AVAILABLE:
|
|
83
|
+
__all__.append("get_langchain_client")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Common utilities and shared components."""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
from unique_toolkit.app.schemas import Event
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class BaseService:
|
|
8
|
+
def __init__(self, event: Event, logger: Optional[logging.Logger] = None):
|
|
9
|
+
self.event = event
|
|
10
|
+
self.logger = logger or logging.getLogger(__name__)
|