ibm-watsonx-orchestrate 1.13.0b0__tar.gz → 1.13.0b1__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.
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/PKG-INFO +2 -2
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/pyproject.toml +1 -1
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/__init__.py +1 -1
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/knowledge_bases/types.py +2 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/agents/agents_controller.py +4 -2
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/copilot/copilot_command.py +13 -2
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/copilot/copilot_controller.py +29 -20
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/evaluations/evaluations_command.py +30 -3
- ibm_watsonx_orchestrate-1.13.0b1/src/ibm_watsonx_orchestrate/cli/commands/evaluations/evaluations_environment_manager.py +158 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/knowledge_bases/knowledge_bases_command.py +26 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/knowledge_bases/knowledge_bases_controller.py +112 -25
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/server/server_command.py +31 -1
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/agents/agent_client.py +1 -1
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/copilot/cpe/copilot_cpe_client.py +24 -13
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/tools/tempus_client.py +4 -2
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/docker/compose-lite.yml +1 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/docker/default.env +8 -9
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/flow_builder/flows/flow.py +8 -4
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/flow_builder/types.py +4 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/flow_builder/utils.py +1 -9
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/.gitignore +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/LICENSE +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/agents/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/agents/agent.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/agents/assistant_agent.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/agents/external_agent.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/agents/types.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/agents/webchat_customizations/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/agents/webchat_customizations/prompts.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/agents/webchat_customizations/welcome_content.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/connections/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/connections/connections.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/connections/types.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/knowledge_bases/knowledge_base.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/knowledge_bases/knowledge_base_requests.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/model_policies/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/model_policies/types.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/models/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/models/types.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/toolkits/base_toolkit.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/toolkits/types.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/tools/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/tools/base_tool.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/tools/flow_tool.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/tools/langflow_tool.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/tools/openapi_tool.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/tools/python_tool.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/tools/types.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/utils/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/voice_configurations/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/agent_builder/voice_configurations/types.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/agents/agents_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/channels/channels_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/channels/channels_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/channels/types.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/channels/webchat/channels_webchat_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/channels/webchat/channels_webchat_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/chat/chat_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/connections/connections_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/connections/connections_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/copilot/copilot_server_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/environment/environment_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/environment/environment_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/environment/types.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/evaluations/evaluations_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/login/login_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/models/model_provider_mapper.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/models/models_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/models/models_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/partners/offering/partners_offering_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/partners/offering/partners_offering_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/partners/offering/types.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/partners/partners_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/partners/partners_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/server/types.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/settings/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/langfuse/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/langfuse/langfuse_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/observability_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/settings/settings_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/toolkit/toolkit_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/toolkit/toolkit_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/tools/tools_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/tools/tools_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/tools/types.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/voice_configurations/voice_configurations_command.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/commands/voice_configurations/voice_configurations_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/common.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/config.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/init_helper.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/cli/main.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/agents/assistant_agent_client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/agents/external_agent_client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/analytics/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/analytics/llm/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/analytics/llm/analytics_llm_client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/base_api_client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/base_service_instance.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/client_errors.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/connections/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/connections/connections_client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/connections/utils.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/credentials.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/knowledge_bases/knowledge_base_client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/local_service_instance.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/model_policies/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/model_policies/model_policies_client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/models/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/models/models_client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/service_instance.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/threads/threads_client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/toolkit/toolkit_client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/tools/tool_client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/utils.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/client/voice_configurations/voice_configurations_client.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/docker/proxy-config-single.yaml +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/docker/sdk/ibm_watsonx_orchestrate-0.6.0-py3-none-any.whl +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/docker/sdk/ibm_watsonx_orchestrate-0.6.0.tar.gz +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/docker/start-up.sh +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/docker/tempus/common-config.yaml +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/flow_builder/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/flow_builder/data_map.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/flow_builder/flows/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/flow_builder/flows/constants.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/flow_builder/flows/decorators.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/flow_builder/flows/events.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/flow_builder/node.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/langflow/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/langflow/langflow_utils.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/langflow/lfx_deps.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/run/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/run/connections.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/utils/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/utils/async_helpers.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/utils/docker_utils.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/utils/environment.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/utils/exceptions.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/utils/logging/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/utils/logging/logger.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/utils/logging/logging.yaml +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/utils/tokens.py +0 -0
- {ibm_watsonx_orchestrate-1.13.0b0 → ibm_watsonx_orchestrate-1.13.0b1}/src/ibm_watsonx_orchestrate/utils/utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ibm-watsonx-orchestrate
|
3
|
-
Version: 1.13.
|
3
|
+
Version: 1.13.0b1
|
4
4
|
Summary: IBM watsonx.orchestrate SDK
|
5
5
|
Author-email: IBM <support@ibm.com>
|
6
6
|
License: MIT License
|
@@ -11,7 +11,7 @@ Requires-Dist: click<8.2.0,>=8.0.0
|
|
11
11
|
Requires-Dist: docstring-parser<1.0,>=0.16
|
12
12
|
Requires-Dist: httpx<1.0.0,>=0.28.1
|
13
13
|
Requires-Dist: ibm-cloud-sdk-core>=3.24.2
|
14
|
-
Requires-Dist: ibm-watsonx-orchestrate-evaluation-framework==1.1.
|
14
|
+
Requires-Dist: ibm-watsonx-orchestrate-evaluation-framework==1.1.5
|
15
15
|
Requires-Dist: jsonref==1.1.0
|
16
16
|
Requires-Dist: langchain-core<=0.3.63
|
17
17
|
Requires-Dist: langsmith<=0.3.45
|
@@ -11,6 +11,7 @@ class SpecVersion(str, Enum):
|
|
11
11
|
|
12
12
|
class KnowledgeBaseKind(str, Enum):
|
13
13
|
KNOWLEDGE_BASE = "knowledge_base"
|
14
|
+
|
14
15
|
class RetrievalConfidenceThreshold(str, Enum):
|
15
16
|
Off = "Off"
|
16
17
|
Lowest = "Lowest"
|
@@ -240,6 +241,7 @@ class AstraDBConnection(BaseModel):
|
|
240
241
|
|
241
242
|
class IndexConnection(BaseModel):
|
242
243
|
connection_id: Optional[str] = None
|
244
|
+
app_id: Optional[str] = None
|
243
245
|
milvus: Optional[MilvusConnection] = None
|
244
246
|
elastic_search: Optional[ElasticSearchConnection] = None
|
245
247
|
custom_search: Optional[CustomSearchConnection] = None
|
@@ -16,7 +16,7 @@ from pydantic import BaseModel
|
|
16
16
|
from ibm_watsonx_orchestrate.agent_builder.agents.types import AgentStyle
|
17
17
|
from ibm_watsonx_orchestrate.agent_builder.tools.types import ToolSpec
|
18
18
|
from ibm_watsonx_orchestrate.cli.commands.tools.tools_controller import import_python_tool, ToolsController
|
19
|
-
from ibm_watsonx_orchestrate.cli.commands.knowledge_bases.knowledge_bases_controller import import_python_knowledge_base
|
19
|
+
from ibm_watsonx_orchestrate.cli.commands.knowledge_bases.knowledge_bases_controller import import_python_knowledge_base, KnowledgeBaseController
|
20
20
|
from ibm_watsonx_orchestrate.cli.commands.models.models_controller import import_python_model
|
21
21
|
from ibm_watsonx_orchestrate.cli.common import ListFormats, rich_table_to_markdown
|
22
22
|
|
@@ -1362,8 +1362,10 @@ class AgentsController:
|
|
1362
1362
|
ToolSpec.model_validate(current_spec).model_dump_json(exclude_unset=True,indent=2)
|
1363
1363
|
)
|
1364
1364
|
|
1365
|
+
knowledge_base_controller = KnowledgeBaseController()
|
1365
1366
|
for kb_name in agent_spec_file_content.get("knowledge_base", []):
|
1366
|
-
|
1367
|
+
knowledge_base_file_path = f"{output_file_name}/knowledge-bases/{kb_name}.yaml"
|
1368
|
+
knowledge_base_controller.knowledge_base_export(name=kb_name, output_path=knowledge_base_file_path, zip_file_out=zip_file_out)
|
1367
1369
|
|
1368
1370
|
if kind == AgentKind.NATIVE:
|
1369
1371
|
for collaborator_id in agent.collaborators:
|
@@ -43,6 +43,10 @@ def prompt_tume_command(
|
|
43
43
|
str,
|
44
44
|
typer.Option("--llm", help="Select the agent LLM"),
|
45
45
|
] = None,
|
46
|
+
chat_llm: Annotated[
|
47
|
+
str,
|
48
|
+
typer.Option("--chat-llm", help="Select the underlying model for the copilot. Currently only llama-3-3-70b-instruct is supported."),
|
49
|
+
] = None,
|
46
50
|
samples: Annotated[
|
47
51
|
str,
|
48
52
|
typer.Option("--samples", "-s", help="Path to utterances sample file (txt file where each line is a utterance, or csv file with a single \"input\" column)"),
|
@@ -51,6 +55,7 @@ def prompt_tume_command(
|
|
51
55
|
if file is None:
|
52
56
|
# create agent yaml from scratch
|
53
57
|
create_agent(
|
58
|
+
chat_llm=chat_llm,
|
54
59
|
llm=llm,
|
55
60
|
output_file=output_file,
|
56
61
|
samples_file=samples,
|
@@ -59,6 +64,7 @@ def prompt_tume_command(
|
|
59
64
|
else:
|
60
65
|
# improve existing agent instruction
|
61
66
|
prompt_tune(
|
67
|
+
chat_llm=chat_llm,
|
62
68
|
agent_spec=file,
|
63
69
|
samples_file=samples,
|
64
70
|
output_file=output_file,
|
@@ -77,12 +83,17 @@ def agent_refine(
|
|
77
83
|
] = None,
|
78
84
|
use_last_chat: Annotated[
|
79
85
|
bool,
|
80
|
-
typer.Option("--
|
86
|
+
typer.Option("--use-last-chat", "-l", help="Tuning by using the last conversation with the agent instead of prompting the user to choose chats"),
|
81
87
|
] = False,
|
82
88
|
dry_run_flag: Annotated[
|
83
89
|
bool,
|
84
90
|
typer.Option("--dry-run",
|
85
91
|
help="Dry run will prevent the tuned content being saved and output the results to console"),
|
86
92
|
] = False,
|
93
|
+
chat_llm: Annotated[
|
94
|
+
str,
|
95
|
+
typer.Option("--chat-llm", help="Select the underlying model for the copilot. Currently only llama-3-3-70b-instruct is supported."),
|
96
|
+
] = None,
|
97
|
+
|
87
98
|
):
|
88
|
-
refine_agent_with_trajectories(agent_name, output_file, use_last_chat, dry_run_flag)
|
99
|
+
refine_agent_with_trajectories(agent_name, chat_llm=chat_llm, output_file=output_file, use_last_chat=use_last_chat, dry_run_flag=dry_run_flag)
|
@@ -3,6 +3,7 @@ import os
|
|
3
3
|
import sys
|
4
4
|
import csv
|
5
5
|
import difflib
|
6
|
+
import re
|
6
7
|
from datetime import datetime
|
7
8
|
|
8
9
|
import rich
|
@@ -218,12 +219,12 @@ def get_deployed_tools_agents_and_knowledge_bases():
|
|
218
219
|
return {"tools": all_tools, "collaborators": all_agents, "knowledge_bases": all_knowledge_bases}
|
219
220
|
|
220
221
|
|
221
|
-
def pre_cpe_step(cpe_client):
|
222
|
+
def pre_cpe_step(cpe_client, chat_llm):
|
222
223
|
tools_agents_and_knowledge_bases = get_deployed_tools_agents_and_knowledge_bases()
|
223
224
|
user_message = ""
|
224
225
|
with _get_progress_spinner() as progress:
|
225
226
|
task = progress.add_task(description="Initializing Prompt Engine", total=None)
|
226
|
-
response = cpe_client.submit_pre_cpe_chat(user_message=user_message)
|
227
|
+
response = cpe_client.submit_pre_cpe_chat(chat_llm=chat_llm, user_message=user_message)
|
227
228
|
progress.remove_task(task)
|
228
229
|
|
229
230
|
res = {}
|
@@ -258,7 +259,7 @@ def pre_cpe_step(cpe_client):
|
|
258
259
|
return res
|
259
260
|
with _get_progress_spinner() as progress:
|
260
261
|
task = progress.add_task(description="Thinking...", total=None)
|
261
|
-
response = cpe_client.submit_pre_cpe_chat(
|
262
|
+
response = cpe_client.submit_pre_cpe_chat(chat_llm=chat_llm,**message_content)
|
262
263
|
progress.remove_task(task)
|
263
264
|
|
264
265
|
|
@@ -314,7 +315,7 @@ def gather_examples(samples_file=None):
|
|
314
315
|
return examples
|
315
316
|
|
316
317
|
|
317
|
-
def talk_to_cpe(cpe_client, samples_file=None, context_data=None):
|
318
|
+
def talk_to_cpe(cpe_client, chat_llm, samples_file=None, context_data=None):
|
318
319
|
context_data = context_data or {}
|
319
320
|
examples = gather_examples(samples_file)
|
320
321
|
# upload or gather input examples
|
@@ -322,7 +323,7 @@ def talk_to_cpe(cpe_client, samples_file=None, context_data=None):
|
|
322
323
|
response = None
|
323
324
|
with _get_progress_spinner() as progress:
|
324
325
|
task = progress.add_task(description="Thinking...", total=None)
|
325
|
-
response = cpe_client.init_with_context(context_data=context_data)
|
326
|
+
response = cpe_client.init_with_context(chat_llm=chat_llm, context_data=context_data)
|
326
327
|
progress.remove_task(task)
|
327
328
|
accepted_prompt = None
|
328
329
|
while accepted_prompt is None:
|
@@ -334,13 +335,13 @@ def talk_to_cpe(cpe_client, samples_file=None, context_data=None):
|
|
334
335
|
message = Prompt.ask("\n👤 You").strip()
|
335
336
|
with _get_progress_spinner() as progress:
|
336
337
|
task = progress.add_task(description="Thinking...", total=None)
|
337
|
-
response = cpe_client.invoke(prompt=message)
|
338
|
+
response = cpe_client.invoke(chat_llm=chat_llm, prompt=message)
|
338
339
|
progress.remove_task(task)
|
339
340
|
|
340
341
|
return accepted_prompt
|
341
342
|
|
342
343
|
|
343
|
-
def prompt_tune(agent_spec: str, output_file: str | None, samples_file: str | None, dry_run_flag: bool) -> None:
|
344
|
+
def prompt_tune(agent_spec: str, chat_llm: str | None, output_file: str | None, samples_file: str | None, dry_run_flag: bool) -> None:
|
344
345
|
agent = AgentsController.import_agent(file=agent_spec, app_id=None)[0]
|
345
346
|
agent_kind = agent.kind
|
346
347
|
|
@@ -353,6 +354,7 @@ def prompt_tune(agent_spec: str, output_file: str | None, samples_file: str | No
|
|
353
354
|
output_file = agent_spec
|
354
355
|
|
355
356
|
_validate_output_file(output_file, dry_run_flag)
|
357
|
+
_validate_chat_llm(chat_llm)
|
356
358
|
|
357
359
|
client = get_cpe_client()
|
358
360
|
|
@@ -365,6 +367,7 @@ def prompt_tune(agent_spec: str, output_file: str | None, samples_file: str | No
|
|
365
367
|
knowledge_bases = _get_knowledge_bases_from_names(agent.knowledge_base)
|
366
368
|
try:
|
367
369
|
new_prompt = talk_to_cpe(cpe_client=client,
|
370
|
+
chat_llm=chat_llm,
|
368
371
|
samples_file=samples_file,
|
369
372
|
context_data={
|
370
373
|
"initial_instruction": instr,
|
@@ -387,21 +390,27 @@ def prompt_tune(agent_spec: str, output_file: str | None, samples_file: str | No
|
|
387
390
|
agent.instructions = new_prompt
|
388
391
|
|
389
392
|
if dry_run_flag:
|
390
|
-
rich.print(agent.model_dump(exclude_none=True))
|
393
|
+
rich.print(agent.model_dump(exclude_none=True, mode="json"))
|
391
394
|
else:
|
392
395
|
if os.path.dirname(output_file):
|
393
396
|
os.makedirs(os.path.dirname(output_file), exist_ok=True)
|
394
397
|
AgentsController.persist_record(agent, output_file=output_file)
|
395
398
|
|
399
|
+
def _validate_chat_llm(chat_llm):
|
400
|
+
if chat_llm:
|
401
|
+
formatted_chat_llm = re.sub(r'[^a-zA-Z0-9/]', '-', chat_llm)
|
402
|
+
if "llama-3-3-70b-instruct" not in formatted_chat_llm:
|
403
|
+
raise BadRequest(f"Unsupported chat model for copilot {chat_llm}. Copilot supports only llama-3-3-70b-instruct at this point.")
|
396
404
|
|
397
|
-
def create_agent(output_file: str, llm: str, samples_file: str | None, dry_run_flag: bool = False) -> None:
|
405
|
+
def create_agent(output_file: str, llm: str, chat_llm: str | None, samples_file: str | None, dry_run_flag: bool = False) -> None:
|
398
406
|
_validate_output_file(output_file, dry_run_flag)
|
407
|
+
_validate_chat_llm(chat_llm)
|
399
408
|
# 1. prepare the clients
|
400
409
|
cpe_client = get_cpe_client()
|
401
410
|
|
402
411
|
# 2. Pre-CPE stage:
|
403
412
|
try:
|
404
|
-
res = pre_cpe_step(cpe_client)
|
413
|
+
res = pre_cpe_step(cpe_client, chat_llm=chat_llm)
|
405
414
|
except ConnectionError:
|
406
415
|
logger.error(
|
407
416
|
"Failed to connect to Copilot server. Please ensure Copilot is running via `orchestrate copilot start`")
|
@@ -419,7 +428,7 @@ def create_agent(output_file: str, llm: str, samples_file: str | None, dry_run_f
|
|
419
428
|
agent_style = res["agent_style"]
|
420
429
|
|
421
430
|
# 4. discuss the instructions
|
422
|
-
instructions = talk_to_cpe(cpe_client, samples_file,
|
431
|
+
instructions = talk_to_cpe(cpe_client, chat_llm, samples_file,
|
423
432
|
{'description': description, 'tools': tools, 'collaborators': collaborators,
|
424
433
|
'knowledge_bases': knowledge_bases})
|
425
434
|
|
@@ -438,7 +447,7 @@ def create_agent(output_file: str, llm: str, samples_file: str | None, dry_run_f
|
|
438
447
|
agent.spec_version = SpecVersion.V1
|
439
448
|
|
440
449
|
if dry_run_flag:
|
441
|
-
rich.print(agent.model_dump(exclude_none=True))
|
450
|
+
rich.print(agent.model_dump(exclude_none=True, mode="json"))
|
442
451
|
return
|
443
452
|
|
444
453
|
if os.path.dirname(output_file):
|
@@ -493,7 +502,8 @@ def _suggest_sorted(user_input: str, options: List[str]) -> List[str]:
|
|
493
502
|
return sorted(options, key=lambda x: difflib.SequenceMatcher(None, user_input, x).ratio(), reverse=True)
|
494
503
|
|
495
504
|
|
496
|
-
def refine_agent_with_trajectories(agent_name: str,
|
505
|
+
def refine_agent_with_trajectories(agent_name: str, chat_llm: str | None, output_file: str | None,
|
506
|
+
use_last_chat: bool=False, dry_run_flag: bool = False) -> None:
|
497
507
|
"""
|
498
508
|
Refines an existing agent's instructions using user selected chat trajectories and saves the updated agent configuration.
|
499
509
|
|
@@ -510,6 +520,7 @@ def refine_agent_with_trajectories(agent_name: str, output_file: str | None, use
|
|
510
520
|
|
511
521
|
Parameters:
|
512
522
|
agent_name (str): The name of the agent to refine.
|
523
|
+
chat_llm (str): The name of the model used by the refiner. If None, default model (llama-3-3-70b) is used.
|
513
524
|
output_file (str): Path to the file where the refined agent configuration will be saved.
|
514
525
|
use_last_chat(bool): If true, optimize by using the last conversation with the agent, otherwise let the use choose
|
515
526
|
dry_run_flag (bool): If True, prints the refined agent configuration without saving it to disk.
|
@@ -519,6 +530,7 @@ def refine_agent_with_trajectories(agent_name: str, output_file: str | None, use
|
|
519
530
|
"""
|
520
531
|
|
521
532
|
_validate_output_file(output_file, dry_run_flag)
|
533
|
+
_validate_chat_llm(chat_llm)
|
522
534
|
agents_controller = AgentsController()
|
523
535
|
agents_client = get_native_client()
|
524
536
|
threads_client = get_threads_client()
|
@@ -535,9 +547,6 @@ def refine_agent_with_trajectories(agent_name: str, output_file: str | None, use
|
|
535
547
|
f'Available agents:\n'
|
536
548
|
f'{available_sorted_str}')
|
537
549
|
|
538
|
-
rich.print(Panel(message, title="Agent Lookup", border_style="blue"))
|
539
|
-
return
|
540
|
-
|
541
550
|
cpe_client = get_cpe_client()
|
542
551
|
# Step 2 - retrieve chats (threads)
|
543
552
|
try:
|
@@ -550,7 +559,6 @@ def refine_agent_with_trajectories(agent_name: str, output_file: str | None, use
|
|
550
559
|
raise BadRequest(
|
551
560
|
f"No chats found for agent '{agent_name}'. To use autotune, please initiate at least one conversation with the agent. You can start a chat using `orchestrate chat start`.",
|
552
561
|
)
|
553
|
-
return
|
554
562
|
last_10_threads = all_threads[:10] #TODO use batching when server allows
|
555
563
|
last_10_chats = [_format_thread_messages(chat) for chat in
|
556
564
|
threads_client.get_threads_messages([thread['id'] for thread in last_10_threads])]
|
@@ -621,8 +629,9 @@ def refine_agent_with_trajectories(agent_name: str, output_file: str | None, use
|
|
621
629
|
knowledge_bases = _get_knowledge_bases_from_names(agent.knowledge_base)
|
622
630
|
if agent.instructions is None:
|
623
631
|
raise BadRequest("Agent must have instructions in order to use the autotune command. To build an instruction use `orchestrate copilot prompt-tune -f <path_to_agent_yaml> -o <path_to_new_agent_yaml>`")
|
624
|
-
response = cpe_client.refine_agent_with_chats(agent.instructions,
|
625
|
-
knowledge_bases=knowledge_bases,
|
632
|
+
response = cpe_client.refine_agent_with_chats(instruction=agent.instructions, chat_llm=chat_llm, tools=tools,
|
633
|
+
collaborators=collaborators, knowledge_bases=knowledge_bases,
|
634
|
+
trajectories_with_feedback=threads_messages)
|
626
635
|
progress.remove_task(task)
|
627
636
|
progress.refresh()
|
628
637
|
except ConnectionError:
|
@@ -638,7 +647,7 @@ def refine_agent_with_trajectories(agent_name: str, output_file: str | None, use
|
|
638
647
|
agent.instructions = response['instruction']
|
639
648
|
|
640
649
|
if dry_run_flag:
|
641
|
-
rich.print(agent.model_dump(exclude_none=True))
|
650
|
+
rich.print(agent.model_dump(exclude_none=True, mode="json"))
|
642
651
|
return
|
643
652
|
|
644
653
|
if os.path.dirname(output_file):
|
@@ -17,10 +17,13 @@ from typing_extensions import Annotated
|
|
17
17
|
|
18
18
|
from ibm_watsonx_orchestrate import __version__
|
19
19
|
from ibm_watsonx_orchestrate.cli.commands.evaluations.evaluations_controller import EvaluationsController, EvaluateMode
|
20
|
+
from ibm_watsonx_orchestrate.cli.commands.evaluations.evaluations_environment_manager import run_environment_manager
|
20
21
|
from ibm_watsonx_orchestrate.cli.commands.agents.agents_controller import AgentsController
|
21
22
|
|
22
23
|
logger = logging.getLogger(__name__)
|
23
24
|
|
25
|
+
HIDE_ENVIRONMENT_MGR_PANEL = os.environ.get("HIDE_ENVIRONMENT_MGR_PANEL", "true").lower() == "true"
|
26
|
+
|
24
27
|
evaluation_app = typer.Typer(no_args_is_help=True)
|
25
28
|
|
26
29
|
def _native_agent_template():
|
@@ -142,14 +145,38 @@ def evaluate(
|
|
142
145
|
"--env-file", "-e",
|
143
146
|
help="Path to a .env file that overrides default.env. Then environment variables override both."
|
144
147
|
),
|
145
|
-
] = None
|
148
|
+
] = None,
|
149
|
+
env_manager_path: Annotated[
|
150
|
+
Optional[str],
|
151
|
+
typer.Option(
|
152
|
+
"--env-manager-path",
|
153
|
+
help="""
|
154
|
+
Path to YAML configuration file containing environment settings.\n
|
155
|
+
See `./examples/evaluations/environment_manager` on how to create the environment manager file.
|
156
|
+
Note: When using this feature, you must pass the `output_dir`.
|
157
|
+
""",
|
158
|
+
rich_help_panel="Environment Manager",
|
159
|
+
hidden=HIDE_ENVIRONMENT_MGR_PANEL
|
160
|
+
)
|
161
|
+
] = None,
|
146
162
|
):
|
163
|
+
validate_watsonx_credentials(user_env_file)
|
164
|
+
|
165
|
+
if env_manager_path:
|
166
|
+
if output_dir:
|
167
|
+
return run_environment_manager(
|
168
|
+
environment_manager_path=env_manager_path,
|
169
|
+
output_dir=output_dir,
|
170
|
+
)
|
171
|
+
else:
|
172
|
+
logger.error("Error: `--env_manager_path`, `--output_dir` must be provided to use the environment manager feature.")
|
173
|
+
sys.exit(1)
|
174
|
+
|
147
175
|
if not config_file:
|
148
176
|
if not test_paths or not output_dir:
|
149
177
|
logger.error("Error: Both --test-paths and --output-dir must be provided when not using a config file")
|
150
178
|
exit(1)
|
151
|
-
|
152
|
-
validate_watsonx_credentials(user_env_file)
|
179
|
+
|
153
180
|
controller = EvaluationsController()
|
154
181
|
controller.evaluate(config_file=config_file, test_paths=test_paths, output_dir=output_dir)
|
155
182
|
|
@@ -0,0 +1,158 @@
|
|
1
|
+
import logging
|
2
|
+
import yaml
|
3
|
+
from typing import Mapping, Any
|
4
|
+
from enum import StrEnum
|
5
|
+
from pathlib import Path
|
6
|
+
|
7
|
+
from ibm_watsonx_orchestrate.cli.commands.agents.agents_controller import (
|
8
|
+
AgentsController,
|
9
|
+
Agent,
|
10
|
+
ExternalAgent,
|
11
|
+
AssistantAgent,
|
12
|
+
)
|
13
|
+
from ibm_watsonx_orchestrate.cli.commands.tools.tools_controller import (
|
14
|
+
ToolsController,
|
15
|
+
BaseTool,
|
16
|
+
)
|
17
|
+
from ibm_watsonx_orchestrate.cli.commands.knowledge_bases.knowledge_bases_controller import (
|
18
|
+
KnowledgeBaseController,
|
19
|
+
KnowledgeBase,
|
20
|
+
)
|
21
|
+
from ibm_watsonx_orchestrate.cli.commands.knowledge_bases.knowledge_bases_controller import (
|
22
|
+
parse_file as kb_parse_file,
|
23
|
+
)
|
24
|
+
from ibm_watsonx_orchestrate.cli.commands.evaluations.evaluations_controller import (
|
25
|
+
EvaluationsController,
|
26
|
+
EvaluateMode,
|
27
|
+
)
|
28
|
+
|
29
|
+
|
30
|
+
logger = logging.getLogger(__name__)
|
31
|
+
|
32
|
+
|
33
|
+
class ArtifactTypes(StrEnum):
|
34
|
+
"""The allowed artifacts in the environment manager path.
|
35
|
+
|
36
|
+
The environment manager config looks like this:
|
37
|
+
```json
|
38
|
+
env1:
|
39
|
+
agent:
|
40
|
+
agents_path: None
|
41
|
+
tools:
|
42
|
+
tools_path: None
|
43
|
+
tool_kind: None
|
44
|
+
# any other tool flags
|
45
|
+
knowledge:
|
46
|
+
knowledge_base_path: None
|
47
|
+
test_config: # path to config.yaml
|
48
|
+
clean_up: True
|
49
|
+
```
|
50
|
+
The allowed artifacts/keys are "agent", "tools", "knowledge"
|
51
|
+
"""
|
52
|
+
|
53
|
+
agent = "agent"
|
54
|
+
tools = "tools"
|
55
|
+
knowledge = "knowledge"
|
56
|
+
|
57
|
+
|
58
|
+
class TestCaseManager:
|
59
|
+
def __init__(
|
60
|
+
self,
|
61
|
+
env_settings: Mapping[str, Any],
|
62
|
+
output_dir: str,
|
63
|
+
mode: EvaluateMode = EvaluateMode.default,
|
64
|
+
):
|
65
|
+
self.env_settings = env_settings
|
66
|
+
self.cleanup = env_settings.get("clean_up", False)
|
67
|
+
self.output_dir = output_dir
|
68
|
+
self.mode = mode
|
69
|
+
|
70
|
+
self.agent_controller = AgentsController()
|
71
|
+
self.knowledge_controller = KnowledgeBaseController()
|
72
|
+
self.tool_controller = None
|
73
|
+
if (tool_settings := env_settings.get(ArtifactTypes.tools)):
|
74
|
+
self.tool_controller = ToolsController(
|
75
|
+
tool_kind=tool_settings.get("kind"),
|
76
|
+
file=tool_settings.get("file"),
|
77
|
+
requirements_file=tool_settings.get("requirements_file")
|
78
|
+
)
|
79
|
+
|
80
|
+
self.imported_artifacts = []
|
81
|
+
|
82
|
+
def __enter__(self):
|
83
|
+
for artifact in [
|
84
|
+
ArtifactTypes.tools,
|
85
|
+
ArtifactTypes.knowledge,
|
86
|
+
ArtifactTypes.agent,
|
87
|
+
]:
|
88
|
+
if artifact not in self.env_settings:
|
89
|
+
continue
|
90
|
+
|
91
|
+
artifact_settings = self.env_settings.get(artifact)
|
92
|
+
if artifact == ArtifactTypes.tools:
|
93
|
+
tools = ToolsController.import_tool(**artifact_settings)
|
94
|
+
# import_tool returns Iterator[BaseTool], copy the iterator into a list for preservation
|
95
|
+
# this is needed if user wants environment cleanup
|
96
|
+
tools = [tool for tool in tools]
|
97
|
+
self.imported_artifacts.append(tools)
|
98
|
+
self.tool_controller.publish_or_update_tools(tools)
|
99
|
+
elif artifact == ArtifactTypes.knowledge:
|
100
|
+
KnowledgeBaseController.import_knowledge_base(**artifact_settings)
|
101
|
+
kb_spec = kb_parse_file(artifact_settings.get("file"))
|
102
|
+
self.imported_artifacts.append(kb_spec)
|
103
|
+
elif artifact == ArtifactTypes.agent:
|
104
|
+
artifact_settings["app_id"] = artifact_settings.get("app_id", None)
|
105
|
+
agents = AgentsController.import_agent(**artifact_settings)
|
106
|
+
self.agent_controller.publish_or_update_agents(agents)
|
107
|
+
self.imported_artifacts.append(agents)
|
108
|
+
|
109
|
+
eval = EvaluationsController()
|
110
|
+
eval.evaluate(
|
111
|
+
test_paths=self.env_settings.get("test_paths"),
|
112
|
+
output_dir=self.output_dir,
|
113
|
+
mode=self.mode,
|
114
|
+
)
|
115
|
+
|
116
|
+
return self
|
117
|
+
|
118
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
119
|
+
if self.cleanup:
|
120
|
+
logger.info("Cleaning environment")
|
121
|
+
for artifact in self.imported_artifacts:
|
122
|
+
# artifact can be a list of agents, tools
|
123
|
+
for item in artifact:
|
124
|
+
if isinstance(item, BaseTool):
|
125
|
+
self.tool_controller.remove_tool(item.__tool_spec__.name)
|
126
|
+
if isinstance(item, KnowledgeBase):
|
127
|
+
self.knowledge_controller.remove_knowledge_base(
|
128
|
+
item.id, item.name
|
129
|
+
)
|
130
|
+
if isinstance(item, (Agent, AssistantAgent, ExternalAgent)):
|
131
|
+
self.agent_controller.remove_agent(item.name, item.kind)
|
132
|
+
|
133
|
+
|
134
|
+
def run_environment_manager(
|
135
|
+
environment_manager_path: str,
|
136
|
+
mode: EvaluateMode = EvaluateMode.default,
|
137
|
+
output_dir: str = None,
|
138
|
+
):
|
139
|
+
with open(environment_manager_path, encoding="utf-8", mode="r") as f:
|
140
|
+
env_settings = yaml.load(f, Loader=yaml.SafeLoader)
|
141
|
+
|
142
|
+
for env in env_settings:
|
143
|
+
if not env_settings.get(env).get("enabled"):
|
144
|
+
continue
|
145
|
+
results_folder = Path(output_dir) / env
|
146
|
+
results_folder.mkdir(parents=True, exist_ok=True)
|
147
|
+
logger.info(
|
148
|
+
"Processing environment: '%s'. Results will be saved to '%s'",
|
149
|
+
env,
|
150
|
+
results_folder,
|
151
|
+
)
|
152
|
+
|
153
|
+
with TestCaseManager(
|
154
|
+
env_settings=env_settings.get(env),
|
155
|
+
output_dir=str(results_folder),
|
156
|
+
mode=mode,
|
157
|
+
):
|
158
|
+
logger.info("Finished evaluation for environment: '%s'", env)
|
@@ -59,3 +59,29 @@ def knowledge_base_status(
|
|
59
59
|
):
|
60
60
|
controller = KnowledgeBaseController()
|
61
61
|
controller.knowledge_base_status(id=id, name=name)
|
62
|
+
|
63
|
+
@knowledge_bases_app.command(name="export", help='Export a knowledge base spec to a yaml')
|
64
|
+
def knowledge_base_export(
|
65
|
+
output_file: Annotated[
|
66
|
+
str,
|
67
|
+
typer.Option(
|
68
|
+
"--output",
|
69
|
+
"-o",
|
70
|
+
help="Path to a where the zip file containing the exported data should be saved",
|
71
|
+
),
|
72
|
+
],
|
73
|
+
name: Annotated[
|
74
|
+
str,
|
75
|
+
typer.Option("--name", "-n", help="The name of the knowledge base you want to export"),
|
76
|
+
]=None,
|
77
|
+
id: Annotated[
|
78
|
+
str,
|
79
|
+
typer.Option("--id", "-i", help="The ID of the knowledge base you wish export"),
|
80
|
+
]=None,
|
81
|
+
):
|
82
|
+
controller = KnowledgeBaseController()
|
83
|
+
controller.knowledge_base_export(
|
84
|
+
id=id,
|
85
|
+
name=name,
|
86
|
+
output_path=output_file
|
87
|
+
)
|