ibm-watsonx-orchestrate 1.11.0b0__tar.gz → 1.12.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.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/PKG-INFO +2 -2
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/pyproject.toml +1 -1
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/__init__.py +1 -1
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/types.py +30 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/connections/connections.py +8 -5
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/connections/types.py +14 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/knowledge_bases/types.py +25 -10
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/__init__.py +1 -0
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/agent_builder/tools/langflow_tool.py +124 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/openapi_tool.py +3 -3
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/types.py +20 -2
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/agents/agents_command.py +10 -2
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/agents/agents_controller.py +421 -177
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/connections/connections_command.py +18 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/connections/connections_controller.py +114 -0
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/cli/commands/copilot/copilot_server_controller.py +103 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/environment/environment_command.py +1 -1
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/evaluations/evaluations_command.py +223 -2
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/evaluations/evaluations_controller.py +93 -9
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/models/models_controller.py +3 -3
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/cli/commands/partners/offering/partners_offering_command.py +56 -0
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/cli/commands/partners/offering/partners_offering_controller.py +458 -0
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/cli/commands/partners/offering/types.py +107 -0
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/cli/commands/partners/partners_command.py +12 -0
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/cli/commands/server/server_command.py +684 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/server/types.py +1 -1
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/toolkit/toolkit_controller.py +2 -2
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/tools/tools_command.py +2 -3
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/tools/tools_controller.py +206 -43
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/main.py +2 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/base_api_client.py +31 -10
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/connections/connections_client.py +18 -1
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/service_instance.py +19 -34
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/tools/tempus_client.py +3 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/tools/tool_client.py +5 -2
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/utils.py +34 -2
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/docker/compose-lite.yml +14 -12
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/docker/default.env +17 -17
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/flow_builder/flows/flow.py +3 -1
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/flow_builder/types.py +252 -1
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/utils/docker_utils.py +280 -0
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/utils/environment.py +369 -0
- ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/utils/logging/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/utils/utils.py +1 -1
- ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/cli/commands/copilot/copilot_server_controller.py +0 -170
- ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/cli/commands/server/server_command.py +0 -1205
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/.gitignore +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/LICENSE +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/agent.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/assistant_agent.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/external_agent.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/webchat_customizations/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/webchat_customizations/prompts.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/agents/webchat_customizations/welcome_content.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/connections/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/knowledge_bases/knowledge_base.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/knowledge_bases/knowledge_base_requests.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/model_policies/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/model_policies/types.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/models/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/models/types.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/toolkits/base_toolkit.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/toolkits/types.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/base_tool.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/flow_tool.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/tools/python_tool.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/utils/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/voice_configurations/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/agent_builder/voice_configurations/types.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/channels/channels_command.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/channels/channels_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/channels/types.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/channels/webchat/channels_webchat_command.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/channels/webchat/channels_webchat_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/chat/chat_command.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/copilot/copilot_command.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/copilot/copilot_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/environment/environment_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/environment/types.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/knowledge_bases/knowledge_bases_command.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/knowledge_bases/knowledge_bases_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/login/login_command.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/models/model_provider_mapper.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/models/models_command.py +0 -0
- /ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/cli/commands/settings/__init__.py → /ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/cli/commands/partners/partners_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/cli/commands/settings/observability → ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/cli/commands/settings}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/langfuse → ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/cli/commands/settings/observability}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/client → ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/langfuse}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/langfuse/langfuse_command.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/settings/observability/observability_command.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/settings/settings_command.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/toolkit/toolkit_command.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/tools/types.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/voice_configurations/voice_configurations_command.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/commands/voice_configurations/voice_configurations_controller.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/config.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/cli/init_helper.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/client/analytics → ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/client}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/agents/agent_client.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/agents/assistant_agent_client.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/agents/external_agent_client.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/client/analytics/llm → ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/client/analytics}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/client/model_policies → ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/client/analytics/llm}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/analytics/llm/analytics_llm_client.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/base_service_instance.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/client.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/client_errors.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/connections/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/connections/utils.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/copilot/cpe/copilot_cpe_client.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/credentials.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/knowledge_bases/knowledge_base_client.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/local_service_instance.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/client/models → ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/client/model_policies}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/model_policies/model_policies_client.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/flow_builder → ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/client/models}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/models/models_client.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/toolkit/toolkit_client.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/client/voice_configurations/voice_configurations_client.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/docker/proxy-config-single.yaml +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/docker/sdk/ibm_watsonx_orchestrate-0.6.0-py3-none-any.whl +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/docker/sdk/ibm_watsonx_orchestrate-0.6.0.tar.gz +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/docker/start-up.sh +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/docker/tempus/common-config.yaml +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/run → ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/flow_builder}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/flow_builder/data_map.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/flow_builder/flows/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/flow_builder/flows/constants.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/flow_builder/flows/decorators.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/flow_builder/flows/events.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/flow_builder/node.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/flow_builder/utils.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/utils → ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/run}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/run/connections.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0/src/ibm_watsonx_orchestrate/utils/logging → ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/utils}/__init__.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/utils/exceptions.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.0b0}/src/ibm_watsonx_orchestrate/utils/logging/logger.py +0 -0
- {ibm_watsonx_orchestrate-1.11.0b0 → ibm_watsonx_orchestrate-1.12.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.12.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.
|
14
|
+
Requires-Dist: ibm-watsonx-orchestrate-evaluation-framework==1.1.2
|
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
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import json
|
2
2
|
import yaml
|
3
|
+
import logging
|
3
4
|
from enum import Enum
|
4
5
|
from typing import List, Optional, Dict
|
5
6
|
from pydantic import BaseModel, model_validator, ConfigDict
|
@@ -9,6 +10,7 @@ from ibm_watsonx_orchestrate.agent_builder.knowledge_bases.knowledge_base import
|
|
9
10
|
from ibm_watsonx_orchestrate.agent_builder.agents.webchat_customizations import StarterPrompts, WelcomeContent
|
10
11
|
from pydantic import Field, AliasChoices
|
11
12
|
from typing import Annotated
|
13
|
+
from ibm_watsonx_orchestrate.cli.commands.partners.offering.types import CATALOG_ONLY_FIELDS
|
12
14
|
from ibm_watsonx_orchestrate.utils.exceptions import BadRequest
|
13
15
|
|
14
16
|
from ibm_watsonx_orchestrate.agent_builder.tools.types import JsonSchemaObject
|
@@ -16,6 +18,8 @@ from ibm_watsonx_orchestrate.agent_builder.tools.types import JsonSchemaObject
|
|
16
18
|
# TO-DO: this is just a placeholder. Will update this later to align with backend
|
17
19
|
DEFAULT_LLM = "watsonx/meta-llama/llama-3-2-90b-vision-instruct"
|
18
20
|
|
21
|
+
logger = logging.getLogger(__name__)
|
22
|
+
|
19
23
|
# Handles yaml formatting for multiline strings to improve readability
|
20
24
|
def str_presenter(dumper, data):
|
21
25
|
if len(data.splitlines()) > 1: # check for multiline string
|
@@ -93,6 +97,19 @@ class BaseAgentSpec(BaseModel):
|
|
93
97
|
def dumps_spec(self) -> str:
|
94
98
|
dumped = self.model_dump(mode='json', exclude_none=True)
|
95
99
|
return json.dumps(dumped, indent=2)
|
100
|
+
|
101
|
+
@model_validator(mode="before")
|
102
|
+
def validate_agent_fields(cls,values):
|
103
|
+
return drop_catalog_fields(values)
|
104
|
+
|
105
|
+
|
106
|
+
def drop_catalog_fields(values: dict):
|
107
|
+
for field in CATALOG_ONLY_FIELDS:
|
108
|
+
if values.get(field):
|
109
|
+
logger.warning(f"Field '{field}' is only used when publishing to the catalog, dropping this field for import")
|
110
|
+
del values[field]
|
111
|
+
return values
|
112
|
+
|
96
113
|
|
97
114
|
# ===============================
|
98
115
|
# NATIVE AGENT TYPES
|
@@ -223,6 +240,11 @@ class ExternalAgentSpec(BaseAgentSpec):
|
|
223
240
|
|
224
241
|
@model_validator(mode="before")
|
225
242
|
def validate_fields_for_external(cls, values):
|
243
|
+
# The get api responds with a flat object with no config
|
244
|
+
if values.get("config") is None:
|
245
|
+
values["config"] = {}
|
246
|
+
values["config"]["enable_cot"] = values.get("enable_cot", None)
|
247
|
+
values["config"]["hidden"] = values.get("hidden", None)
|
226
248
|
return validate_external_agent_fields(values)
|
227
249
|
|
228
250
|
@model_validator(mode="after")
|
@@ -276,6 +298,14 @@ class AssistantAgentSpec(BaseAgentSpec):
|
|
276
298
|
|
277
299
|
@model_validator(mode="before")
|
278
300
|
def validate_fields_for_external(cls, values):
|
301
|
+
if values.get("config") is None:
|
302
|
+
values["config"] = {}
|
303
|
+
values["config"]["api_version"] = values.get("api_version", None)
|
304
|
+
values["config"]["assistant_id"] = values.get("assistant_id", None)
|
305
|
+
values["config"]["crn"] = values.get("crn", None)
|
306
|
+
values["config"]["service_instance_url"] = values.get("service_instance_url", None)
|
307
|
+
values["config"]["environment_id"] = values.get("environment_id", None)
|
308
|
+
values["config"]["authorization_url"] = values.get("authorization_url", None)
|
279
309
|
return validate_assistant_agent_fields(values)
|
280
310
|
|
281
311
|
@model_validator(mode="after")
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import os
|
2
2
|
import logging
|
3
|
+
from copy import deepcopy
|
3
4
|
from typing import List
|
4
5
|
from ibm_watsonx_orchestrate.agent_builder.connections.types import (
|
5
6
|
BasicAuthCredentials,
|
@@ -13,7 +14,7 @@ from ibm_watsonx_orchestrate.agent_builder.connections.types import (
|
|
13
14
|
CONNECTION_TYPE_CREDENTIAL_MAPPING
|
14
15
|
)
|
15
16
|
|
16
|
-
from ibm_watsonx_orchestrate.utils.utils import
|
17
|
+
from ibm_watsonx_orchestrate.utils.utils import sanitize_app_id
|
17
18
|
from ibm_watsonx_orchestrate.utils.exceptions import BadRequest
|
18
19
|
|
19
20
|
logger = logging.getLogger(__name__)
|
@@ -67,7 +68,8 @@ def _clean_env_vars(vars: dict[str:str], requirements: List[str], app_id: str) -
|
|
67
68
|
return required_env_vars
|
68
69
|
|
69
70
|
def _build_credentials_model(credentials_type: type[CREDENTIALS], vars: dict[str,str], base_prefix: str) -> type[CREDENTIALS]:
|
70
|
-
|
71
|
+
requirements_lut = deepcopy(connection_type_requirements_mapping)
|
72
|
+
requirements = requirements_lut[credentials_type]
|
71
73
|
|
72
74
|
if requirements:
|
73
75
|
requirements.append("url")
|
@@ -101,14 +103,15 @@ def _get_credentials_model(connection_type: ConnectionSecurityScheme, app_id: st
|
|
101
103
|
|
102
104
|
credentials_type = CONNECTION_TYPE_CREDENTIAL_MAPPING[connection_type]
|
103
105
|
|
104
|
-
|
106
|
+
requirements_lut = deepcopy(connection_type_requirements_mapping)
|
107
|
+
requirements = requirements_lut.get(credentials_type)
|
105
108
|
if requirements:
|
106
109
|
variables = _clean_env_vars(vars=variables, requirements=requirements, app_id=app_id)
|
107
110
|
|
108
111
|
return _build_credentials_model(credentials_type=credentials_type, vars=variables, base_prefix=base_prefix)
|
109
112
|
|
110
113
|
def get_connection_type(app_id: str) -> ConnectionSecurityScheme:
|
111
|
-
sanitized_app_id =
|
114
|
+
sanitized_app_id = sanitize_app_id(app_id=app_id)
|
112
115
|
expected_schema_key = f"WXO_SECURITY_SCHEMA_{sanitized_app_id}"
|
113
116
|
expected_schema = os.environ.get(expected_schema_key)
|
114
117
|
|
@@ -126,7 +129,7 @@ def get_connection_type(app_id: str) -> ConnectionSecurityScheme:
|
|
126
129
|
return expected_schema
|
127
130
|
|
128
131
|
def get_application_connection_credentials(type: ConnectionType, app_id: str) -> CREDENTIALS:
|
129
|
-
sanitized_app_id =
|
132
|
+
sanitized_app_id = sanitize_app_id(app_id=app_id)
|
130
133
|
expected_schema = get_connection_type(app_id=app_id)
|
131
134
|
requested_schema = connection_type_security_schema_map.get(type)
|
132
135
|
|
@@ -1,7 +1,11 @@
|
|
1
|
+
import logging
|
1
2
|
from pydantic import BaseModel, Field, AliasChoices, model_validator
|
2
3
|
from typing import Optional, Union, TypeVar, List
|
3
4
|
from enum import Enum
|
4
5
|
|
6
|
+
|
7
|
+
logger = logging.getLogger(__name__)
|
8
|
+
|
5
9
|
class ConnectionKind(str, Enum):
|
6
10
|
basic = 'basic'
|
7
11
|
bearer = 'bearer'
|
@@ -145,6 +149,16 @@ class ConnectionConfiguration(BaseModel):
|
|
145
149
|
|
146
150
|
super().__init__(*args, **kwargs)
|
147
151
|
|
152
|
+
@model_validator(mode="before")
|
153
|
+
def validate_auth_scheme(self):
|
154
|
+
if self.get('auth_type'):
|
155
|
+
try:
|
156
|
+
self['auth_type'] = ConnectionAuthType(self.get('auth_type'))
|
157
|
+
except:
|
158
|
+
logger.warning(f"Unsupported auth type '{self.get('auth_type')}', this will be removed from the configuration data")
|
159
|
+
self['auth_type'] = None
|
160
|
+
return self
|
161
|
+
|
148
162
|
@model_validator(mode="after")
|
149
163
|
def validate_config(self):
|
150
164
|
conn_type = None
|
@@ -3,7 +3,8 @@ from datetime import datetime
|
|
3
3
|
from uuid import UUID
|
4
4
|
from enum import Enum
|
5
5
|
|
6
|
-
from pydantic import BaseModel
|
6
|
+
from pydantic import BaseModel, model_validator
|
7
|
+
|
7
8
|
|
8
9
|
class SpecVersion(str, Enum):
|
9
10
|
V1 = "v1"
|
@@ -104,6 +105,7 @@ class GenerationConfiguration(BaseModel):
|
|
104
105
|
display_text_no_results_found: Optional[str] = None
|
105
106
|
display_text_connectivity_issue: Optional[str] = None
|
106
107
|
idk_message: Optional[str] = None
|
108
|
+
enabled: bool = True
|
107
109
|
|
108
110
|
class FieldMapping(BaseModel):
|
109
111
|
"""
|
@@ -224,15 +226,14 @@ class AstraDBConnection(BaseModel):
|
|
224
226
|
api_endpoint: str
|
225
227
|
port: Optional[str] = None
|
226
228
|
server_cert: Optional[str] = None
|
227
|
-
keyspace: Optional[str]
|
229
|
+
keyspace: Optional[str] = None
|
228
230
|
data_type: str
|
229
|
-
collection: Optional[str]
|
230
|
-
table: Optional[str]
|
231
|
-
index_column: Optional[str]
|
232
|
-
embedding_mode: str
|
233
|
-
embedding_model_id: Optional[str]
|
234
|
-
|
235
|
-
search_mode: str
|
231
|
+
collection: Optional[str] = None
|
232
|
+
table: Optional[str] = None
|
233
|
+
index_column: Optional[str] = None
|
234
|
+
embedding_mode: Optional[str] = None
|
235
|
+
embedding_model_id: Optional[str] = None
|
236
|
+
search_mode: Optional[str] = None
|
236
237
|
limit: Optional[int] = 5
|
237
238
|
filter: Optional[str] = None
|
238
239
|
field_mapping: Optional[FieldMapping] = None
|
@@ -243,7 +244,13 @@ class IndexConnection(BaseModel):
|
|
243
244
|
elastic_search: Optional[ElasticSearchConnection] = None
|
244
245
|
custom_search: Optional[CustomSearchConnection] = None
|
245
246
|
astradb: Optional[AstraDBConnection] = None
|
246
|
-
|
247
|
+
|
248
|
+
|
249
|
+
class QuerySource(str, Enum):
|
250
|
+
SessionHistory = "SessionHistory"
|
251
|
+
Agent = "Agent"
|
252
|
+
|
253
|
+
|
247
254
|
class ConversationalSearchConfig(BaseModel):
|
248
255
|
language: Optional[str] = None
|
249
256
|
index_config: list[IndexConnection] = None
|
@@ -252,6 +259,14 @@ class ConversationalSearchConfig(BaseModel):
|
|
252
259
|
citations: Optional[CitationsConfig] = None
|
253
260
|
hap_filtering: Optional[HAPFiltering] = None
|
254
261
|
confidence_thresholds: Optional[ConfidenceThresholds] = None
|
262
|
+
query_source: QuerySource = QuerySource.SessionHistory
|
263
|
+
agent_query_description: str = "The query to search for in the knowledge base"
|
264
|
+
|
265
|
+
@model_validator(mode="after")
|
266
|
+
def validate_agent_query_description(self) -> 'ConversationalSearchConfig':
|
267
|
+
if self.query_source == QuerySource.Agent and len(self.agent_query_description) == 0:
|
268
|
+
raise ValueError("Provide a non-empty agent_query_description when query source is `Agent`")
|
269
|
+
return self
|
255
270
|
|
256
271
|
class KnowledgeBaseBuiltInVectorIndexConfig(BaseModel):
|
257
272
|
embeddings_model_name: Optional[str] = None
|
@@ -1,4 +1,5 @@
|
|
1
1
|
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
|
+
from .langflow_tool import LangflowTool
|
4
5
|
from .types import ToolPermission, JsonSchemaObject, ToolRequestBody, ToolResponseBody, OpenApiSecurityScheme, OpenApiToolBinding, PythonToolBinding, WxFlowsToolBinding, SkillToolBinding, ClientSideToolBinding, ToolBinding, ToolSpec
|
ibm_watsonx_orchestrate-1.12.0b0/src/ibm_watsonx_orchestrate/agent_builder/tools/langflow_tool.py
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
import json
|
2
|
+
import re
|
3
|
+
|
4
|
+
from pydantic import BaseModel
|
5
|
+
|
6
|
+
from ibm_watsonx_orchestrate.agent_builder.connections.types import ConnectionSecurityScheme
|
7
|
+
from .base_tool import BaseTool
|
8
|
+
from .types import LangflowToolBinding, ToolBinding, ToolPermission, ToolRequestBody, ToolResponseBody, ToolSpec
|
9
|
+
from ibm_watsonx_orchestrate.utils.exceptions import BadRequest
|
10
|
+
|
11
|
+
MIN_LANGFLOW_VERSION = [1,5,0]
|
12
|
+
LANGFLOW_CHAT_INPUT_LABEL = "ChatInput"
|
13
|
+
LANGFLOW_CHAT_OUTPUT_LABEL = "ChatOutput"
|
14
|
+
VALID_NAME_PATTERN = re.compile("^[a-zA-Z](\\w|_)+$")
|
15
|
+
|
16
|
+
class LangflowTool(BaseTool):
|
17
|
+
def __init__(self,spec: ToolSpec):
|
18
|
+
BaseTool.__init__(self,spec=spec)
|
19
|
+
|
20
|
+
if self.__tool_spec__.binding.langflow is None:
|
21
|
+
raise BadRequest('Missing langflow binding')
|
22
|
+
|
23
|
+
|
24
|
+
def __repr__(self):
|
25
|
+
return f"LangflowTool(name='{self.__tool_spec__.name}', description='{self.__tool_spec__.description}')"
|
26
|
+
|
27
|
+
|
28
|
+
def __str__(self):
|
29
|
+
return self.__repr__()
|
30
|
+
|
31
|
+
def validate_langflow_version(version_string: str) -> bool:
|
32
|
+
version_nums = map(int, re.findall(r"\d+",version_string))
|
33
|
+
for i,n in enumerate(version_nums):
|
34
|
+
if i >= len(MIN_LANGFLOW_VERSION) or MIN_LANGFLOW_VERSION[i] < n:
|
35
|
+
break
|
36
|
+
if MIN_LANGFLOW_VERSION[i] > n:
|
37
|
+
return False
|
38
|
+
return True
|
39
|
+
|
40
|
+
|
41
|
+
def extract_langflow_nodes(tool_definition: dict, node_type: str) -> dict:
|
42
|
+
return [n for n in tool_definition.get('data',{}).get('nodes',{}) if n.get('data',{}).get('type') == node_type]
|
43
|
+
|
44
|
+
def langflow_input_schema(tool_definition: dict = None) -> ToolRequestBody:
|
45
|
+
|
46
|
+
chat_input_nodes = extract_langflow_nodes(tool_definition=tool_definition,node_type=LANGFLOW_CHAT_INPUT_LABEL)
|
47
|
+
|
48
|
+
if len(chat_input_nodes) < 1:
|
49
|
+
raise ValueError(f"No '{LANGFLOW_CHAT_INPUT_LABEL}' node found in langflow tool")
|
50
|
+
if len(chat_input_nodes) > 1:
|
51
|
+
raise ValueError(f"Too many '{LANGFLOW_CHAT_INPUT_LABEL}' nodes found in langlow tool")
|
52
|
+
|
53
|
+
input_description = chat_input_nodes[0].get("data",{}).get("node",{}).get("description","")
|
54
|
+
|
55
|
+
return ToolRequestBody(
|
56
|
+
type= "object",
|
57
|
+
properties= {
|
58
|
+
"input": {
|
59
|
+
"description": input_description,
|
60
|
+
"type": "string"
|
61
|
+
}
|
62
|
+
},
|
63
|
+
required= ["input"]
|
64
|
+
)
|
65
|
+
|
66
|
+
def langflow_output_schema(tool_definition: dict = None):
|
67
|
+
|
68
|
+
chat_output_nodes = extract_langflow_nodes(tool_definition=tool_definition,node_type=LANGFLOW_CHAT_OUTPUT_LABEL)
|
69
|
+
|
70
|
+
if len(chat_output_nodes) < 1:
|
71
|
+
raise ValueError(f"No '{LANGFLOW_CHAT_OUTPUT_LABEL}' node found in langflow tool")
|
72
|
+
if len(chat_output_nodes) > 1:
|
73
|
+
output_description = ""
|
74
|
+
else:
|
75
|
+
output_description = chat_output_nodes[0].get("data",{}).get("node",{}).get("description","")
|
76
|
+
|
77
|
+
return ToolResponseBody(
|
78
|
+
description=output_description,
|
79
|
+
type= "string"
|
80
|
+
)
|
81
|
+
|
82
|
+
def create_langflow_tool(
|
83
|
+
tool_definition: dict,
|
84
|
+
connections: dict = None,
|
85
|
+
) -> LangflowTool:
|
86
|
+
|
87
|
+
name = tool_definition.get('name')
|
88
|
+
if not name:
|
89
|
+
raise ValueError('Provided tool definition does not have a name')
|
90
|
+
|
91
|
+
if VALID_NAME_PATTERN.match(name) is None:
|
92
|
+
raise ValueError(f"Langflow tool name contains unsupported characters. Only alphanumeric characters and underscores are allowed, and must not start with a number or underscore.")
|
93
|
+
|
94
|
+
description = tool_definition.get('description')
|
95
|
+
if not description:
|
96
|
+
raise ValueError('Provided tool definition does not have a description')
|
97
|
+
|
98
|
+
langflow_id = tool_definition.get('id')
|
99
|
+
|
100
|
+
langflow_version = tool_definition.get('last_tested_version')
|
101
|
+
if not langflow_version:
|
102
|
+
raise ValueError('No langflow version detected in tool definition')
|
103
|
+
if not validate_langflow_version(langflow_version):
|
104
|
+
raise ValueError(f"Langflow version is below minimum requirements, found '{langflow_version}', miniumum required version '{'.'.join(map(str,MIN_LANGFLOW_VERSION))}'")
|
105
|
+
|
106
|
+
spec = ToolSpec(
|
107
|
+
name=name,
|
108
|
+
description=description,
|
109
|
+
permission=ToolPermission('read_only')
|
110
|
+
)
|
111
|
+
|
112
|
+
spec.input_schema = langflow_input_schema(tool_definition=tool_definition)
|
113
|
+
|
114
|
+
spec.output_schema = langflow_output_schema(tool_definition=tool_definition)
|
115
|
+
|
116
|
+
spec.binding = ToolBinding(
|
117
|
+
langflow=LangflowToolBinding(
|
118
|
+
langflow_id=langflow_id,
|
119
|
+
langflow_version=langflow_version,
|
120
|
+
connections=connections
|
121
|
+
)
|
122
|
+
)
|
123
|
+
|
124
|
+
return LangflowTool(spec)
|
@@ -56,9 +56,9 @@ class OpenAPITool(BaseTool):
|
|
56
56
|
spec = ToolSpec.model_validate(json.load(f))
|
57
57
|
else:
|
58
58
|
raise BadRequest('file must end in .json, .yaml, or .yml')
|
59
|
-
|
60
|
-
if spec.binding
|
61
|
-
raise BadRequest('failed to load
|
59
|
+
|
60
|
+
if spec is None or spec.binding is None or spec.binding.openapi is None:
|
61
|
+
raise BadRequest('failed to load openapi tool as the tool had no openapi binding')
|
62
62
|
|
63
63
|
return OpenAPITool(spec=spec)
|
64
64
|
|
@@ -1,8 +1,9 @@
|
|
1
1
|
from enum import Enum
|
2
2
|
from typing import List, Any, Dict, Literal, Optional, Union
|
3
3
|
|
4
|
-
from pydantic import BaseModel, model_validator, ConfigDict, Field, AliasChoices
|
4
|
+
from pydantic import BaseModel, model_validator, ConfigDict, Field, AliasChoices, ValidationError
|
5
5
|
from ibm_watsonx_orchestrate.utils.exceptions import BadRequest
|
6
|
+
from ibm_watsonx_orchestrate.agent_builder.connections import KeyValueConnectionCredentials
|
6
7
|
|
7
8
|
|
8
9
|
class ToolPermission(str, Enum):
|
@@ -159,6 +160,21 @@ class FlowToolBinding(BaseModel):
|
|
159
160
|
flow_id: str
|
160
161
|
model: Optional[dict] = None
|
161
162
|
|
163
|
+
class LangflowToolBinding(BaseModel):
|
164
|
+
langflow_id: Optional[str] = None
|
165
|
+
project_id: Optional[str] = None
|
166
|
+
langflow_version: str
|
167
|
+
connections: Optional[dict] = None
|
168
|
+
|
169
|
+
@model_validator(mode='after')
|
170
|
+
def validate_connection_type(self) -> 'LangflowToolBinding':
|
171
|
+
if self.connections:
|
172
|
+
for k,v in self.connections.items():
|
173
|
+
if not v:
|
174
|
+
raise ValidationError(f"No connection provided for '{k}'")
|
175
|
+
return self
|
176
|
+
|
177
|
+
|
162
178
|
class ToolBinding(BaseModel):
|
163
179
|
openapi: OpenApiToolBinding = None
|
164
180
|
python: PythonToolBinding = None
|
@@ -167,6 +183,7 @@ class ToolBinding(BaseModel):
|
|
167
183
|
client_side: ClientSideToolBinding = None
|
168
184
|
mcp: McpToolBinding = None
|
169
185
|
flow: FlowToolBinding = None
|
186
|
+
langflow: LangflowToolBinding = None
|
170
187
|
|
171
188
|
@model_validator(mode='after')
|
172
189
|
def validate_binding_type(self) -> 'ToolBinding':
|
@@ -177,7 +194,8 @@ class ToolBinding(BaseModel):
|
|
177
194
|
self.skill is not None,
|
178
195
|
self.client_side is not None,
|
179
196
|
self.mcp is not None,
|
180
|
-
self.flow is not None
|
197
|
+
self.flow is not None,
|
198
|
+
self.langflow is not None
|
181
199
|
]
|
182
200
|
if sum(bindings) == 0:
|
183
201
|
raise BadRequest("One binding must be set")
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import typer
|
2
|
-
from typing_extensions import Annotated, List
|
2
|
+
from typing_extensions import Annotated, List, Optional
|
3
3
|
from ibm_watsonx_orchestrate.cli.commands.agents.agents_controller import AgentsController
|
4
4
|
from ibm_watsonx_orchestrate.agent_builder.agents.types import DEFAULT_LLM, AgentKind, AgentStyle, ExternalAgentAuthScheme, AgentProvider
|
5
5
|
import json
|
@@ -14,7 +14,7 @@ def agent_import(
|
|
14
14
|
typer.Option("--file", "-f", help="YAML file with agent definition"),
|
15
15
|
],
|
16
16
|
app_id: Annotated[
|
17
|
-
str, typer.Option(
|
17
|
+
Optional[str], typer.Option(
|
18
18
|
'--app-id', '-a',
|
19
19
|
help='The app id of the connection to associate with this external agent. An application connection represents the server authentication credentials needed to connection to this agent (for example Api Keys, Basic, Bearer or OAuth credentials).'
|
20
20
|
)
|
@@ -46,6 +46,13 @@ def agent_create(
|
|
46
46
|
AgentKind,
|
47
47
|
typer.Option("--kind", "-k", help="The kind of agent you wish to create"),
|
48
48
|
] = AgentKind.NATIVE,
|
49
|
+
instructions: Annotated[
|
50
|
+
str,
|
51
|
+
typer.Option(
|
52
|
+
"--instructions",
|
53
|
+
help="A set of instructions for how the agent should preform actions.",
|
54
|
+
),
|
55
|
+
] = None,
|
49
56
|
api_url: Annotated[
|
50
57
|
str,
|
51
58
|
typer.Option("--api", "-a", help="External Api url your Agent will use"),
|
@@ -175,6 +182,7 @@ def agent_create(
|
|
175
182
|
kind=kind,
|
176
183
|
description=description,
|
177
184
|
title=title,
|
185
|
+
instructions=instructions,
|
178
186
|
api_url=api_url,
|
179
187
|
auth_scheme=auth_scheme,
|
180
188
|
auth_config=auth_config_dict,
|