nvidia-nat 1.2.0rc5__py3-none-any.whl → 1.2.0rc7__py3-none-any.whl
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.
- {aiq → nat}/agent/react_agent/agent.py +12 -12
- {aiq → nat}/agent/react_agent/register.py +20 -20
- {aiq → nat}/agent/reasoning_agent/reasoning_agent.py +14 -14
- {aiq → nat}/agent/rewoo_agent/agent.py +7 -7
- {aiq → nat}/agent/rewoo_agent/prompt.py +11 -12
- {aiq → nat}/agent/rewoo_agent/register.py +47 -49
- {aiq → nat}/agent/tool_calling_agent/agent.py +4 -4
- {aiq → nat}/agent/tool_calling_agent/register.py +8 -8
- {aiq → nat}/authentication/api_key/api_key_auth_provider.py +6 -6
- {aiq → nat}/authentication/api_key/api_key_auth_provider_config.py +5 -5
- {aiq → nat}/authentication/api_key/register.py +4 -4
- {aiq → nat}/authentication/http_basic_auth/http_basic_auth_provider.py +10 -10
- {aiq → nat}/authentication/http_basic_auth/register.py +4 -4
- {aiq → nat}/authentication/interfaces.py +6 -6
- {aiq → nat}/authentication/oauth2/oauth2_auth_code_flow_provider.py +11 -11
- {aiq → nat}/authentication/oauth2/oauth2_auth_code_flow_provider_config.py +1 -1
- {aiq → nat}/authentication/oauth2/register.py +4 -4
- {aiq → nat}/authentication/register.py +3 -3
- {aiq → nat}/builder/builder.py +30 -30
- {aiq → nat}/builder/component_utils.py +23 -23
- {aiq → nat}/builder/context.py +35 -29
- {aiq → nat}/builder/embedder.py +1 -1
- {aiq → nat}/builder/eval_builder.py +13 -13
- {aiq → nat}/builder/evaluator.py +3 -3
- {aiq → nat}/builder/front_end.py +11 -11
- {aiq → nat}/builder/function.py +8 -8
- {aiq → nat}/builder/function_base.py +6 -6
- {aiq → nat}/builder/function_info.py +3 -3
- {aiq → nat}/builder/intermediate_step_manager.py +13 -13
- {aiq → nat}/builder/llm.py +1 -1
- {aiq → nat}/builder/retriever.py +1 -1
- {aiq → nat}/builder/user_interaction_manager.py +14 -10
- {aiq → nat}/builder/workflow.py +25 -25
- {aiq → nat}/builder/workflow_builder.py +86 -86
- {aiq → nat}/cli/cli_utils/config_override.py +2 -2
- {aiq → nat}/cli/cli_utils/validation.py +4 -4
- {aiq → nat}/cli/commands/configure/channel/add.py +2 -2
- {aiq → nat}/cli/commands/configure/channel/channel.py +4 -6
- {aiq → nat}/cli/commands/configure/channel/remove.py +2 -2
- {aiq → nat}/cli/commands/configure/channel/update.py +2 -2
- {aiq → nat}/cli/commands/configure/configure.py +3 -3
- {aiq → nat}/cli/commands/evaluate.py +3 -3
- {aiq → nat}/cli/commands/info/info.py +5 -7
- {aiq → nat}/cli/commands/info/list_channels.py +1 -1
- {aiq → nat}/cli/commands/info/list_components.py +14 -14
- {aiq → nat}/cli/commands/info/list_mcp.py +106 -15
- {aiq → nat}/cli/commands/registry/publish.py +9 -9
- {aiq → nat}/cli/commands/registry/pull.py +10 -10
- {aiq → nat}/cli/commands/registry/registry.py +5 -7
- {aiq → nat}/cli/commands/registry/remove.py +8 -8
- {aiq → nat}/cli/commands/registry/search.py +15 -15
- {aiq → nat}/cli/commands/sizing/calc.py +3 -3
- {aiq → nat}/cli/commands/start.py +15 -15
- {aiq → nat}/cli/commands/uninstall.py +5 -5
- {aiq → nat}/cli/commands/validate.py +1 -1
- {aiq → nat}/cli/commands/workflow/templates/pyproject.toml.j2 +4 -4
- {aiq → nat}/cli/commands/workflow/templates/workflow.py.j2 +4 -4
- {aiq → nat}/cli/commands/workflow/workflow.py +3 -3
- {aiq → nat}/cli/commands/workflow/workflow_commands.py +15 -11
- {aiq → nat}/cli/entrypoint.py +6 -6
- {aiq → nat}/cli/main.py +15 -2
- {aiq → nat}/cli/register_workflow.py +70 -70
- {aiq → nat}/cli/type_registry.py +82 -82
- {aiq → nat}/data_models/api_server.py +121 -99
- {aiq → nat}/data_models/authentication.py +2 -2
- {aiq → nat}/data_models/component.py +5 -1
- {aiq → nat}/data_models/component_ref.py +12 -12
- {aiq → nat}/data_models/config.py +17 -13
- {aiq → nat}/data_models/dataset_handler.py +58 -12
- {aiq → nat}/data_models/discovery_metadata.py +36 -66
- {aiq → nat}/data_models/evaluate.py +9 -9
- {aiq → nat}/data_models/intermediate_step.py +7 -7
- {aiq → nat}/data_models/retriever.py +2 -2
- {aiq → nat}/data_models/span.py +10 -7
- {aiq → nat}/data_models/step_adaptor.py +1 -1
- {aiq → nat}/data_models/telemetry_exporter.py +2 -2
- {aiq → nat}/embedder/nim_embedder.py +5 -5
- {aiq → nat}/embedder/openai_embedder.py +5 -5
- {aiq/retriever → nat/embedder}/register.py +2 -2
- {aiq → nat}/eval/config.py +4 -4
- {aiq → nat}/eval/dataset_handler/dataset_downloader.py +1 -1
- {aiq → nat}/eval/dataset_handler/dataset_filter.py +1 -1
- {aiq → nat}/eval/dataset_handler/dataset_handler.py +127 -14
- {aiq → nat}/eval/evaluate.py +38 -34
- {aiq → nat}/eval/evaluator/base_evaluator.py +9 -5
- {aiq → nat}/eval/evaluator/evaluator_model.py +4 -4
- {aiq → nat}/eval/intermediate_step_adapter.py +2 -2
- {aiq → nat}/eval/rag_evaluator/evaluate.py +8 -8
- {aiq → nat}/eval/rag_evaluator/register.py +7 -7
- {aiq → nat}/eval/remote_workflow.py +8 -8
- {aiq → nat}/eval/runners/config.py +2 -2
- {aiq → nat}/eval/runners/multi_eval_runner.py +4 -4
- {aiq → nat}/eval/runtime_event_subscriber.py +3 -3
- {aiq → nat}/eval/swe_bench_evaluator/evaluate.py +6 -6
- {aiq → nat}/eval/swe_bench_evaluator/register.py +4 -4
- {aiq → nat}/eval/trajectory_evaluator/evaluate.py +5 -5
- {aiq → nat}/eval/trajectory_evaluator/register.py +5 -5
- {aiq → nat}/eval/tunable_rag_evaluator/evaluate.py +3 -3
- {aiq → nat}/eval/tunable_rag_evaluator/register.py +6 -6
- {aiq → nat}/eval/utils/output_uploader.py +1 -1
- {aiq → nat}/eval/utils/weave_eval.py +6 -6
- {aiq → nat}/experimental/decorators/experimental_warning_decorator.py +6 -2
- {aiq → nat}/experimental/test_time_compute/editing/iterative_plan_refinement_editor.py +10 -10
- {aiq → nat}/experimental/test_time_compute/editing/llm_as_a_judge_editor.py +10 -10
- {aiq → nat}/experimental/test_time_compute/editing/motivation_aware_summarization.py +10 -10
- {aiq → nat}/experimental/test_time_compute/functions/execute_score_select_function.py +10 -10
- {aiq → nat}/experimental/test_time_compute/functions/plan_select_execute_function.py +17 -17
- aiq/experimental/test_time_compute/functions/its_tool_orchestration_function.py → nat/experimental/test_time_compute/functions/ttc_tool_orchestration_function.py +12 -12
- aiq/experimental/test_time_compute/functions/its_tool_wrapper_function.py → nat/experimental/test_time_compute/functions/ttc_tool_wrapper_function.py +10 -10
- {aiq → nat}/experimental/test_time_compute/models/editor_config.py +2 -2
- {aiq → nat}/experimental/test_time_compute/models/scoring_config.py +2 -2
- {aiq → nat}/experimental/test_time_compute/models/search_config.py +2 -2
- {aiq → nat}/experimental/test_time_compute/models/selection_config.py +2 -2
- {aiq → nat}/experimental/test_time_compute/models/strategy_base.py +4 -4
- {aiq → nat}/experimental/test_time_compute/register.py +2 -2
- {aiq → nat}/experimental/test_time_compute/scoring/llm_based_agent_scorer.py +11 -11
- {aiq → nat}/experimental/test_time_compute/scoring/llm_based_plan_scorer.py +11 -11
- {aiq → nat}/experimental/test_time_compute/scoring/motivation_aware_scorer.py +10 -10
- {aiq → nat}/experimental/test_time_compute/search/multi_llm_planner.py +10 -10
- {aiq → nat}/experimental/test_time_compute/search/multi_query_retrieval_search.py +10 -10
- {aiq → nat}/experimental/test_time_compute/search/single_shot_multi_plan_planner.py +11 -11
- {aiq → nat}/experimental/test_time_compute/selection/best_of_n_selector.py +7 -7
- {aiq → nat}/experimental/test_time_compute/selection/llm_based_agent_output_selector.py +11 -11
- {aiq → nat}/experimental/test_time_compute/selection/llm_based_output_merging_selector.py +11 -11
- {aiq → nat}/experimental/test_time_compute/selection/llm_based_plan_selector.py +11 -11
- {aiq → nat}/experimental/test_time_compute/selection/threshold_selector.py +7 -7
- {aiq → nat}/front_ends/console/authentication_flow_handler.py +6 -6
- {aiq → nat}/front_ends/console/console_front_end_config.py +2 -2
- {aiq → nat}/front_ends/console/console_front_end_plugin.py +9 -9
- {aiq → nat}/front_ends/console/register.py +5 -5
- {aiq → nat}/front_ends/fastapi/auth_flow_handlers/http_flow_handler.py +4 -4
- {aiq → nat}/front_ends/fastapi/auth_flow_handlers/websocket_flow_handler.py +6 -6
- {aiq → nat}/front_ends/fastapi/fastapi_front_end_config.py +22 -15
- {aiq → nat}/front_ends/fastapi/fastapi_front_end_plugin.py +10 -10
- {aiq → nat}/front_ends/fastapi/fastapi_front_end_plugin_worker.py +110 -115
- {aiq → nat}/front_ends/fastapi/intermediate_steps_subscriber.py +10 -10
- {aiq → nat}/front_ends/fastapi/main.py +8 -8
- {aiq → nat}/front_ends/fastapi/message_handler.py +58 -36
- {aiq → nat}/front_ends/fastapi/message_validator.py +55 -48
- {aiq → nat}/front_ends/fastapi/register.py +5 -5
- {aiq → nat}/front_ends/fastapi/response_helpers.py +26 -26
- {aiq → nat}/front_ends/fastapi/step_adaptor.py +35 -37
- {aiq → nat}/front_ends/mcp/mcp_front_end_config.py +12 -8
- nat/front_ends/mcp/mcp_front_end_plugin.py +81 -0
- nat/front_ends/mcp/mcp_front_end_plugin_worker.py +143 -0
- {aiq → nat}/front_ends/mcp/register.py +5 -5
- {aiq → nat}/front_ends/mcp/tool_converter.py +20 -21
- {aiq → nat}/front_ends/simple_base/simple_front_end_plugin_base.py +6 -6
- {aiq → nat}/llm/aws_bedrock_llm.py +5 -5
- {aiq → nat}/llm/nim_llm.py +5 -5
- {aiq → nat}/llm/openai_llm.py +5 -5
- {aiq → nat}/memory/__init__.py +2 -2
- nat/meta/pypi.md +58 -0
- {aiq → nat}/object_store/__init__.py +2 -2
- {aiq → nat}/object_store/in_memory_object_store.py +6 -6
- {aiq → nat}/observability/exporter/base_exporter.py +9 -9
- {aiq → nat}/observability/exporter/exporter.py +1 -1
- {aiq → nat}/observability/exporter/file_exporter.py +6 -6
- {aiq → nat}/observability/exporter/processing_exporter.py +9 -9
- {aiq → nat}/observability/exporter/raw_exporter.py +4 -4
- {aiq → nat}/observability/exporter/span_exporter.py +57 -34
- {aiq → nat}/observability/exporter_manager.py +6 -6
- {aiq → nat}/observability/mixin/file_mixin.py +2 -2
- {aiq → nat}/observability/processor/batching_processor.py +1 -1
- {aiq → nat}/observability/processor/callback_processor.py +1 -1
- {aiq → nat}/observability/processor/intermediate_step_serializer.py +4 -4
- {aiq → nat}/observability/processor/processor.py +1 -1
- {aiq → nat}/observability/register.py +7 -7
- {aiq → nat}/profiler/calc/calc_runner.py +18 -18
- {aiq → nat}/profiler/calc/calculations.py +3 -3
- {aiq → nat}/profiler/calc/plot.py +2 -2
- {aiq → nat}/profiler/callbacks/agno_callback_handler.py +14 -14
- {aiq → nat}/profiler/callbacks/langchain_callback_handler.py +11 -11
- {aiq → nat}/profiler/callbacks/llama_index_callback_handler.py +12 -12
- {aiq → nat}/profiler/callbacks/semantic_kernel_callback_handler.py +11 -11
- {aiq → nat}/profiler/data_models.py +2 -2
- {aiq → nat}/profiler/decorators/framework_wrapper.py +6 -6
- {aiq → nat}/profiler/decorators/function_tracking.py +10 -10
- {aiq → nat}/profiler/forecasting/model_trainer.py +5 -5
- {aiq → nat}/profiler/forecasting/models/linear_model.py +5 -4
- {aiq → nat}/profiler/forecasting/models/random_forest_regressor.py +5 -4
- {aiq → nat}/profiler/inference_optimization/bottleneck_analysis/nested_stack_analysis.py +7 -7
- {aiq → nat}/profiler/inference_optimization/bottleneck_analysis/simple_stack_analysis.py +4 -4
- {aiq → nat}/profiler/inference_optimization/experimental/concurrency_spike_analysis.py +6 -6
- {aiq → nat}/profiler/inference_optimization/experimental/prefix_span_analysis.py +6 -6
- {aiq → nat}/profiler/inference_optimization/llm_metrics.py +2 -2
- {aiq → nat}/profiler/inference_optimization/prompt_caching.py +5 -5
- {aiq → nat}/profiler/inference_optimization/token_uniqueness.py +4 -4
- {aiq → nat}/profiler/inference_optimization/workflow_runtimes.py +3 -3
- {aiq → nat}/profiler/intermediate_property_adapter.py +3 -3
- {aiq → nat}/profiler/profile_runner.py +17 -17
- {aiq → nat}/profiler/utils.py +4 -4
- {aiq → nat}/registry_handlers/local/local_handler.py +19 -19
- {aiq → nat}/registry_handlers/local/register_local.py +4 -4
- {aiq → nat}/registry_handlers/metadata_factory.py +7 -7
- {aiq → nat}/registry_handlers/package_utils.py +37 -33
- {aiq → nat}/registry_handlers/pypi/pypi_handler.py +21 -21
- {aiq → nat}/registry_handlers/pypi/register_pypi.py +6 -6
- {aiq → nat}/registry_handlers/registry_handler_base.py +21 -21
- {aiq → nat}/registry_handlers/rest/register_rest.py +7 -7
- {aiq → nat}/registry_handlers/rest/rest_handler.py +19 -19
- {aiq → nat}/registry_handlers/schemas/package.py +3 -3
- {aiq → nat}/registry_handlers/schemas/publish.py +17 -12
- {aiq → nat}/registry_handlers/schemas/pull.py +6 -6
- {aiq → nat}/registry_handlers/schemas/remove.py +2 -2
- {aiq → nat}/registry_handlers/schemas/search.py +11 -11
- {aiq → nat}/retriever/interface.py +6 -2
- {aiq → nat}/retriever/milvus/register.py +7 -7
- {aiq → nat}/retriever/milvus/retriever.py +8 -8
- {aiq → nat}/retriever/models.py +10 -7
- {aiq → nat}/retriever/nemo_retriever/register.py +6 -6
- {aiq → nat}/retriever/nemo_retriever/retriever.py +10 -10
- {aiq/embedder → nat/retriever}/register.py +2 -4
- {aiq → nat}/runtime/loader.py +38 -33
- {aiq → nat}/runtime/runner.py +30 -25
- {aiq → nat}/runtime/session.py +19 -15
- {aiq → nat}/runtime/user_metadata.py +1 -1
- {aiq → nat}/settings/global_settings.py +11 -11
- {aiq → nat}/tool/chat_completion.py +6 -6
- {aiq → nat}/tool/code_execution/README.md +2 -2
- {aiq → nat}/tool/code_execution/code_sandbox.py +1 -1
- {aiq → nat}/tool/code_execution/register.py +5 -5
- {aiq → nat}/tool/code_execution/test_code_execution_sandbox.py +1 -1
- {aiq → nat}/tool/datetime_tools.py +4 -4
- {aiq → nat}/tool/document_search.py +6 -6
- {aiq → nat}/tool/github_tools/create_github_commit.py +4 -4
- {aiq → nat}/tool/github_tools/create_github_issue.py +4 -4
- {aiq → nat}/tool/github_tools/create_github_pr.py +4 -4
- {aiq → nat}/tool/github_tools/get_github_file.py +4 -4
- {aiq → nat}/tool/github_tools/get_github_issue.py +4 -4
- {aiq → nat}/tool/github_tools/get_github_pr.py +4 -4
- {aiq → nat}/tool/github_tools/update_github_issue.py +4 -4
- {aiq → nat}/tool/mcp/exceptions.py +1 -1
- {aiq → nat}/tool/mcp/mcp_client.py +2 -2
- {aiq → nat}/tool/mcp/mcp_tool.py +7 -7
- {aiq → nat}/tool/memory_tools/add_memory_tool.py +6 -6
- {aiq → nat}/tool/memory_tools/delete_memory_tool.py +6 -6
- {aiq → nat}/tool/memory_tools/get_memory_tool.py +6 -6
- {aiq → nat}/tool/nvidia_rag.py +4 -4
- {aiq → nat}/tool/retriever.py +20 -15
- {aiq → nat}/tool/server_tools.py +16 -16
- {aiq → nat}/utils/dump_distro_mapping.py +2 -2
- {aiq → nat}/utils/exception_handlers/mcp.py +8 -8
- {aiq → nat}/utils/io/yaml_tools.py +1 -1
- {aiq → nat}/utils/metadata_utils.py +2 -2
- {aiq → nat}/utils/reactive/base/observable_base.py +2 -2
- {aiq → nat}/utils/reactive/base/subject_base.py +1 -1
- {aiq → nat}/utils/reactive/observable.py +5 -5
- {aiq → nat}/utils/reactive/observer.py +1 -1
- {aiq → nat}/utils/reactive/subject.py +4 -4
- {aiq → nat}/utils/reactive/subscription.py +1 -1
- {aiq → nat}/utils/settings/global_settings.py +4 -4
- {aiq → nat}/utils/type_converter.py +1 -1
- {nvidia_nat-1.2.0rc5.dist-info → nvidia_nat-1.2.0rc7.dist-info}/METADATA +37 -37
- nvidia_nat-1.2.0rc7.dist-info/RECORD +434 -0
- nvidia_nat-1.2.0rc7.dist-info/entry_points.txt +21 -0
- nvidia_nat-1.2.0rc7.dist-info/top_level.txt +1 -0
- aiq/embedder/langchain_client.py +0 -41
- aiq/front_ends/mcp/mcp_front_end_plugin.py +0 -93
- aiq/meta/module_to_distro.json +0 -3
- aiq/meta/pypi.md +0 -58
- nvidia_nat-1.2.0rc5.dist-info/RECORD +0 -435
- nvidia_nat-1.2.0rc5.dist-info/entry_points.txt +0 -20
- nvidia_nat-1.2.0rc5.dist-info/top_level.txt +0 -1
- {aiq → nat}/agent/__init__.py +0 -0
- {aiq → nat}/agent/base.py +0 -0
- {aiq → nat}/agent/dual_node.py +0 -0
- {aiq → nat}/agent/react_agent/__init__.py +0 -0
- {aiq → nat}/agent/react_agent/output_parser.py +0 -0
- {aiq → nat}/agent/react_agent/prompt.py +0 -0
- {aiq → nat}/agent/reasoning_agent/__init__.py +0 -0
- {aiq → nat}/agent/register.py +0 -0
- {aiq → nat}/agent/rewoo_agent/__init__.py +0 -0
- {aiq → nat}/agent/tool_calling_agent/__init__.py +0 -0
- {aiq → nat}/authentication/__init__.py +0 -0
- {aiq → nat}/authentication/api_key/__init__.py +0 -0
- {aiq → nat}/authentication/exceptions/__init__.py +0 -0
- {aiq → nat}/authentication/exceptions/api_key_exceptions.py +0 -0
- {aiq → nat}/authentication/http_basic_auth/__init__.py +0 -0
- {aiq → nat}/authentication/oauth2/__init__.py +0 -0
- {aiq → nat}/builder/__init__.py +0 -0
- {aiq → nat}/builder/framework_enum.py +0 -0
- {aiq → nat}/cli/__init__.py +0 -0
- {aiq → nat}/cli/cli_utils/__init__.py +0 -0
- {aiq → nat}/cli/commands/__init__.py +0 -0
- {aiq → nat}/cli/commands/configure/__init__.py +0 -0
- {aiq → nat}/cli/commands/configure/channel/__init__.py +0 -0
- {aiq → nat}/cli/commands/info/__init__.py +0 -0
- {aiq → nat}/cli/commands/registry/__init__.py +0 -0
- {aiq → nat}/cli/commands/sizing/__init__.py +0 -0
- {aiq → nat}/cli/commands/sizing/sizing.py +0 -0
- {aiq → nat}/cli/commands/workflow/__init__.py +0 -0
- {aiq → nat}/cli/commands/workflow/templates/__init__.py.j2 +0 -0
- {aiq → nat}/cli/commands/workflow/templates/config.yml.j2 +0 -0
- {aiq → nat}/cli/commands/workflow/templates/register.py.j2 +0 -0
- {aiq → nat}/data_models/__init__.py +0 -0
- {aiq → nat}/data_models/common.py +0 -0
- {aiq → nat}/data_models/embedder.py +0 -0
- {aiq → nat}/data_models/evaluator.py +0 -0
- {aiq → nat}/data_models/front_end.py +0 -0
- {aiq → nat}/data_models/function.py +0 -0
- {aiq → nat}/data_models/function_dependencies.py +0 -0
- {aiq → nat}/data_models/interactive.py +0 -0
- {aiq → nat}/data_models/invocation_node.py +0 -0
- {aiq → nat}/data_models/llm.py +0 -0
- {aiq → nat}/data_models/logging.py +0 -0
- {aiq → nat}/data_models/memory.py +0 -0
- {aiq → nat}/data_models/object_store.py +0 -0
- {aiq → nat}/data_models/profiler.py +0 -0
- {aiq → nat}/data_models/registry_handler.py +0 -0
- {aiq → nat}/data_models/retry_mixin.py +0 -0
- {aiq → nat}/data_models/streaming.py +0 -0
- {aiq → nat}/data_models/swe_bench_model.py +0 -0
- {aiq → nat}/data_models/ttc_strategy.py +0 -0
- {aiq → nat}/embedder/__init__.py +0 -0
- {aiq → nat}/eval/__init__.py +0 -0
- {aiq → nat}/eval/dataset_handler/__init__.py +0 -0
- {aiq → nat}/eval/evaluator/__init__.py +0 -0
- {aiq → nat}/eval/rag_evaluator/__init__.py +0 -0
- {aiq → nat}/eval/register.py +0 -0
- {aiq → nat}/eval/runners/__init__.py +0 -0
- {aiq → nat}/eval/swe_bench_evaluator/__init__.py +0 -0
- {aiq → nat}/eval/trajectory_evaluator/__init__.py +0 -0
- {aiq → nat}/eval/tunable_rag_evaluator/__init__.py +0 -0
- {aiq → nat}/eval/usage_stats.py +0 -0
- {aiq → nat}/eval/utils/__init__.py +0 -0
- {aiq → nat}/eval/utils/tqdm_position_registry.py +0 -0
- {aiq → nat}/experimental/__init__.py +0 -0
- {aiq → nat}/experimental/decorators/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/editing/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/functions/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/models/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/models/stage_enums.py +0 -0
- {aiq → nat}/experimental/test_time_compute/models/tool_use_config.py +0 -0
- {aiq → nat}/experimental/test_time_compute/models/ttc_item.py +0 -0
- {aiq → nat}/experimental/test_time_compute/scoring/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/search/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/selection/__init__.py +0 -0
- {aiq → nat}/front_ends/__init__.py +0 -0
- {aiq → nat}/front_ends/console/__init__.py +0 -0
- {aiq → nat}/front_ends/cron/__init__.py +0 -0
- {aiq → nat}/front_ends/fastapi/__init__.py +0 -0
- {aiq → nat}/front_ends/fastapi/auth_flow_handlers/__init__.py +0 -0
- {aiq → nat}/front_ends/fastapi/fastapi_front_end_controller.py +0 -0
- {aiq → nat}/front_ends/fastapi/html_snippets/__init__.py +0 -0
- {aiq → nat}/front_ends/fastapi/html_snippets/auth_code_grant_success.py +0 -0
- {aiq → nat}/front_ends/fastapi/job_store.py +0 -0
- {aiq → nat}/front_ends/mcp/__init__.py +0 -0
- {aiq → nat}/front_ends/register.py +0 -0
- {aiq → nat}/front_ends/simple_base/__init__.py +0 -0
- {aiq → nat}/llm/__init__.py +0 -0
- {aiq → nat}/llm/register.py +0 -0
- {aiq → nat}/llm/utils/__init__.py +0 -0
- {aiq → nat}/llm/utils/env_config_value.py +0 -0
- {aiq → nat}/llm/utils/error.py +0 -0
- {aiq → nat}/memory/interfaces.py +0 -0
- {aiq → nat}/memory/models.py +0 -0
- {aiq → nat}/object_store/interfaces.py +0 -0
- {aiq → nat}/object_store/models.py +0 -0
- {aiq → nat}/object_store/register.py +0 -0
- {aiq → nat}/observability/__init__.py +0 -0
- {aiq → nat}/observability/exporter/__init__.py +0 -0
- {aiq → nat}/observability/mixin/__init__.py +0 -0
- {aiq → nat}/observability/mixin/batch_config_mixin.py +0 -0
- {aiq → nat}/observability/mixin/collector_config_mixin.py +0 -0
- {aiq → nat}/observability/mixin/file_mode.py +0 -0
- {aiq → nat}/observability/mixin/resource_conflict_mixin.py +0 -0
- {aiq → nat}/observability/mixin/serialize_mixin.py +0 -0
- {aiq → nat}/observability/mixin/type_introspection_mixin.py +0 -0
- {aiq → nat}/observability/processor/__init__.py +0 -0
- {aiq → nat}/observability/utils/__init__.py +0 -0
- {aiq → nat}/observability/utils/dict_utils.py +0 -0
- {aiq → nat}/observability/utils/time_utils.py +0 -0
- {aiq → nat}/plugins/.namespace +0 -0
- {aiq → nat}/profiler/__init__.py +0 -0
- {aiq → nat}/profiler/calc/__init__.py +0 -0
- {aiq → nat}/profiler/calc/data_models.py +0 -0
- {aiq → nat}/profiler/callbacks/__init__.py +0 -0
- {aiq → nat}/profiler/callbacks/base_callback_class.py +0 -0
- {aiq → nat}/profiler/callbacks/token_usage_base_model.py +0 -0
- {aiq → nat}/profiler/data_frame_row.py +0 -0
- {aiq → nat}/profiler/decorators/__init__.py +0 -0
- {aiq → nat}/profiler/forecasting/__init__.py +0 -0
- {aiq → nat}/profiler/forecasting/config.py +0 -0
- {aiq → nat}/profiler/forecasting/models/__init__.py +0 -0
- {aiq → nat}/profiler/forecasting/models/forecasting_base_model.py +0 -0
- {aiq → nat}/profiler/inference_metrics_model.py +0 -0
- {aiq → nat}/profiler/inference_optimization/__init__.py +0 -0
- {aiq → nat}/profiler/inference_optimization/bottleneck_analysis/__init__.py +0 -0
- {aiq → nat}/profiler/inference_optimization/data_models.py +0 -0
- {aiq → nat}/profiler/inference_optimization/experimental/__init__.py +0 -0
- {aiq → nat}/registry_handlers/__init__.py +0 -0
- {aiq → nat}/registry_handlers/local/__init__.py +0 -0
- {aiq → nat}/registry_handlers/pypi/__init__.py +0 -0
- {aiq → nat}/registry_handlers/register.py +0 -0
- {aiq → nat}/registry_handlers/rest/__init__.py +0 -0
- {aiq → nat}/registry_handlers/schemas/__init__.py +0 -0
- {aiq → nat}/registry_handlers/schemas/headers.py +0 -0
- {aiq → nat}/registry_handlers/schemas/status.py +0 -0
- {aiq → nat}/retriever/__init__.py +0 -0
- {aiq → nat}/retriever/milvus/__init__.py +0 -0
- {aiq → nat}/retriever/nemo_retriever/__init__.py +0 -0
- {aiq → nat}/runtime/__init__.py +0 -0
- {aiq → nat}/settings/__init__.py +0 -0
- {aiq → nat}/test/.namespace +0 -0
- {aiq → nat}/tool/__init__.py +0 -0
- {aiq → nat}/tool/code_execution/__init__.py +0 -0
- {aiq → nat}/tool/code_execution/local_sandbox/.gitignore +0 -0
- {aiq → nat}/tool/code_execution/local_sandbox/Dockerfile.sandbox +0 -0
- {aiq → nat}/tool/code_execution/local_sandbox/__init__.py +0 -0
- {aiq → nat}/tool/code_execution/local_sandbox/local_sandbox_server.py +0 -0
- {aiq → nat}/tool/code_execution/local_sandbox/sandbox.requirements.txt +0 -0
- {aiq → nat}/tool/code_execution/local_sandbox/start_local_sandbox.sh +0 -0
- {aiq → nat}/tool/code_execution/utils.py +0 -0
- {aiq → nat}/tool/github_tools/__init__.py +0 -0
- {aiq → nat}/tool/mcp/__init__.py +0 -0
- {aiq → nat}/tool/memory_tools/__init__.py +0 -0
- {aiq → nat}/tool/register.py +0 -0
- {aiq → nat}/utils/__init__.py +0 -0
- {aiq → nat}/utils/data_models/__init__.py +0 -0
- {aiq → nat}/utils/data_models/schema_validator.py +0 -0
- {aiq → nat}/utils/debugging_utils.py +0 -0
- {aiq → nat}/utils/exception_handlers/__init__.py +0 -0
- {aiq → nat}/utils/exception_handlers/automatic_retries.py +0 -0
- {aiq → nat}/utils/exception_handlers/schemas.py +0 -0
- {aiq → nat}/utils/io/__init__.py +0 -0
- {aiq → nat}/utils/io/model_processing.py +0 -0
- {aiq → nat}/utils/log_utils.py +0 -0
- {aiq → nat}/utils/optional_imports.py +0 -0
- {aiq → nat}/utils/producer_consumer_queue.py +0 -0
- {aiq → nat}/utils/reactive/__init__.py +0 -0
- {aiq → nat}/utils/reactive/base/__init__.py +0 -0
- {aiq → nat}/utils/reactive/base/observer_base.py +0 -0
- {aiq → nat}/utils/settings/__init__.py +0 -0
- {aiq → nat}/utils/string_utils.py +0 -0
- {aiq → nat}/utils/type_utils.py +0 -0
- {aiq → nat}/utils/url_utils.py +0 -0
- {nvidia_nat-1.2.0rc5.dist-info → nvidia_nat-1.2.0rc7.dist-info}/WHEEL +0 -0
- {nvidia_nat-1.2.0rc5.dist-info → nvidia_nat-1.2.0rc7.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
- {nvidia_nat-1.2.0rc5.dist-info → nvidia_nat-1.2.0rc7.dist-info}/licenses/LICENSE.md +0 -0
|
@@ -17,16 +17,16 @@ import dataclasses
|
|
|
17
17
|
import logging
|
|
18
18
|
import typing
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from
|
|
25
|
-
from
|
|
26
|
-
from
|
|
20
|
+
from nat.data_models.intermediate_step import IntermediateStep
|
|
21
|
+
from nat.data_models.intermediate_step import IntermediateStepPayload
|
|
22
|
+
from nat.data_models.intermediate_step import IntermediateStepState
|
|
23
|
+
from nat.utils.reactive.observable import OnComplete
|
|
24
|
+
from nat.utils.reactive.observable import OnError
|
|
25
|
+
from nat.utils.reactive.observable import OnNext
|
|
26
|
+
from nat.utils.reactive.subscription import Subscription
|
|
27
27
|
|
|
28
28
|
if typing.TYPE_CHECKING:
|
|
29
|
-
from
|
|
29
|
+
from nat.builder.context import ContextState
|
|
30
30
|
|
|
31
31
|
logger = logging.getLogger(__name__)
|
|
32
32
|
|
|
@@ -43,17 +43,17 @@ class OpenStep:
|
|
|
43
43
|
|
|
44
44
|
class IntermediateStepManager:
|
|
45
45
|
"""
|
|
46
|
-
Manages updates to the
|
|
46
|
+
Manages updates to the NAT Event Stream for intermediate steps
|
|
47
47
|
"""
|
|
48
48
|
|
|
49
|
-
def __init__(self, context_state: "
|
|
49
|
+
def __init__(self, context_state: "ContextState"): # noqa: F821
|
|
50
50
|
self._context_state = context_state
|
|
51
51
|
|
|
52
52
|
self._outstanding_start_steps: dict[str, OpenStep] = {}
|
|
53
53
|
|
|
54
54
|
def push_intermediate_step(self, payload: IntermediateStepPayload) -> None:
|
|
55
55
|
"""
|
|
56
|
-
Pushes an intermediate step to the
|
|
56
|
+
Pushes an intermediate step to the NAT Event Stream
|
|
57
57
|
"""
|
|
58
58
|
|
|
59
59
|
if not isinstance(payload, IntermediateStepPayload):
|
|
@@ -129,7 +129,7 @@ class IntermediateStepManager:
|
|
|
129
129
|
# Verify that the stack is now equal to the previous stack
|
|
130
130
|
if (curr_stack != prev_stack):
|
|
131
131
|
logger.warning("Current span ID stack is not equal to the previous stack. "
|
|
132
|
-
"This is likely an error. Report this to the
|
|
132
|
+
"This is likely an error. Report this to the NeMo Agent toolkit team.")
|
|
133
133
|
|
|
134
134
|
logger.debug("Popped end step %s, name %s, type %s, parent %s, stack id %s",
|
|
135
135
|
payload.UUID,
|
|
@@ -168,7 +168,7 @@ class IntermediateStepManager:
|
|
|
168
168
|
on_error: OnError = None,
|
|
169
169
|
on_complete: OnComplete = None) -> Subscription:
|
|
170
170
|
"""
|
|
171
|
-
Subscribes to the
|
|
171
|
+
Subscribes to the NAT Event Stream for intermediate steps
|
|
172
172
|
"""
|
|
173
173
|
|
|
174
174
|
return self._context_state.event_stream.get().subscribe(on_next, on_error, on_complete)
|
{aiq → nat}/builder/llm.py
RENAMED
{aiq → nat}/builder/retriever.py
RENAMED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
-
from
|
|
16
|
+
from nat.data_models.retriever import RetrieverBaseConfig
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class RetrieverProviderInfo:
|
|
@@ -17,25 +17,25 @@ import logging
|
|
|
17
17
|
import time
|
|
18
18
|
import uuid
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from
|
|
20
|
+
from nat.data_models.interactive import HumanPrompt
|
|
21
|
+
from nat.data_models.interactive import HumanResponse
|
|
22
|
+
from nat.data_models.interactive import InteractionPrompt
|
|
23
|
+
from nat.data_models.interactive import InteractionResponse
|
|
24
|
+
from nat.data_models.interactive import InteractionStatus
|
|
25
25
|
|
|
26
26
|
logger = logging.getLogger(__name__)
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class UserInteractionManager:
|
|
30
30
|
"""
|
|
31
|
-
|
|
31
|
+
UserInteractionManager is responsible for requesting user input
|
|
32
32
|
at runtime. It delegates the actual prompting to a callback function
|
|
33
|
-
stored in
|
|
33
|
+
stored in ContextState.user_input_callback.
|
|
34
34
|
|
|
35
35
|
Type is not imported in __init__ to prevent partial import.
|
|
36
36
|
"""
|
|
37
37
|
|
|
38
|
-
def __init__(self, context_state: "
|
|
38
|
+
def __init__(self, context_state: "ContextState") -> None: # noqa: F821
|
|
39
39
|
self._context_state = context_state
|
|
40
40
|
|
|
41
41
|
@staticmethod
|
|
@@ -54,7 +54,7 @@ class AIQUserInteractionManager:
|
|
|
54
54
|
"""
|
|
55
55
|
Ask the user a question and wait for input. This calls out to
|
|
56
56
|
the callback from user_input_callback, which is typically
|
|
57
|
-
set by
|
|
57
|
+
set by SessionManager.
|
|
58
58
|
|
|
59
59
|
Returns the user's typed-in answer as a string.
|
|
60
60
|
"""
|
|
@@ -72,3 +72,7 @@ class AIQUserInteractionManager:
|
|
|
72
72
|
sys_human_interaction = InteractionResponse(id=uuid_req, status=status, timestamp=timestamp, content=resp)
|
|
73
73
|
|
|
74
74
|
return sys_human_interaction
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
# Compatibility aliases with previous releases
|
|
78
|
+
AIQUserInteractionManager = UserInteractionManager
|
{aiq → nat}/builder/workflow.py
RENAMED
|
@@ -17,22 +17,22 @@ from contextlib import asynccontextmanager
|
|
|
17
17
|
from contextvars import ContextVar
|
|
18
18
|
from typing import Any
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from
|
|
25
|
-
from
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
32
|
-
from
|
|
33
|
-
from
|
|
34
|
-
from
|
|
35
|
-
from
|
|
20
|
+
from nat.builder.context import ContextState
|
|
21
|
+
from nat.builder.embedder import EmbedderProviderInfo
|
|
22
|
+
from nat.builder.function import Function
|
|
23
|
+
from nat.builder.function_base import FunctionBase
|
|
24
|
+
from nat.builder.function_base import InputT
|
|
25
|
+
from nat.builder.function_base import SingleOutputT
|
|
26
|
+
from nat.builder.function_base import StreamingOutputT
|
|
27
|
+
from nat.builder.llm import LLMProviderInfo
|
|
28
|
+
from nat.builder.retriever import RetrieverProviderInfo
|
|
29
|
+
from nat.data_models.config import Config
|
|
30
|
+
from nat.experimental.test_time_compute.models.strategy_base import StrategyBase
|
|
31
|
+
from nat.memory.interfaces import MemoryEditor
|
|
32
|
+
from nat.object_store.interfaces import ObjectStore
|
|
33
|
+
from nat.observability.exporter.base_exporter import BaseExporter
|
|
34
|
+
from nat.observability.exporter_manager import ExporterManager
|
|
35
|
+
from nat.runtime.runner import Runner
|
|
36
36
|
|
|
37
37
|
callback_handler_var: ContextVar[Any | None] = ContextVar("callback_handler_var", default=None)
|
|
38
38
|
|
|
@@ -41,7 +41,7 @@ class Workflow(FunctionBase[InputT, StreamingOutputT, SingleOutputT]):
|
|
|
41
41
|
|
|
42
42
|
def __init__(self,
|
|
43
43
|
*,
|
|
44
|
-
config:
|
|
44
|
+
config: Config,
|
|
45
45
|
entry_fn: Function[InputT, StreamingOutputT, SingleOutputT],
|
|
46
46
|
functions: dict[str, Function] | None = None,
|
|
47
47
|
llms: dict[str, LLMProviderInfo] | None = None,
|
|
@@ -51,7 +51,7 @@ class Workflow(FunctionBase[InputT, StreamingOutputT, SingleOutputT]):
|
|
|
51
51
|
telemetry_exporters: dict[str, BaseExporter] | None = None,
|
|
52
52
|
retrievers: dict[str | None, RetrieverProviderInfo] | None = None,
|
|
53
53
|
ttc_strategies: dict[str, StrategyBase] | None = None,
|
|
54
|
-
context_state:
|
|
54
|
+
context_state: ContextState):
|
|
55
55
|
|
|
56
56
|
super().__init__(input_schema=entry_fn.input_schema,
|
|
57
57
|
streaming_output_schema=entry_fn.streaming_output_schema,
|
|
@@ -90,10 +90,10 @@ class Workflow(FunctionBase[InputT, StreamingOutputT, SingleOutputT]):
|
|
|
90
90
|
a new top-level workflow span here.
|
|
91
91
|
"""
|
|
92
92
|
|
|
93
|
-
async with
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
async with Runner(input_message=message,
|
|
94
|
+
entry_fn=self._entry_fn,
|
|
95
|
+
context_state=self._context_state,
|
|
96
|
+
exporter_manager=self._exporter_manager.get()) as runner:
|
|
97
97
|
|
|
98
98
|
# The caller can `yield runner` so they can do `runner.result()` or `runner.result_stream()`
|
|
99
99
|
yield runner
|
|
@@ -102,7 +102,7 @@ class Workflow(FunctionBase[InputT, StreamingOutputT, SingleOutputT]):
|
|
|
102
102
|
|
|
103
103
|
async with self.run(message) as runner:
|
|
104
104
|
|
|
105
|
-
from
|
|
105
|
+
from nat.eval.runtime_event_subscriber import pull_intermediate
|
|
106
106
|
|
|
107
107
|
# Start the intermediate stream
|
|
108
108
|
pull_done, intermediate_steps = pull_intermediate()
|
|
@@ -116,7 +116,7 @@ class Workflow(FunctionBase[InputT, StreamingOutputT, SingleOutputT]):
|
|
|
116
116
|
|
|
117
117
|
@staticmethod
|
|
118
118
|
def from_entry_fn(*,
|
|
119
|
-
config:
|
|
119
|
+
config: Config,
|
|
120
120
|
entry_fn: Function[InputT, StreamingOutputT, SingleOutputT],
|
|
121
121
|
functions: dict[str, Function] | None = None,
|
|
122
122
|
llms: dict[str, LLMProviderInfo] | None = None,
|
|
@@ -126,7 +126,7 @@ class Workflow(FunctionBase[InputT, StreamingOutputT, SingleOutputT]):
|
|
|
126
126
|
telemetry_exporters: dict[str, BaseExporter] | None = None,
|
|
127
127
|
retrievers: dict[str | None, RetrieverProviderInfo] | None = None,
|
|
128
128
|
ttc_strategies: dict[str, StrategyBase] | None = None,
|
|
129
|
-
context_state:
|
|
129
|
+
context_state: ContextState) -> 'Workflow[InputT, StreamingOutputT, SingleOutputT]':
|
|
130
130
|
|
|
131
131
|
input_type: type = entry_fn.input_type
|
|
132
132
|
streaming_output_type = entry_fn.streaming_output_type
|
|
@@ -21,54 +21,54 @@ from contextlib import AbstractAsyncContextManager
|
|
|
21
21
|
from contextlib import AsyncExitStack
|
|
22
22
|
from contextlib import asynccontextmanager
|
|
23
23
|
|
|
24
|
-
from
|
|
25
|
-
from
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
32
|
-
from
|
|
33
|
-
from
|
|
34
|
-
from
|
|
35
|
-
from
|
|
36
|
-
from
|
|
37
|
-
from
|
|
38
|
-
from
|
|
39
|
-
from
|
|
40
|
-
from
|
|
41
|
-
from
|
|
42
|
-
from
|
|
43
|
-
from
|
|
44
|
-
from
|
|
45
|
-
from
|
|
46
|
-
from
|
|
47
|
-
from
|
|
48
|
-
from
|
|
49
|
-
from
|
|
50
|
-
from
|
|
51
|
-
from
|
|
52
|
-
from
|
|
53
|
-
from
|
|
54
|
-
from
|
|
55
|
-
from
|
|
56
|
-
from
|
|
57
|
-
from
|
|
58
|
-
from
|
|
59
|
-
from
|
|
60
|
-
from
|
|
61
|
-
from
|
|
62
|
-
from
|
|
63
|
-
from
|
|
64
|
-
from
|
|
65
|
-
from
|
|
66
|
-
from
|
|
67
|
-
from
|
|
68
|
-
from
|
|
69
|
-
from
|
|
70
|
-
from
|
|
71
|
-
from
|
|
24
|
+
from nat.authentication.interfaces import AuthProviderBase
|
|
25
|
+
from nat.builder.builder import Builder
|
|
26
|
+
from nat.builder.builder import UserManagerHolder
|
|
27
|
+
from nat.builder.component_utils import ComponentInstanceData
|
|
28
|
+
from nat.builder.component_utils import build_dependency_sequence
|
|
29
|
+
from nat.builder.context import Context
|
|
30
|
+
from nat.builder.context import ContextState
|
|
31
|
+
from nat.builder.embedder import EmbedderProviderInfo
|
|
32
|
+
from nat.builder.framework_enum import LLMFrameworkEnum
|
|
33
|
+
from nat.builder.function import Function
|
|
34
|
+
from nat.builder.function import LambdaFunction
|
|
35
|
+
from nat.builder.function_info import FunctionInfo
|
|
36
|
+
from nat.builder.llm import LLMProviderInfo
|
|
37
|
+
from nat.builder.retriever import RetrieverProviderInfo
|
|
38
|
+
from nat.builder.workflow import Workflow
|
|
39
|
+
from nat.cli.type_registry import GlobalTypeRegistry
|
|
40
|
+
from nat.cli.type_registry import TypeRegistry
|
|
41
|
+
from nat.data_models.authentication import AuthProviderBaseConfig
|
|
42
|
+
from nat.data_models.component import ComponentGroup
|
|
43
|
+
from nat.data_models.component_ref import AuthenticationRef
|
|
44
|
+
from nat.data_models.component_ref import EmbedderRef
|
|
45
|
+
from nat.data_models.component_ref import FunctionRef
|
|
46
|
+
from nat.data_models.component_ref import LLMRef
|
|
47
|
+
from nat.data_models.component_ref import MemoryRef
|
|
48
|
+
from nat.data_models.component_ref import ObjectStoreRef
|
|
49
|
+
from nat.data_models.component_ref import RetrieverRef
|
|
50
|
+
from nat.data_models.component_ref import TTCStrategyRef
|
|
51
|
+
from nat.data_models.config import Config
|
|
52
|
+
from nat.data_models.config import GeneralConfig
|
|
53
|
+
from nat.data_models.embedder import EmbedderBaseConfig
|
|
54
|
+
from nat.data_models.function import FunctionBaseConfig
|
|
55
|
+
from nat.data_models.function_dependencies import FunctionDependencies
|
|
56
|
+
from nat.data_models.llm import LLMBaseConfig
|
|
57
|
+
from nat.data_models.memory import MemoryBaseConfig
|
|
58
|
+
from nat.data_models.object_store import ObjectStoreBaseConfig
|
|
59
|
+
from nat.data_models.retriever import RetrieverBaseConfig
|
|
60
|
+
from nat.data_models.telemetry_exporter import TelemetryExporterBaseConfig
|
|
61
|
+
from nat.data_models.ttc_strategy import TTCStrategyBaseConfig
|
|
62
|
+
from nat.experimental.decorators.experimental_warning_decorator import experimental
|
|
63
|
+
from nat.experimental.test_time_compute.models.stage_enums import PipelineTypeEnum
|
|
64
|
+
from nat.experimental.test_time_compute.models.stage_enums import StageTypeEnum
|
|
65
|
+
from nat.experimental.test_time_compute.models.strategy_base import StrategyBase
|
|
66
|
+
from nat.memory.interfaces import MemoryEditor
|
|
67
|
+
from nat.object_store.interfaces import ObjectStore
|
|
68
|
+
from nat.observability.exporter.base_exporter import BaseExporter
|
|
69
|
+
from nat.profiler.decorators.framework_wrapper import chain_wrapped_build_fn
|
|
70
|
+
from nat.profiler.utils import detect_llm_frameworks_in_build_fn
|
|
71
|
+
from nat.utils.type_utils import override
|
|
72
72
|
|
|
73
73
|
logger = logging.getLogger(__name__)
|
|
74
74
|
|
|
@@ -156,7 +156,7 @@ class WorkflowBuilder(Builder, AbstractAsyncContextManager):
|
|
|
156
156
|
self._retrievers: dict[str, ConfiguredRetriever] = {}
|
|
157
157
|
self._ttc_strategies: dict[str, ConfiguredTTCStrategy] = {}
|
|
158
158
|
|
|
159
|
-
self._context_state =
|
|
159
|
+
self._context_state = ContextState.get()
|
|
160
160
|
|
|
161
161
|
self._exit_stack: AsyncExitStack | None = None
|
|
162
162
|
|
|
@@ -183,7 +183,7 @@ class WorkflowBuilder(Builder, AbstractAsyncContextManager):
|
|
|
183
183
|
# Store them in a dict so we can un-register them if needed
|
|
184
184
|
self._logging_handlers[key] = handler
|
|
185
185
|
|
|
186
|
-
# Now attach to
|
|
186
|
+
# Now attach to NAT's root logger
|
|
187
187
|
logging.getLogger().addHandler(handler)
|
|
188
188
|
|
|
189
189
|
# Add the telemetry exporters
|
|
@@ -226,36 +226,36 @@ class WorkflowBuilder(Builder, AbstractAsyncContextManager):
|
|
|
226
226
|
raise ValueError("Must set a workflow before building")
|
|
227
227
|
|
|
228
228
|
# Build the config from the added objects
|
|
229
|
-
config =
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
229
|
+
config = Config(general=self.general_config,
|
|
230
|
+
functions={
|
|
231
|
+
k: v.config
|
|
232
|
+
for k, v in self._functions.items()
|
|
233
|
+
},
|
|
234
|
+
workflow=self._workflow.config,
|
|
235
|
+
llms={
|
|
236
|
+
k: v.config
|
|
237
|
+
for k, v in self._llms.items()
|
|
238
|
+
},
|
|
239
|
+
embedders={
|
|
240
|
+
k: v.config
|
|
241
|
+
for k, v in self._embedders.items()
|
|
242
|
+
},
|
|
243
|
+
memory={
|
|
244
|
+
k: v.config
|
|
245
|
+
for k, v in self._memory_clients.items()
|
|
246
|
+
},
|
|
247
|
+
object_stores={
|
|
248
|
+
k: v.config
|
|
249
|
+
for k, v in self._object_stores.items()
|
|
250
|
+
},
|
|
251
|
+
retrievers={
|
|
252
|
+
k: v.config
|
|
253
|
+
for k, v in self._retrievers.items()
|
|
254
|
+
},
|
|
255
|
+
ttc_strategies={
|
|
256
|
+
k: v.config
|
|
257
|
+
for k, v in self._ttc_strategies.items()
|
|
258
|
+
})
|
|
259
259
|
|
|
260
260
|
if (entry_function is None):
|
|
261
261
|
entry_fn_obj = self.get_workflow()
|
|
@@ -470,7 +470,7 @@ class WorkflowBuilder(Builder, AbstractAsyncContextManager):
|
|
|
470
470
|
# Return the tool configuration object
|
|
471
471
|
return self._llms[llm_name].config
|
|
472
472
|
|
|
473
|
-
@
|
|
473
|
+
@experimental(feature_name="Authentication")
|
|
474
474
|
@override
|
|
475
475
|
async def add_auth_provider(self, name: str | AuthenticationRef,
|
|
476
476
|
config: AuthProviderBaseConfig) -> AuthProviderBase:
|
|
@@ -699,7 +699,7 @@ class WorkflowBuilder(Builder, AbstractAsyncContextManager):
|
|
|
699
699
|
|
|
700
700
|
return self._retrievers[retriever_name].config
|
|
701
701
|
|
|
702
|
-
@
|
|
702
|
+
@experimental(feature_name="TTC")
|
|
703
703
|
@override
|
|
704
704
|
async def add_ttc_strategy(self, name: str | str, config: TTCStrategyBaseConfig):
|
|
705
705
|
if (name in self._ttc_strategies):
|
|
@@ -768,7 +768,7 @@ class WorkflowBuilder(Builder, AbstractAsyncContextManager):
|
|
|
768
768
|
|
|
769
769
|
@override
|
|
770
770
|
def get_user_manager(self):
|
|
771
|
-
return UserManagerHolder(context=
|
|
771
|
+
return UserManagerHolder(context=Context(self._context_state))
|
|
772
772
|
|
|
773
773
|
async def add_telemetry_exporter(self, name: str, config: TelemetryExporterBaseConfig) -> None:
|
|
774
774
|
"""Add an configured telemetry exporter to the builder.
|
|
@@ -860,12 +860,12 @@ class WorkflowBuilder(Builder, AbstractAsyncContextManager):
|
|
|
860
860
|
"""
|
|
861
861
|
self._log_build_failure("<workflow>", "workflow", completed_components, remaining_components, original_error)
|
|
862
862
|
|
|
863
|
-
async def populate_builder(self, config:
|
|
863
|
+
async def populate_builder(self, config: Config, skip_workflow: bool = False):
|
|
864
864
|
"""
|
|
865
865
|
Populate the builder with components and optionally set up the workflow.
|
|
866
866
|
|
|
867
867
|
Args:
|
|
868
|
-
config (
|
|
868
|
+
config (Config): The configuration object containing component definitions.
|
|
869
869
|
skip_workflow (bool): If True, skips the workflow instantiation step. Defaults to False.
|
|
870
870
|
|
|
871
871
|
"""
|
|
@@ -937,7 +937,7 @@ class WorkflowBuilder(Builder, AbstractAsyncContextManager):
|
|
|
937
937
|
|
|
938
938
|
@classmethod
|
|
939
939
|
@asynccontextmanager
|
|
940
|
-
async def from_config(cls, config:
|
|
940
|
+
async def from_config(cls, config: Config):
|
|
941
941
|
|
|
942
942
|
async with cls(general_config=config.general) as builder:
|
|
943
943
|
await builder.populate_builder(config)
|
|
@@ -22,8 +22,8 @@ from typing import Any
|
|
|
22
22
|
import click
|
|
23
23
|
import yaml
|
|
24
24
|
|
|
25
|
-
from
|
|
26
|
-
from
|
|
25
|
+
from nat.utils.data_models.schema_validator import validate_yaml
|
|
26
|
+
from nat.utils.io.yaml_tools import yaml_load
|
|
27
27
|
|
|
28
28
|
logger = logging.getLogger(__name__)
|
|
29
29
|
|
|
@@ -18,15 +18,15 @@ from pathlib import Path
|
|
|
18
18
|
import click
|
|
19
19
|
import yaml
|
|
20
20
|
|
|
21
|
-
from
|
|
21
|
+
from nat.data_models.config import Config
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
def validate_config(config_file: Path) ->
|
|
24
|
+
def validate_config(config_file: Path) -> Config:
|
|
25
25
|
"""Validate configuration file and return parsed config"""
|
|
26
26
|
try:
|
|
27
|
-
from
|
|
27
|
+
from nat.runtime.loader import load_config
|
|
28
28
|
|
|
29
|
-
# Load using the
|
|
29
|
+
# Load using the NAT loader functions. This performs validation
|
|
30
30
|
config = load_config(config_file)
|
|
31
31
|
|
|
32
32
|
return config
|
|
@@ -20,9 +20,9 @@ import click
|
|
|
20
20
|
logger = logging.getLogger(__name__)
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
@click.group(name=__name__, invoke_without_command=True, help="Utility to add
|
|
23
|
+
@click.group(name=__name__, invoke_without_command=True, help="Utility to add a NAT remote registry channel.")
|
|
24
24
|
@click.argument("channel_type", type=str)
|
|
25
25
|
def add(channel_type: str) -> None:
|
|
26
|
-
from
|
|
26
|
+
from nat.utils.settings.global_settings import add_channel_interative
|
|
27
27
|
|
|
28
28
|
add_channel_interative(channel_type=channel_type)
|
|
@@ -17,16 +17,14 @@ import logging
|
|
|
17
17
|
|
|
18
18
|
import click
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
20
|
+
from nat.cli.commands.configure.channel.add import add
|
|
21
|
+
from nat.cli.commands.configure.channel.remove import remove
|
|
22
|
+
from nat.cli.commands.configure.channel.update import update
|
|
23
23
|
|
|
24
24
|
logger = logging.getLogger(__name__)
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
@click.group(name=__name__,
|
|
28
|
-
invoke_without_command=False,
|
|
29
|
-
help="Utility to configure AIQ Toolkit remote registry channels.")
|
|
27
|
+
@click.group(name=__name__, invoke_without_command=False, help="Utility to configure NAT remote registry channels.")
|
|
30
28
|
def channel(**kwargs):
|
|
31
29
|
pass
|
|
32
30
|
|
|
@@ -22,9 +22,9 @@ logger = logging.getLogger(__name__)
|
|
|
22
22
|
|
|
23
23
|
@click.group(name=__name__,
|
|
24
24
|
invoke_without_command=True,
|
|
25
|
-
help="Utility to remove a configured
|
|
25
|
+
help="Utility to remove a configured NAT remote registry channel.")
|
|
26
26
|
@click.argument("channel", type=str)
|
|
27
27
|
def remove(channel: str):
|
|
28
|
-
from
|
|
28
|
+
from nat.utils.settings.global_settings import remove_channel_interactive
|
|
29
29
|
|
|
30
30
|
remove_channel_interactive(channel_name=channel)
|
|
@@ -22,9 +22,9 @@ logger = logging.getLogger(__name__)
|
|
|
22
22
|
|
|
23
23
|
@click.group(name="update",
|
|
24
24
|
invoke_without_command=True,
|
|
25
|
-
help="Utility to update
|
|
25
|
+
help="Utility to update a NAT remote registry channel's settings.")
|
|
26
26
|
@click.argument("channel", type=str)
|
|
27
27
|
def update(channel):
|
|
28
|
-
from
|
|
28
|
+
from nat.utils.settings.global_settings import update_channel_interactive
|
|
29
29
|
|
|
30
30
|
update_channel_interactive(channel_name=channel)
|
|
@@ -17,15 +17,15 @@ import logging
|
|
|
17
17
|
|
|
18
18
|
import click
|
|
19
19
|
|
|
20
|
-
from
|
|
20
|
+
from nat.cli.commands.configure.channel.channel import channel
|
|
21
21
|
|
|
22
22
|
logger = logging.getLogger(__name__)
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
@click.group(name=__name__, invoke_without_command=False, help="Configure
|
|
25
|
+
@click.group(name=__name__, invoke_without_command=False, help="Configure NAT developer preferences.")
|
|
26
26
|
def configure_command(**kwargs):
|
|
27
27
|
"""
|
|
28
|
-
Publish
|
|
28
|
+
Publish NAT artifacts with the specified configuration
|
|
29
29
|
"""
|
|
30
30
|
pass
|
|
31
31
|
|
|
@@ -19,8 +19,8 @@ from pathlib import Path
|
|
|
19
19
|
|
|
20
20
|
import click
|
|
21
21
|
|
|
22
|
-
from
|
|
23
|
-
from
|
|
22
|
+
from nat.eval.evaluate import EvaluationRun
|
|
23
|
+
from nat.eval.evaluate import EvaluationRunConfig
|
|
24
24
|
|
|
25
25
|
logger = logging.getLogger(__name__)
|
|
26
26
|
|
|
@@ -96,7 +96,7 @@ async def run_and_evaluate(config: EvaluationRunConfig):
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
@eval_command.result_callback(replace=True)
|
|
99
|
-
def
|
|
99
|
+
def process_nat_eval(
|
|
100
100
|
processors, # pylint: disable=unused-argument
|
|
101
101
|
*,
|
|
102
102
|
config_file: Path,
|
|
@@ -17,19 +17,17 @@ import logging
|
|
|
17
17
|
|
|
18
18
|
import click
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
20
|
+
from nat.cli.commands.info.list_channels import list_channels
|
|
21
|
+
from nat.cli.commands.info.list_components import list_components
|
|
22
|
+
from nat.cli.commands.info.list_mcp import list_mcp
|
|
23
23
|
|
|
24
24
|
logger = logging.getLogger(__name__)
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
@click.group(name=__name__,
|
|
28
|
-
invoke_without_command=False,
|
|
29
|
-
help="Provide information about the local AIQ Toolkit environment.")
|
|
27
|
+
@click.group(name=__name__, invoke_without_command=False, help="Provide information about the local NAT environment.")
|
|
30
28
|
def info_command(**kwargs):
|
|
31
29
|
"""
|
|
32
|
-
Provide information about the local
|
|
30
|
+
Provide information about the local NAT environment.
|
|
33
31
|
"""
|
|
34
32
|
pass
|
|
35
33
|
|
|
@@ -23,7 +23,7 @@ logger = logging.getLogger(__name__)
|
|
|
23
23
|
@click.group(name=__name__, invoke_without_command=True, help="List the configured remote registry channels.")
|
|
24
24
|
@click.option("-t", "--type", "channel_type", type=str, required=False, help=("Filter the results by channel type."))
|
|
25
25
|
def list_channels(channel_type: str):
|
|
26
|
-
from
|
|
26
|
+
from nat.settings.global_settings import GlobalSettings
|
|
27
27
|
|
|
28
28
|
settings = GlobalSettings().get()
|
|
29
29
|
try:
|