ibm-watsonx-orchestrate 1.12.0b0__tar.gz → 1.13.0b0__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.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/PKG-INFO +2 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/pyproject.toml +1 -1
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/__init__.py +2 -1
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/types.py +5 -5
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/connections/types.py +34 -3
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/knowledge_bases/types.py +11 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/models/types.py +18 -1
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/toolkits/base_toolkit.py +1 -1
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/toolkits/types.py +14 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/__init__.py +1 -1
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/base_tool.py +1 -1
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/langflow_tool.py +61 -1
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/openapi_tool.py +6 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/types.py +21 -3
- ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/agent_builder/voice_configurations/__init__.py +1 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/voice_configurations/types.py +11 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/agents/agents_controller.py +29 -53
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/connections/connections_command.py +2 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/connections/connections_controller.py +56 -30
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/copilot/copilot_command.py +25 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/copilot/copilot_controller.py +249 -14
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/copilot/copilot_server_controller.py +4 -4
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/environment/environment_command.py +5 -1
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/environment/environment_controller.py +6 -3
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/evaluations/evaluations_command.py +3 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/evaluations/evaluations_controller.py +1 -1
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/knowledge_bases/knowledge_bases_controller.py +45 -16
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/models/model_provider_mapper.py +23 -4
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/models/models_command.py +2 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/models/models_controller.py +29 -10
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/partners/offering/partners_offering_controller.py +21 -4
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/partners/offering/types.py +7 -15
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/partners/partners_command.py +1 -1
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/server/server_command.py +30 -20
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/toolkit/toolkit_command.py +2 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/toolkit/toolkit_controller.py +139 -27
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/tools/tools_command.py +2 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/tools/tools_controller.py +79 -36
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/voice_configurations/voice_configurations_controller.py +23 -11
- ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/cli/common.py +26 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/config.py +33 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/connections/connections_client.py +1 -14
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/copilot/cpe/copilot_cpe_client.py +34 -1
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/knowledge_bases/knowledge_base_client.py +6 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/model_policies/model_policies_client.py +1 -1
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/models/models_client.py +1 -1
- ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/client/threads/threads_client.py +34 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/utils.py +29 -7
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/docker/compose-lite.yml +58 -8
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/docker/default.env +26 -17
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/flow_builder/flows/decorators.py +10 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/flow_builder/flows/flow.py +90 -16
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/flow_builder/node.py +14 -2
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/flow_builder/types.py +57 -3
- ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/langflow/langflow_utils.py +195 -0
- ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/langflow/lfx_deps.py +84 -0
- ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/utils/async_helpers.py +31 -0
- ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/utils/docker_utils.py +1424 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/utils/environment.py +165 -20
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/utils/exceptions.py +1 -1
- ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/utils/logging/__init__.py +0 -0
- ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/utils/tokens.py +51 -0
- ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/utils/utils.py +77 -0
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/agent_builder/voice_configurations/__init__.py +0 -1
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/utils/docker_utils.py +0 -280
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/utils/utils.py +0 -18
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/.gitignore +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/LICENSE +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/agent.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/assistant_agent.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/external_agent.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/webchat_customizations/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/webchat_customizations/prompts.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/webchat_customizations/welcome_content.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/connections/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/connections/connections.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/knowledge_bases/knowledge_base.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/knowledge_bases/knowledge_base_requests.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/model_policies/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/model_policies/types.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/models/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/flow_tool.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/python_tool.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/agent_builder/utils/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/agents/agents_command.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/channels/channels_command.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/channels/channels_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/channels/types.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/channels/webchat/channels_webchat_command.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/channels/webchat/channels_webchat_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/chat/chat_command.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/environment/types.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/knowledge_bases/knowledge_bases_command.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/login/login_command.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/partners/offering/partners_offering_command.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/partners/partners_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/server/types.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/settings/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/langfuse/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/langfuse/langfuse_command.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/observability_command.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/settings/settings_command.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/tools/types.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/commands/voice_configurations/voice_configurations_command.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/init_helper.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/cli/main.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/agents/agent_client.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/agents/assistant_agent_client.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/agents/external_agent_client.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/analytics/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/analytics/llm/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/analytics/llm/analytics_llm_client.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/base_api_client.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/base_service_instance.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/client.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/client_errors.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/connections/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/connections/utils.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/credentials.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/local_service_instance.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/model_policies/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/models/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/service_instance.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/toolkit/toolkit_client.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/tools/tempus_client.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/tools/tool_client.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/client/voice_configurations/voice_configurations_client.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/docker/proxy-config-single.yaml +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/docker/sdk/ibm_watsonx_orchestrate-0.6.0-py3-none-any.whl +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/docker/sdk/ibm_watsonx_orchestrate-0.6.0.tar.gz +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/docker/start-up.sh +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/docker/tempus/common-config.yaml +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/flow_builder/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/flow_builder/data_map.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/flow_builder/flows/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/flow_builder/flows/constants.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/flow_builder/flows/events.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/flow_builder/utils.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/run → ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/langflow}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/utils → ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/run}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/run/connections.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/utils/logging → ibm_watsonx_orchestrate-1.13.0b0/src/ibm_watsonx_orchestrate/utils}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/utils/logging/logger.py +0 -0
- {ibm_watsonx_orchestrate-1.12.0b0 → ibm_watsonx_orchestrate-1.13.0b0}/src/ibm_watsonx_orchestrate/utils/logging/logging.yaml +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ibm-watsonx-orchestrate
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.13.0b0
|
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.3
|
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
|
@@ -88,7 +88,7 @@ class BaseAgentSpec(BaseModel):
|
|
88
88
|
dumped = self.model_dump(mode='json', exclude_unset=True, exclude_none=True)
|
89
89
|
with open(file, 'w') as f:
|
90
90
|
if file.endswith('.yaml') or file.endswith('.yml'):
|
91
|
-
yaml.dump(dumped, f, sort_keys=False)
|
91
|
+
yaml.dump(dumped, f, sort_keys=False, allow_unicode=True)
|
92
92
|
elif file.endswith('.json'):
|
93
93
|
json.dump(dumped, f, indent=2)
|
94
94
|
else:
|
@@ -219,8 +219,8 @@ def validate_agent_fields(values: dict) -> dict:
|
|
219
219
|
# ===============================
|
220
220
|
|
221
221
|
class ExternalAgentConfig(BaseModel):
|
222
|
-
hidden: bool = False
|
223
|
-
enable_cot: bool = False
|
222
|
+
hidden: Optional[bool] = False
|
223
|
+
enable_cot: Optional[bool] = False
|
224
224
|
|
225
225
|
class ExternalAgentSpec(BaseAgentSpec):
|
226
226
|
model_config = ConfigDict(arbitrary_types_allowed=True)
|
@@ -243,8 +243,8 @@ class ExternalAgentSpec(BaseAgentSpec):
|
|
243
243
|
# The get api responds with a flat object with no config
|
244
244
|
if values.get("config") is None:
|
245
245
|
values["config"] = {}
|
246
|
-
values["config"]["enable_cot"] = values.get("enable_cot",
|
247
|
-
values["config"]["hidden"] = values.get("hidden",
|
246
|
+
values["config"]["enable_cot"] = values.get("enable_cot", False)
|
247
|
+
values["config"]["hidden"] = values.get("hidden", False)
|
248
248
|
return validate_external_agent_fields(values)
|
249
249
|
|
250
250
|
@model_validator(mode="after")
|
@@ -27,6 +27,9 @@ class ConnectionEnvironment(str, Enum):
|
|
27
27
|
|
28
28
|
def __str__(self):
|
29
29
|
return self.value
|
30
|
+
|
31
|
+
def __repr__(self):
|
32
|
+
return repr(self.value)
|
30
33
|
|
31
34
|
class ConnectionPreference(str, Enum):
|
32
35
|
MEMBER = 'member'
|
@@ -188,9 +191,9 @@ class ConnectionCredentialsEntryLocation(str, Enum):
|
|
188
191
|
return self.value
|
189
192
|
|
190
193
|
class ConnectionCredentialsEntry(BaseModel):
|
191
|
-
key: str
|
192
|
-
value: str
|
193
|
-
location: ConnectionCredentialsEntryLocation
|
194
|
+
key: str = Field(description="The key of the custom credential entry.")
|
195
|
+
value: str = Field(description="The value of the custom credential entry.")
|
196
|
+
location: ConnectionCredentialsEntryLocation = Field(description="How the custom credential should be sent to the server")
|
194
197
|
|
195
198
|
def __str__(self):
|
196
199
|
return f"<ConnectionCredentialsEntry: {self.location}:{self.key}={self.value}>"
|
@@ -338,3 +341,31 @@ class IdentityProviderCredentials(BaseOAuthCredentials):
|
|
338
341
|
class ExpectedCredentials(BaseModel):
|
339
342
|
app_id: str
|
340
343
|
type: ConnectionType | List[ConnectionType]
|
344
|
+
|
345
|
+
class FetchConfigAuthTypes(str, Enum):
|
346
|
+
BASIC_AUTH = ConnectionType.BASIC_AUTH.value
|
347
|
+
BEARER_TOKEN = ConnectionType.BEARER_TOKEN.value
|
348
|
+
API_KEY_AUTH = ConnectionType.API_KEY_AUTH.value
|
349
|
+
OAUTH2_AUTH_CODE = ConnectionType.OAUTH2_AUTH_CODE.value
|
350
|
+
OAUTH2_IMPLICIT = 'oauth2_implicit'
|
351
|
+
OAUTH2_PASSWORD = ConnectionType.OAUTH2_PASSWORD.value
|
352
|
+
OAUTH2_CLIENT_CREDS = ConnectionType.OAUTH2_CLIENT_CREDS.value
|
353
|
+
OAUTH_ON_BEHALF_OF_FLOW = ConnectionType.OAUTH_ON_BEHALF_OF_FLOW.value
|
354
|
+
KEY_VALUE = ConnectionType.KEY_VALUE.value
|
355
|
+
|
356
|
+
class ConnectionsListEntry(BaseModel):
|
357
|
+
app_id: str = Field(description="A unique identifier for the connection.")
|
358
|
+
auth_type: Optional[FetchConfigAuthTypes] = Field(default=None, description="The kind of auth used by the connections")
|
359
|
+
type: Optional[ConnectionPreference] = Field(default=None, description="The type of the connections. If set to 'team' the credentails will be shared by all users. If set to 'member' each user will have to provide their own credentials")
|
360
|
+
credentials_set: bool = Field(default=False, description="Are the credentials set for the current user. If using OAuth connection types this value will be False unless there isn a stored token from runtime usage")
|
361
|
+
|
362
|
+
def get_row_details(self):
|
363
|
+
auth_type = self.auth_type if self.auth_type else "n/a"
|
364
|
+
type = self.type if self.type else "n/a"
|
365
|
+
credentials_set = "✅" if self.credentials_set else "❌"
|
366
|
+
return [self.app_id, auth_type, type, credentials_set]
|
367
|
+
|
368
|
+
class ConnectionsListResponse(BaseModel):
|
369
|
+
non_configured: Optional[List[dict] | str] = None
|
370
|
+
draft: Optional[List[dict] | str] = None
|
371
|
+
live: Optional[List[dict] | str] = None
|
@@ -3,7 +3,7 @@ from datetime import datetime
|
|
3
3
|
from uuid import UUID
|
4
4
|
from enum import Enum
|
5
5
|
|
6
|
-
from pydantic import BaseModel, model_validator
|
6
|
+
from pydantic import BaseModel, model_validator, Field
|
7
7
|
|
8
8
|
|
9
9
|
class SpecVersion(str, Enum):
|
@@ -295,4 +295,13 @@ class KnowledgeBaseSpec(BaseModel):
|
|
295
295
|
created_on: Optional[datetime] = None
|
296
296
|
updated_at: Optional[datetime] = None
|
297
297
|
# For import/update
|
298
|
-
documents: list[str] | list[FileUpload] = None
|
298
|
+
documents: list[str] | list[FileUpload] = None
|
299
|
+
|
300
|
+
class KnowledgeBaseListEntry(BaseModel):
|
301
|
+
name: str = Field(description="Name of the knowledge base")
|
302
|
+
description: Optional[str] = Field(description="A description of the content contained in a knowledge base")
|
303
|
+
app_id: Optional[str] = Field(description="The app id for a connection that connects the knowledge base to an external knowledge store")
|
304
|
+
id: Optional[str] = Field(description="Unique identifier of the knowledge base")
|
305
|
+
|
306
|
+
def get_row_details(self):
|
307
|
+
return [self.name, self.description, self.app_id, self.id]
|
@@ -23,6 +23,7 @@ class ModelProvider(str, Enum):
|
|
23
23
|
STABILITY_AI = 'stability-ai'
|
24
24
|
TOGETHER_AI = 'together-ai'
|
25
25
|
WATSONX = 'watsonx'
|
26
|
+
X_AI='x-ai'
|
26
27
|
|
27
28
|
def __str__(self):
|
28
29
|
return self.value
|
@@ -225,5 +226,21 @@ class ListVirtualModel(BaseModel):
|
|
225
226
|
provider_config: Optional[ProviderConfig] = None
|
226
227
|
tags: Optional[List[str]] = None
|
227
228
|
model_type: Optional[str] = None
|
229
|
+
connection_id: Optional[str] = None
|
228
230
|
|
229
|
-
|
231
|
+
class ModelListEntry(BaseModel):
|
232
|
+
name: Optional[str] = Field(default=None, description="Name of the model")
|
233
|
+
description: Optional[str] = Field(default=None, description="A description of the model")
|
234
|
+
is_custom: bool = Field(default=False, description="Is the model a third party model imported into Orchestrate")
|
235
|
+
recommended: bool = Field(default=False, description="Is the model a reccomended model in watsonx. Non-custom models only")
|
236
|
+
|
237
|
+
def get_row_details(self):
|
238
|
+
description = self.description or 'No description provided.'
|
239
|
+
if self.is_custom:
|
240
|
+
return [f"✨️ {self.name}", description]
|
241
|
+
else:
|
242
|
+
name = self.name or "N/A"
|
243
|
+
marker = "★ " if self.recommended else ""
|
244
|
+
return [f"[yellow]{marker}[/yellow]watsonx/{name}", description]
|
245
|
+
|
246
|
+
ANTHROPIC_DEFAULT_MAX_TOKENS = 4096
|
@@ -18,7 +18,7 @@ class BaseToolkit:
|
|
18
18
|
dumped = self.__toolkit_spec__.model_dump(mode='json', exclude_unset=True, exclude_none=True, by_alias=True)
|
19
19
|
with open(file, 'w') as f:
|
20
20
|
if file.endswith('.yaml') or file.endswith('.yml'):
|
21
|
-
yaml.dump(dumped, f)
|
21
|
+
yaml.dump(dumped, f, allow_unicode=True)
|
22
22
|
elif file.endswith('.json'):
|
23
23
|
json.dump(dumped, f, indent=2)
|
24
24
|
else:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from typing import List, Dict, Optional, Union
|
2
2
|
from enum import Enum
|
3
|
-
from pydantic import BaseModel
|
3
|
+
from pydantic import BaseModel, Field
|
4
4
|
|
5
5
|
class ToolkitKind(str, Enum):
|
6
6
|
MCP = "mcp"
|
@@ -42,4 +42,16 @@ class ToolkitSpec(BaseModel):
|
|
42
42
|
created_by: str
|
43
43
|
created_by_username: str
|
44
44
|
tools: List[str] | None
|
45
|
-
mcp: McpModel
|
45
|
+
mcp: McpModel
|
46
|
+
|
47
|
+
class ToolkitListEntry(BaseModel):
|
48
|
+
name: str = Field(description="The name of the Toolkit")
|
49
|
+
description: Optional[str] = Field(description="The description of the Toolkit")
|
50
|
+
type: str = Field(default="MCP", description="The type of Toolkit.")
|
51
|
+
tools: Optional[List[str]] = Field(description = "A list of tool names for every tool in the Toolkit")
|
52
|
+
app_ids: Optional[List[str]] = Field(description = "A list of connection app_ids showing every connection bound to the Toolkit")
|
53
|
+
|
54
|
+
def get_row_details(self):
|
55
|
+
tools = ", ".join(self.tools) if self.tools else ""
|
56
|
+
app_ids = ", ".join(self.app_ids) if self.app_ids else ""
|
57
|
+
return [self.name, self.description, self.type, tools, app_ids]
|
@@ -2,4 +2,4 @@ from .base_tool import BaseTool
|
|
2
2
|
from .python_tool import tool, PythonTool, get_all_python_tools
|
3
3
|
from .openapi_tool import create_openapi_json_tool, create_openapi_json_tool_from_uri, create_openapi_json_tools_from_uri, OpenAPITool, HTTPException
|
4
4
|
from .langflow_tool import LangflowTool
|
5
|
-
from .types import ToolPermission, JsonSchemaObject, ToolRequestBody, ToolResponseBody, OpenApiSecurityScheme, OpenApiToolBinding, PythonToolBinding, WxFlowsToolBinding, SkillToolBinding, ClientSideToolBinding, ToolBinding, ToolSpec
|
5
|
+
from .types import ToolPermission, JsonSchemaObject, ToolRequestBody, ToolResponseBody, OpenApiSecurityScheme, OpenApiToolBinding, PythonToolBinding, WxFlowsToolBinding, SkillToolBinding, ClientSideToolBinding, ToolBinding, ToolSpec, ToolListEntry
|
@@ -19,7 +19,7 @@ class BaseTool:
|
|
19
19
|
dumped = self.__tool_spec__.model_dump(mode='json', exclude_unset=True, exclude_none=True, by_alias=True)
|
20
20
|
with open(file, 'w') as f:
|
21
21
|
if file.endswith('.yaml') or file.endswith('.yml'):
|
22
|
-
yaml.dump(dumped, f)
|
22
|
+
yaml.dump(dumped, f, allow_unicode=True)
|
23
23
|
elif file.endswith('.json'):
|
24
24
|
json.dump(dumped, f, indent=2)
|
25
25
|
else:
|
@@ -2,8 +2,10 @@ import json
|
|
2
2
|
import re
|
3
3
|
|
4
4
|
from pydantic import BaseModel
|
5
|
+
import rich
|
5
6
|
|
6
7
|
from ibm_watsonx_orchestrate.agent_builder.connections.types import ConnectionSecurityScheme
|
8
|
+
from ibm_watsonx_orchestrate.langflow.langflow_utils import parse_langflow_model
|
7
9
|
from .base_tool import BaseTool
|
8
10
|
from .types import LangflowToolBinding, ToolBinding, ToolPermission, ToolRequestBody, ToolResponseBody, ToolSpec
|
9
11
|
from ibm_watsonx_orchestrate.utils.exceptions import BadRequest
|
@@ -14,6 +16,9 @@ LANGFLOW_CHAT_OUTPUT_LABEL = "ChatOutput"
|
|
14
16
|
VALID_NAME_PATTERN = re.compile("^[a-zA-Z](\\w|_)+$")
|
15
17
|
|
16
18
|
class LangflowTool(BaseTool):
|
19
|
+
# additional python module requirements for langflow based tools
|
20
|
+
requirements: list[str] = []
|
21
|
+
|
17
22
|
def __init__(self,spec: ToolSpec):
|
18
23
|
BaseTool.__init__(self,spec=spec)
|
19
24
|
|
@@ -103,6 +108,59 @@ def create_langflow_tool(
|
|
103
108
|
if not validate_langflow_version(langflow_version):
|
104
109
|
raise ValueError(f"Langflow version is below minimum requirements, found '{langflow_version}', miniumum required version '{'.'.join(map(str,MIN_LANGFLOW_VERSION))}'")
|
105
110
|
|
111
|
+
# find all the component in Langflow and display its credential
|
112
|
+
langflow_spec = parse_langflow_model(tool_definition)
|
113
|
+
if langflow_spec:
|
114
|
+
rich.print(f"[bold white]Langflow version used: {langflow_version}[/bold white]")
|
115
|
+
rich.print("Please ensure this flow is compatible with the Langflow version bundled in ADK.")
|
116
|
+
rich.print("\nLangflow components:")
|
117
|
+
|
118
|
+
table = rich.table.Table(show_header=True, header_style="bold white", show_lines=True)
|
119
|
+
column_args = {
|
120
|
+
"ID": {},
|
121
|
+
"Name": {},
|
122
|
+
"Credentials": {},
|
123
|
+
"Requirements": {}
|
124
|
+
}
|
125
|
+
for column in column_args:
|
126
|
+
table.add_column(column,**column_args[column])
|
127
|
+
|
128
|
+
requirements = set()
|
129
|
+
api_key_not_set = False
|
130
|
+
for component in langflow_spec.components:
|
131
|
+
if component.credentials and len(component.credentials) > 0:
|
132
|
+
# create a command separated list with newline
|
133
|
+
component_creds = None
|
134
|
+
for k, v in component.credentials.items():
|
135
|
+
if v is None or v == "":
|
136
|
+
v = 'NOT SET'
|
137
|
+
api_key_not_set = True
|
138
|
+
if component_creds is None:
|
139
|
+
component_creds = f"{k} {v}"
|
140
|
+
else:
|
141
|
+
component_creds += "\n" + f"{k} {v}"
|
142
|
+
else:
|
143
|
+
component_creds = "N/A"
|
144
|
+
|
145
|
+
if component.requirements and len(component.requirements) > 0:
|
146
|
+
# create a command separated list with newline
|
147
|
+
component_req = "\n".join([f"{k}" for k in component.requirements])
|
148
|
+
for r in component.requirements:
|
149
|
+
requirements.add(r)
|
150
|
+
else:
|
151
|
+
component_req = "N/A"
|
152
|
+
table.add_row(component.id,component.name,component_creds,component_req)
|
153
|
+
rich.print(table)
|
154
|
+
|
155
|
+
rich.print("[bold yellow]Tip:[/bold yellow] Langflow tool might require additional python modules. Identified requirements will be added.")
|
156
|
+
rich.print("[bold yellow]Tip:[/bold yellow] Avoid hardcoding sensitive values. Use Orchestrate connections to manage secrets securely.")
|
157
|
+
if api_key_not_set:
|
158
|
+
rich.print("[bold yellow]Warning:[/bold yellow] Some required api key(s) were not set in the flow. Please adjust the flow to include them.")
|
159
|
+
rich.print("Ensure each credential follows the <app-id>_<variable> naming convention within the Langflow model.")
|
160
|
+
|
161
|
+
for connection in connections:
|
162
|
+
rich.print(f"* Connection: {connection} → Suggested naming: {connection}_<variable>")
|
163
|
+
|
106
164
|
spec = ToolSpec(
|
107
165
|
name=name,
|
108
166
|
description=description,
|
@@ -121,4 +179,6 @@ def create_langflow_tool(
|
|
121
179
|
)
|
122
180
|
)
|
123
181
|
|
124
|
-
|
182
|
+
tool = LangflowTool(spec=spec)
|
183
|
+
tool.requirements = requirements
|
184
|
+
return tool
|
@@ -80,6 +80,7 @@ def create_openapi_json_tool(
|
|
80
80
|
http_success_response_code: int = 200,
|
81
81
|
http_response_content_type='application/json',
|
82
82
|
name: str = None,
|
83
|
+
display_name: str = None,
|
83
84
|
description: str = None,
|
84
85
|
permission: ToolPermission = None,
|
85
86
|
input_schema: ToolRequestBody = None,
|
@@ -130,8 +131,10 @@ def create_openapi_json_tool(
|
|
130
131
|
raise BadRequest(
|
131
132
|
f"No description provided for tool. {http_method}: {http_path} did not specify a description field, and no description was provided")
|
132
133
|
|
134
|
+
spec_display_name = display_name if display_name else route_spec.get('summary')
|
133
135
|
spec = ToolSpec(
|
134
136
|
name=spec_name,
|
137
|
+
display_name=spec_display_name,
|
135
138
|
description=spec_description,
|
136
139
|
permission=spec_permission
|
137
140
|
)
|
@@ -348,6 +351,7 @@ async def create_openapi_json_tool_from_uri(
|
|
348
351
|
http_response_content_type='application/json',
|
349
352
|
permission: ToolPermission = ToolPermission.READ_ONLY,
|
350
353
|
name: str = None,
|
354
|
+
display_name: str = None,
|
351
355
|
description: str = None,
|
352
356
|
input_schema: ToolRequestBody = None,
|
353
357
|
output_schema: ToolResponseBody = None,
|
@@ -362,6 +366,7 @@ async def create_openapi_json_tool_from_uri(
|
|
362
366
|
:param http_success_response_code: Which http status code should be considered a successful call (defaults to 200)
|
363
367
|
:param http_response_content_type: Which http response type should be considered successful (default to application/json)
|
364
368
|
:param name: The name of the resulting tool (used to invoke the tool by the agent)
|
369
|
+
:param display_name: The name of the resulting tool to be displayed
|
365
370
|
:param description: The description of the resulting tool (used as the semantic layer to help the agent with tool selection)
|
366
371
|
:param permission: Which orchestrate permission level does a user need to have to invoke this tool
|
367
372
|
:param input_schema: The JSONSchema of the inputs to the http request
|
@@ -379,6 +384,7 @@ async def create_openapi_json_tool_from_uri(
|
|
379
384
|
http_response_content_type=http_response_content_type,
|
380
385
|
permission=permission,
|
381
386
|
name=name,
|
387
|
+
display_name=display_name,
|
382
388
|
description=description,
|
383
389
|
input_schema=input_schema,
|
384
390
|
output_schema=output_schema,
|
@@ -1,10 +1,12 @@
|
|
1
1
|
from enum import Enum
|
2
2
|
from typing import List, Any, Dict, Literal, Optional, Union
|
3
|
+
import logging
|
3
4
|
|
4
|
-
from pydantic import BaseModel, model_validator, ConfigDict, Field, AliasChoices, ValidationError
|
5
|
+
from pydantic import BaseModel, model_validator, ConfigDict, Field, AliasChoices, ValidationError, ValidationInfo
|
5
6
|
from ibm_watsonx_orchestrate.utils.exceptions import BadRequest
|
6
7
|
from ibm_watsonx_orchestrate.agent_builder.connections import KeyValueConnectionCredentials
|
7
8
|
|
9
|
+
logger = logging.getLogger(__name__)
|
8
10
|
|
9
11
|
class ToolPermission(str, Enum):
|
10
12
|
READ_ONLY = 'read_only'
|
@@ -117,9 +119,14 @@ class OpenApiToolBinding(BaseModel):
|
|
117
119
|
acknowledgement: Optional[AcknowledgementBinding] = None
|
118
120
|
|
119
121
|
@model_validator(mode='after')
|
120
|
-
def validate_openapi_tool_binding(self):
|
122
|
+
def validate_openapi_tool_binding(self, info: ValidationInfo):
|
123
|
+
context = getattr(info, "context", None)
|
124
|
+
|
121
125
|
if len(self.servers) != 1:
|
122
|
-
|
126
|
+
if isinstance(context, str) and context == "list":
|
127
|
+
logger.warning("OpenAPI definition must include exactly one server")
|
128
|
+
else:
|
129
|
+
raise BadRequest("OpenAPI definition must include exactly one server")
|
123
130
|
return self
|
124
131
|
|
125
132
|
|
@@ -259,3 +266,14 @@ class ToolSpec(BaseModel):
|
|
259
266
|
return False
|
260
267
|
|
261
268
|
return True
|
269
|
+
|
270
|
+
class ToolListEntry(BaseModel):
|
271
|
+
name: str = Field(description="The name of the tool")
|
272
|
+
description: Optional[str] = Field(description="A description of the purpose of the tool")
|
273
|
+
type: Optional[str] = Field(description="The type of the tool"),
|
274
|
+
toolkit: Optional[str] = Field(description="The name of the Toolkit the tool belongs. Empty if the tool is not from a Toolkit"),
|
275
|
+
app_ids: Optional[List[str]] = Field(description="A list of app_ids that show what connections are bound to a tool")
|
276
|
+
|
277
|
+
def get_row_details(self):
|
278
|
+
app_ids = ", ".join(self.app_ids) if self.app_ids else ""
|
279
|
+
return [self.name, self.description, self.type, self.toolkit, app_ids]
|
@@ -0,0 +1 @@
|
|
1
|
+
from .types import VoiceConfiguration, VoiceConfigurationListEntry
|
@@ -95,4 +95,15 @@ class VoiceConfiguration(BaseModel):
|
|
95
95
|
dumped = self.model_dump(mode='json', exclude_none=True)
|
96
96
|
return json.dumps(dumped, indent=2)
|
97
97
|
|
98
|
+
class VoiceConfigurationListEntry(BaseModel):
|
99
|
+
name: str = Field(description="Name of the voice configuration.")
|
100
|
+
id: str = Field(default=None, description="A unique identifier for the voice configuration.")
|
101
|
+
speech_to_text_provider: Optional[str] = Field("The speech to text service provider.")
|
102
|
+
text_to_speech_provider: Optional[str] = Field("The text to speech service provider.")
|
103
|
+
attached_agents: Optional[List[str]] = Field("A list of agent names that use the voice configuration.")
|
104
|
+
|
105
|
+
def get_row_details(self):
|
106
|
+
attached_agents = ", ".join(self.attached_agents) if self.attached_agents else ""
|
107
|
+
return [self.name, self.id, self.speech_to_text_provider, self.text_to_speech_provider, attached_agents]
|
108
|
+
|
98
109
|
|
@@ -18,6 +18,7 @@ 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
19
|
from ibm_watsonx_orchestrate.cli.commands.knowledge_bases.knowledge_bases_controller import import_python_knowledge_base
|
20
20
|
from ibm_watsonx_orchestrate.cli.commands.models.models_controller import import_python_model
|
21
|
+
from ibm_watsonx_orchestrate.cli.common import ListFormats, rich_table_to_markdown
|
21
22
|
|
22
23
|
from ibm_watsonx_orchestrate.agent_builder.agents import (
|
23
24
|
Agent,
|
@@ -41,23 +42,11 @@ from ibm_watsonx_orchestrate.utils.utils import check_file_in_zip
|
|
41
42
|
from rich.console import Console
|
42
43
|
from rich.progress import Progress, SpinnerColumn, TextColumn
|
43
44
|
|
44
|
-
from enum import Enum
|
45
|
-
|
46
45
|
logger = logging.getLogger(__name__)
|
47
46
|
|
48
47
|
# Helper generic type for any agent
|
49
48
|
AnyAgentT = TypeVar("AnyAgentT", bound=Agent | ExternalAgent | AssistantAgent)
|
50
49
|
|
51
|
-
class AgentListFormats(str, Enum):
|
52
|
-
Table = "table"
|
53
|
-
JSON = "json"
|
54
|
-
|
55
|
-
def __str__(self):
|
56
|
-
return self.value
|
57
|
-
|
58
|
-
def __repr__(self):
|
59
|
-
return repr(self.value)
|
60
|
-
|
61
50
|
|
62
51
|
def import_python_agent(file: str) -> List[Agent | ExternalAgent | AssistantAgent]:
|
63
52
|
# Import tools
|
@@ -858,7 +847,7 @@ class AgentsController:
|
|
858
847
|
|
859
848
|
def _get_all_unique_agent_resources(self, agents: List[Agent], target_attr: str) -> List[str]:
|
860
849
|
"""
|
861
|
-
Given a list
|
850
|
+
Given a list of agents get all the unique values of a certain field
|
862
851
|
Example: agent1.tools = [1 ,2 ,3] and agent2.tools = [2, 4, 5] then return [1, 2, 3, 4, 5]
|
863
852
|
Example: agent1.id = "123" and agent2.id = "456" then return ["123", "456"]
|
864
853
|
|
@@ -959,18 +948,14 @@ class AgentsController:
|
|
959
948
|
if tool_names:
|
960
949
|
agent.tools = tool_names
|
961
950
|
return new_agents
|
962
|
-
|
963
|
-
# TODO: Once bulk knowledge base is added create a generaic fucntion as opposed to 3 seperate ones
|
951
|
+
|
964
952
|
def _bulk_resolve_agent_knowledge_bases(self, agents: List[Agent]) -> List[Agent]:
|
965
953
|
new_agents = agents.copy()
|
966
954
|
all_kb_ids = self._get_all_unique_agent_resources(new_agents, "knowledge_base")
|
955
|
+
if not all_kb_ids:
|
956
|
+
return new_agents
|
967
957
|
|
968
|
-
all_kbs =
|
969
|
-
for id in all_kb_ids:
|
970
|
-
try:
|
971
|
-
all_kbs.append(self.get_knowledge_base_client().get_by_id(id))
|
972
|
-
except:
|
973
|
-
continue
|
958
|
+
all_kbs = self._batch_request_resource(self.get_knowledge_base_client().get_by_ids, all_kb_ids)
|
974
959
|
|
975
960
|
kb_lut = self._construct_lut_agent_resource(all_kbs, "id", "name")
|
976
961
|
|
@@ -1016,24 +1001,7 @@ class AgentsController:
|
|
1016
1001
|
agent.app_id = app_id
|
1017
1002
|
return new_agents
|
1018
1003
|
|
1019
|
-
|
1020
|
-
def _rich_table_to_markdown(self, table: rich.table.Table) -> str:
|
1021
|
-
headers = [column.header for column in table.columns]
|
1022
|
-
cols = [[cell for cell in col.cells] for col in table.columns]
|
1023
|
-
rows = list(map(list, zip(*cols)))
|
1024
|
-
|
1025
|
-
# Header row
|
1026
|
-
md = "| " + " | ".join(headers) + " |\n"
|
1027
|
-
# Separator row
|
1028
|
-
md += "| " + " | ".join(["---"] * len(headers)) + " |\n"
|
1029
|
-
# # Data rows
|
1030
|
-
for row in rows:
|
1031
|
-
md += "| " + " | ".join(row) + " |\n"
|
1032
|
-
return md
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
def list_agents(self, kind: AgentKind=None, verbose: bool=False, format: AgentListFormats | None = None) -> dict[str, dict] | None:
|
1004
|
+
def list_agents(self, kind: AgentKind=None, verbose: bool=False, format: ListFormats | None = None) -> dict[str, dict] | dict[str, str] | None:
|
1037
1005
|
"""
|
1038
1006
|
List agents in the active wxo environment
|
1039
1007
|
|
@@ -1068,7 +1036,7 @@ class AgentsController:
|
|
1068
1036
|
resolved_native_agents = self._bulk_resolve_agent_knowledge_bases(resolved_native_agents)
|
1069
1037
|
resolved_native_agents = self._bulk_resolve_agent_collaborators(resolved_native_agents)
|
1070
1038
|
|
1071
|
-
if format and format ==
|
1039
|
+
if format and format == ListFormats.JSON:
|
1072
1040
|
agents_list = []
|
1073
1041
|
for agent in resolved_native_agents:
|
1074
1042
|
agents_list.append(json.loads(agent.dumps_spec()))
|
@@ -1096,8 +1064,9 @@ class AgentsController:
|
|
1096
1064
|
native_table.add_column(column, **column_args[column])
|
1097
1065
|
|
1098
1066
|
for agent in resolved_native_agents:
|
1067
|
+
agent_name = self._format_agent_display_name(agent)
|
1099
1068
|
native_table.add_row(
|
1100
|
-
|
1069
|
+
agent_name,
|
1101
1070
|
agent.description,
|
1102
1071
|
agent.llm,
|
1103
1072
|
agent.style,
|
@@ -1106,8 +1075,8 @@ class AgentsController:
|
|
1106
1075
|
", ".join(agent.knowledge_base),
|
1107
1076
|
agent.id,
|
1108
1077
|
)
|
1109
|
-
if format ==
|
1110
|
-
output_dictionary["native"] =
|
1078
|
+
if format == ListFormats.Table:
|
1079
|
+
output_dictionary["native"] = rich_table_to_markdown(native_table)
|
1111
1080
|
else:
|
1112
1081
|
rich.print(native_table)
|
1113
1082
|
|
@@ -1123,7 +1092,7 @@ class AgentsController:
|
|
1123
1092
|
else:
|
1124
1093
|
resolved_external_agents = self._bulk_resolve_agent_app_ids(external_agents)
|
1125
1094
|
|
1126
|
-
if format and format ==
|
1095
|
+
if format and format == ListFormats.JSON:
|
1127
1096
|
external_agents_list = []
|
1128
1097
|
for agent in resolved_external_agents:
|
1129
1098
|
external_agents_list.append(json.loads(agent.dumps_spec()))
|
@@ -1157,8 +1126,9 @@ class AgentsController:
|
|
1157
1126
|
app_id = connections_client.get_draft_by_id(agent.connection_id)
|
1158
1127
|
resolved_native_agents = self._bulk_resolve_agent_app_ids(external_agents)
|
1159
1128
|
|
1129
|
+
agent_name = self._format_agent_display_name(agent)
|
1160
1130
|
external_table.add_row(
|
1161
|
-
|
1131
|
+
agent_name,
|
1162
1132
|
agent.title,
|
1163
1133
|
agent.description,
|
1164
1134
|
", ".join(agent.tags or []),
|
@@ -1169,8 +1139,8 @@ class AgentsController:
|
|
1169
1139
|
app_id,
|
1170
1140
|
agent.id
|
1171
1141
|
)
|
1172
|
-
if format ==
|
1173
|
-
output_dictionary["external"] =
|
1142
|
+
if format == ListFormats.Table:
|
1143
|
+
output_dictionary["external"] = rich_table_to_markdown(external_table)
|
1174
1144
|
else:
|
1175
1145
|
rich.print(external_table)
|
1176
1146
|
|
@@ -1186,7 +1156,7 @@ class AgentsController:
|
|
1186
1156
|
else:
|
1187
1157
|
resolved_external_agents = self._bulk_resolve_agent_app_ids(assistant_agents)
|
1188
1158
|
|
1189
|
-
if format and format ==
|
1159
|
+
if format and format == ListFormats.JSON:
|
1190
1160
|
assistant_agents_list = []
|
1191
1161
|
for agent in resolved_external_agents:
|
1192
1162
|
assistant_agents_list.append(json.loads(agent.dumps_spec()))
|
@@ -1215,8 +1185,9 @@ class AgentsController:
|
|
1215
1185
|
assistants_table.add_column(column, **column_args[column])
|
1216
1186
|
|
1217
1187
|
for agent in assistant_agents:
|
1188
|
+
agent_name = self._format_agent_display_name(agent)
|
1218
1189
|
assistants_table.add_row(
|
1219
|
-
|
1190
|
+
agent_name,
|
1220
1191
|
agent.title,
|
1221
1192
|
agent.description,
|
1222
1193
|
", ".join(agent.tags or []),
|
@@ -1227,8 +1198,8 @@ class AgentsController:
|
|
1227
1198
|
agent.config.environment_id,
|
1228
1199
|
agent.id
|
1229
1200
|
)
|
1230
|
-
if format ==
|
1231
|
-
output_dictionary["assistant"] =
|
1201
|
+
if format == ListFormats.Table:
|
1202
|
+
output_dictionary["assistant"] = rich_table_to_markdown(assistants_table)
|
1232
1203
|
else:
|
1233
1204
|
rich.print(assistants_table)
|
1234
1205
|
|
@@ -1330,7 +1301,7 @@ class AgentsController:
|
|
1330
1301
|
if agent_only_flag:
|
1331
1302
|
logger.info(f"Exported agent definition for '{name}' to '{output_path}'")
|
1332
1303
|
with open(output_path, 'w') as outfile:
|
1333
|
-
yaml.dump(agent_spec_file_content, outfile, sort_keys=False, default_flow_style=False)
|
1304
|
+
yaml.dump(agent_spec_file_content, outfile, sort_keys=False, default_flow_style=False, allow_unicode=True)
|
1334
1305
|
return
|
1335
1306
|
|
1336
1307
|
close_file_flag = False
|
@@ -1340,7 +1311,7 @@ class AgentsController:
|
|
1340
1311
|
|
1341
1312
|
logger.info(f"Exporting agent definition for '{name}'")
|
1342
1313
|
|
1343
|
-
agent_spec_yaml = yaml.dump(agent_spec_file_content, sort_keys=False, default_flow_style=False)
|
1314
|
+
agent_spec_yaml = yaml.dump(agent_spec_file_content, sort_keys=False, default_flow_style=False, allow_unicode=True)
|
1344
1315
|
agent_spec_yaml_bytes = agent_spec_yaml.encode("utf-8")
|
1345
1316
|
agent_spec_yaml_file = io.BytesIO(agent_spec_yaml_bytes)
|
1346
1317
|
|
@@ -1523,4 +1494,9 @@ class AgentsController:
|
|
1523
1494
|
logger.info(f"Successfully undeployed agent {name}")
|
1524
1495
|
else:
|
1525
1496
|
logger.error(f"Error undeploying agent {name}")
|
1497
|
+
|
1498
|
+
@staticmethod
|
1499
|
+
def _format_agent_display_name(agent: AnyAgentT) -> str:
|
1500
|
+
return f"{agent.name} ({agent.display_name})" if agent.display_name and agent.name != agent.display_name else agent.name
|
1501
|
+
|
1526
1502
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import typer
|
2
2
|
from typing_extensions import Annotated, List
|
3
|
-
from ibm_watsonx_orchestrate.agent_builder.connections.types import ConnectionEnvironment, ConnectionPreference, ConnectionKind, ConnectionCredentialsEntry
|
3
|
+
from ibm_watsonx_orchestrate.agent_builder.connections.types import ConnectionEnvironment, ConnectionPreference, ConnectionKind, ConnectionCredentialsEntry, ConnectionSendVia
|
4
4
|
from ibm_watsonx_orchestrate.cli.commands.connections.connections_controller import (
|
5
5
|
add_connection,
|
6
6
|
remove_connection,
|
@@ -222,7 +222,7 @@ def set_credentials_connection_command(
|
|
222
222
|
)
|
223
223
|
] = None,
|
224
224
|
send_via: Annotated[
|
225
|
-
|
225
|
+
ConnectionSendVia,
|
226
226
|
typer.Option(
|
227
227
|
'--send-via',
|
228
228
|
help='For oauth_auth_client_credentials_flow, how the token will be sent to the server. Defaults to using `header`'
|