veadk-python 0.2.20__tar.gz → 0.2.21__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.
- {veadk_python-0.2.20 → veadk_python-0.2.21}/PKG-INFO +2 -1
- {veadk_python-0.2.20 → veadk_python-0.2.21}/pyproject.toml +2 -1
- veadk_python-0.2.21/tests/test_misc.py +65 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_runtime_data_collecting.py +3 -2
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/agent.py +11 -59
- veadk_python-0.2.21/veadk/auth/veauth/speech_veauth.py +54 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cli/cli.py +4 -0
- veadk_python-0.2.21/veadk/cli/cli_clean.py +89 -0
- veadk_python-0.2.21/veadk/cli/cli_update.py +103 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/configs/tool_configs.py +12 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/evaluation/base_evaluator.py +24 -1
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/evaluation/eval_set_recorder.py +5 -4
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_identity/auth_processor.py +5 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_identity/token_manager.py +5 -1
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_identity/utils.py +1 -1
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/runner.py +31 -6
- veadk_python-0.2.21/veadk/tools/builtin_tools/tts.py +253 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/base_tracer.py +2 -2
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/exporters/apmplus_exporter.py +1 -1
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/opentelemetry_tracer.py +3 -3
- veadk_python-0.2.21/veadk/utils/audio_manager.py +95 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/utils/misc.py +26 -10
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/version.py +1 -1
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk_python.egg-info/PKG-INFO +2 -1
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk_python.egg-info/SOURCES.txt +6 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk_python.egg-info/requires.txt +2 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/LICENSE +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/README.md +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/setup.cfg +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_agent.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_cloud.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_evaluator.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_knowledgebase.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_long_term_memory.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_multiple_agents.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_runner.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_short_term_memory.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_tracing.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_ve_identity_auth_config.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_ve_identity_function_tool.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_ve_identity_mcp_tool.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/tests/test_ve_identity_mcp_toolset.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/a2a/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/a2a/agent_card.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/a2a/remote_ve_agent.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/a2a/ve_a2a_server.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/a2a/ve_agent_executor.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/a2a/ve_task_store.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/agent_builder.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/agents/loop_agent.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/agents/parallel_agent.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/agents/sequential_agent.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/base_auth.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/veauth/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/veauth/apmplus_veauth.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/veauth/ark_veauth.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/veauth/base_veauth.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/veauth/cozeloop_veauth.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/veauth/opensearch_veauth.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/veauth/postgresql_veauth.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/veauth/prompt_pilot_veauth.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/veauth/utils.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/veauth/vesearch_veauth.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/auth/veauth/viking_mem0_veauth.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cli/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cli/cli_create.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cli/cli_deploy.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cli/cli_eval.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cli/cli_init.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cli/cli_kb.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cli/cli_pipeline.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cli/cli_prompt.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cli/cli_uploadevalset.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cli/cli_web.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cloud/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cloud/cloud_agent_engine.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/cloud/cloud_app.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/config.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/configs/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/configs/auth_configs.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/configs/database_configs.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/configs/model_configs.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/configs/tracing_configs.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/consts.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/evaluation/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/evaluation/adk_evaluator/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/evaluation/adk_evaluator/adk_evaluator.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/evaluation/deepeval_evaluator/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/evaluation/deepeval_evaluator/deepeval_evaluator.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/evaluation/eval_set_file_loader.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/evaluation/types.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/evaluation/utils/prometheus.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_apig/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_apig/ve_apig.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_apig/ve_apig_utils.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_code_pipeline/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_code_pipeline/ve_code_pipeline.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_cozeloop/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_cozeloop/ve_cozeloop.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_cr/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_cr/ve_cr.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/template/cookiecutter.json +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/clean.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/config.yaml.example +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/deploy.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/agent.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/app.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/requirements.txt +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/run.sh +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name }}/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name }}/agent.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/ve_faas.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/ve_faas_utils.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/cookiecutter.json +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/clean.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/config.yaml.example +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/deploy.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/Dockerfile +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/app.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/init_db.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/models.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/requirements.txt +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/run.sh +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/static/css/style.css +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/static/js/admin.js +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/admin/dashboard.html +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/admin/edit_post.html +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/admin/login.html +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/admin/posts.html +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/base.html +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/index.html +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_faas/web_template/{{cookiecutter.local_dir_name}}/src/templates/post.html +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_identity/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_identity/auth_config.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_identity/auth_mixins.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_identity/function_tool.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_identity/identity_client.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_identity/mcp_tool.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_identity/mcp_toolset.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_identity/models.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_prompt_pilot/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_prompt_pilot/ve_prompt_pilot.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_tls/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_tls/utils.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_tls/ve_tls.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_tos/ve_tos.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_viking_db_memory/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_viking_db_memory/ve_viking_db_memory.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/knowledgebase/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/knowledgebase/backends/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/knowledgebase/backends/base_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/knowledgebase/backends/in_memory_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/knowledgebase/backends/opensearch_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/knowledgebase/backends/redis_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/knowledgebase/backends/utils.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/knowledgebase/backends/vikingdb_knowledge_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/knowledgebase/entry.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/knowledgebase/knowledgebase.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/long_term_memory.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/long_term_memory_backends/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/long_term_memory_backends/base_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/long_term_memory_backends/in_memory_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/long_term_memory_backends/mem0_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/long_term_memory_backends/opensearch_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/long_term_memory_backends/redis_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/long_term_memory_backends/vikingdb_memory_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/short_term_memory.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/short_term_memory_backends/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/short_term_memory_backends/base_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/short_term_memory_backends/mysql_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/short_term_memory_backends/postgresql_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/short_term_memory_backends/sqlite_backend.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/memory/short_term_memory_processor.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/processors/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/processors/base_run_processor.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/prompts/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/prompts/agent_default_prompt.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/prompts/prompt_evaluator.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/prompts/prompt_memory_processor.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/prompts/prompt_optimization.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/generate_image.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/image_edit.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/image_generate.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/lark.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/las.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/link_reader.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/llm_shield.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/load_knowledgebase.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/mcp_router.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/run_code.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/vesearch.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/video_generate.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/web_scraper.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/builtin_tools/web_search.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/demo_tools.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/load_knowledgebase_tool.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/sandbox/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/sandbox/browser_sandbox.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/sandbox/code_sandbox.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tools/sandbox/computer_sandbox.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/attributes/attributes.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/attributes/extractors/common_attributes_extractors.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/attributes/extractors/llm_attributes_extractors.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/attributes/extractors/tool_attributes_extractors.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/attributes/extractors/types.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/exporters/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/exporters/base_exporter.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/exporters/cozeloop_exporter.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/exporters/inmemory_exporter.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/exporters/tls_exporter.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/tracing/telemetry/telemetry.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/types.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/utils/__init__.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/utils/logger.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/utils/mcp_utils.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/utils/patches.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/utils/volcengine_sign.py +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk_python.egg-info/dependency_links.txt +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk_python.egg-info/entry_points.txt +0 -0
- {veadk_python-0.2.20 → veadk_python-0.2.21}/veadk_python.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: veadk-python
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.21
|
|
4
4
|
Summary: Volcengine agent development kit, integrations with Volcengine cloud services.
|
|
5
5
|
Author-email: Yaozheng Fang <fangyozheng@gmail.com>, Guodong Li <cu.eric.lee@gmail.com>, Zhi Han <sliverydayday@gmail.com>, Meng Wang <mengwangwm@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -242,6 +242,7 @@ Requires-Dist: pymysql>=1.1.1; extra == "database"
|
|
|
242
242
|
Requires-Dist: volcengine>=1.0.193; extra == "database"
|
|
243
243
|
Requires-Dist: tos>=2.8.4; extra == "database"
|
|
244
244
|
Requires-Dist: mem0ai==0.1.118; extra == "database"
|
|
245
|
+
Provides-Extra: speech
|
|
245
246
|
Provides-Extra: eval
|
|
246
247
|
Requires-Dist: prometheus-client>=0.22.1; extra == "eval"
|
|
247
248
|
Requires-Dist: deepeval>=3.2.6; extra == "eval"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "veadk-python"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.21"
|
|
4
4
|
description = "Volcengine agent development kit, integrations with Volcengine cloud services."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -54,6 +54,7 @@ database = [
|
|
|
54
54
|
"tos>=2.8.4", # For TOS storage and Viking DB
|
|
55
55
|
"mem0ai==0.1.118", # For mem0
|
|
56
56
|
]
|
|
57
|
+
speech = []
|
|
57
58
|
eval = [
|
|
58
59
|
"prometheus-client>=0.22.1", # For exporting data to Prometheus pushgateway
|
|
59
60
|
"deepeval>=3.2.6", # For DeepEval-based evaluation
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import os
|
|
16
|
+
import sys
|
|
17
|
+
import types
|
|
18
|
+
|
|
19
|
+
from veadk.utils.misc import get_agents_dir, get_agent_dir
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class GetAgentsDirTest:
|
|
23
|
+
def test_get_agents_dir_from_main_file(monkeypatch):
|
|
24
|
+
"""
|
|
25
|
+
Case 1: __main__.__file__ exists (common in CLI or uv run environments)
|
|
26
|
+
"""
|
|
27
|
+
fake_main = types.SimpleNamespace(__file__="/tmp/project/testapp/agent.py")
|
|
28
|
+
monkeypatch.setitem(sys.modules, "__main__", fake_main)
|
|
29
|
+
|
|
30
|
+
result = get_agents_dir()
|
|
31
|
+
assert result == "/tmp/project"
|
|
32
|
+
result = get_agent_dir()
|
|
33
|
+
assert result == "/tmp/project/testapp"
|
|
34
|
+
|
|
35
|
+
def test_get_agents_dir_from_sys_argv(monkeypatch):
|
|
36
|
+
"""
|
|
37
|
+
Case 2: Fallback to sys.argv[0]
|
|
38
|
+
"""
|
|
39
|
+
fake_main = types.SimpleNamespace()
|
|
40
|
+
monkeypatch.setitem(sys.modules, "__main__", fake_main)
|
|
41
|
+
monkeypatch.setattr(sys, "argv", ["/tmp/project/testapp/agent.py"])
|
|
42
|
+
|
|
43
|
+
result = get_agents_dir()
|
|
44
|
+
assert result == "/tmp/project"
|
|
45
|
+
result = get_agent_dir()
|
|
46
|
+
assert result == "/tmp/project/testapp"
|
|
47
|
+
|
|
48
|
+
def test_get_agents_dir_from_cwd(monkeypatch, tmp_path):
|
|
49
|
+
"""
|
|
50
|
+
Case 3: Fallback to current working directory (REPL or no file context)
|
|
51
|
+
"""
|
|
52
|
+
fake_main = types.SimpleNamespace()
|
|
53
|
+
monkeypatch.setitem(sys.modules, "__main__", fake_main)
|
|
54
|
+
monkeypatch.setattr(sys, "argv", [])
|
|
55
|
+
|
|
56
|
+
fake_cwd = tmp_path / "some_dir"
|
|
57
|
+
fake_cwd.mkdir()
|
|
58
|
+
|
|
59
|
+
monkeypatch.setattr(os, "getcwd", lambda: str(fake_cwd))
|
|
60
|
+
result = get_agents_dir()
|
|
61
|
+
|
|
62
|
+
# should return the parent of fake_cwd
|
|
63
|
+
assert result == str(tmp_path)
|
|
64
|
+
result = get_agent_dir()
|
|
65
|
+
assert result == str(tmp_path / "some_dir")
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import json
|
|
16
16
|
import os
|
|
17
|
+
import uuid
|
|
17
18
|
|
|
18
19
|
import pytest
|
|
19
20
|
from utils import generate_events, generate_session
|
|
@@ -25,7 +26,7 @@ APP_NAME = "app"
|
|
|
25
26
|
USER_ID = "user"
|
|
26
27
|
SESSION_ID = "session"
|
|
27
28
|
|
|
28
|
-
EVAL_SET_ID = "temp_unittest"
|
|
29
|
+
EVAL_SET_ID = "temp_unittest" + uuid.uuid4().hex
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
@pytest.mark.asyncio
|
|
@@ -46,7 +47,7 @@ async def test_runtime_data_collecting():
|
|
|
46
47
|
recorder = EvalSetRecorder(session_service=session_service, eval_set_id=EVAL_SET_ID)
|
|
47
48
|
dump_path = await recorder.dump(APP_NAME, USER_ID, SESSION_ID)
|
|
48
49
|
|
|
49
|
-
assert dump_path == f"/tmp/{APP_NAME}/{recorder.eval_set_id}.evalset.json"
|
|
50
|
+
# assert dump_path == f"/tmp/{APP_NAME}/{recorder.eval_set_id}.evalset.json"
|
|
50
51
|
assert os.path.exists(dump_path) and os.path.isfile(dump_path)
|
|
51
52
|
assert os.path.getsize(dump_path) > 0
|
|
52
53
|
|
|
@@ -17,6 +17,13 @@ from __future__ import annotations
|
|
|
17
17
|
import os
|
|
18
18
|
from typing import Optional, Union
|
|
19
19
|
|
|
20
|
+
# If user didn't set LITELLM_LOCAL_MODEL_COST_MAP, set it to True
|
|
21
|
+
# to enable local model cost map.
|
|
22
|
+
# This value is `false` by default, which brings heavy performance burden,
|
|
23
|
+
# for instance, importing `Litellm` needs about 10s latency.
|
|
24
|
+
if not os.getenv("LITELLM_LOCAL_MODEL_COST_MAP"):
|
|
25
|
+
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"
|
|
26
|
+
|
|
20
27
|
from google.adk.agents import LlmAgent, RunConfig
|
|
21
28
|
from google.adk.agents.base_agent import BaseAgent
|
|
22
29
|
from google.adk.agents.llm_agent import InstructionProvider, ToolUnion
|
|
@@ -71,62 +78,6 @@ class Agent(LlmAgent):
|
|
|
71
78
|
short_term_memory (Optional[ShortTermMemory]): Session-based memory for temporary context.
|
|
72
79
|
long_term_memory (Optional[LongTermMemory]): Cross-session memory for persistent user context.
|
|
73
80
|
tracers (list[BaseTracer]): List of tracers used for telemetry and monitoring.
|
|
74
|
-
|
|
75
|
-
Notes:
|
|
76
|
-
Before creating your agent, you should get the API Key for your model.
|
|
77
|
-
|
|
78
|
-
Examples:
|
|
79
|
-
### Simple agent
|
|
80
|
-
|
|
81
|
-
Create a simplest agent without any extra settings. All agent attributes are come from environment variables and default values. Like:
|
|
82
|
-
|
|
83
|
-
```python
|
|
84
|
-
import asyncio
|
|
85
|
-
|
|
86
|
-
from veadk import Agent, Runner
|
|
87
|
-
|
|
88
|
-
root_agent = Agent()
|
|
89
|
-
|
|
90
|
-
runner = Runner(agent=root_agent)
|
|
91
|
-
|
|
92
|
-
response = asyncio.run(runner.run("hello"))
|
|
93
|
-
print(response)
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
You can set some agent metadata attributes by the following code:
|
|
97
|
-
|
|
98
|
-
```python
|
|
99
|
-
from veadk import Agent
|
|
100
|
-
|
|
101
|
-
from veadk import Agent, Runner
|
|
102
|
-
|
|
103
|
-
root_agent = Agent(
|
|
104
|
-
name="meeting_assistant",
|
|
105
|
-
description="An assistant that helps user to make meetings.",
|
|
106
|
-
# system prompt
|
|
107
|
-
instruction="First learn about user's meeting time, location, and other key informations, and give out a meeting plan.",
|
|
108
|
-
)
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
Or, once you want to use your local-serving model or models from other provider, you can specify some model-related configurations in initiation arguments:
|
|
112
|
-
|
|
113
|
-
```python
|
|
114
|
-
agent = Agent(model_name="", model_api_key="", model_api_base="")
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Besides, you can specify some extra options by ARK requirements, such as:
|
|
118
|
-
|
|
119
|
-
```python
|
|
120
|
-
# disable thinking
|
|
121
|
-
model_extra_config = {}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
In some systems, mulitple-agent based design is necessary, you can implement a multiple-agent system by `sub_agent` argument:
|
|
125
|
-
|
|
126
|
-
```python
|
|
127
|
-
from veadk import Agent
|
|
128
|
-
```
|
|
129
|
-
|
|
130
81
|
"""
|
|
131
82
|
|
|
132
83
|
model_config = ConfigDict(arbitrary_types_allowed=True, extra="allow")
|
|
@@ -227,9 +178,10 @@ class Agent(LlmAgent):
|
|
|
227
178
|
if self.long_term_memory is not None:
|
|
228
179
|
from google.adk.tools import load_memory
|
|
229
180
|
|
|
230
|
-
if
|
|
231
|
-
load_memory.custom_metadata
|
|
232
|
-
|
|
181
|
+
if hasattr(load_memory, "custom_metadata"):
|
|
182
|
+
if not load_memory.custom_metadata:
|
|
183
|
+
load_memory.custom_metadata = {}
|
|
184
|
+
load_memory.custom_metadata["backend"] = self.long_term_memory.backend
|
|
233
185
|
self.tools.append(load_memory)
|
|
234
186
|
|
|
235
187
|
logger.info(f"VeADK version: {VERSION}")
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import os
|
|
16
|
+
|
|
17
|
+
from veadk.auth.veauth.utils import get_credential_from_vefaas_iam
|
|
18
|
+
from veadk.utils.logger import get_logger
|
|
19
|
+
from veadk.utils.volcengine_sign import ve_request
|
|
20
|
+
|
|
21
|
+
logger = get_logger(__name__)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def get_speech_token(region: str = "cn-beijing") -> str:
|
|
25
|
+
logger.info("Fetching speech token...")
|
|
26
|
+
|
|
27
|
+
access_key = os.getenv("VOLCENGINE_ACCESS_KEY")
|
|
28
|
+
secret_key = os.getenv("VOLCENGINE_SECRET_KEY")
|
|
29
|
+
session_token = ""
|
|
30
|
+
|
|
31
|
+
if not (access_key and secret_key):
|
|
32
|
+
# try to get from vefaas iam
|
|
33
|
+
cred = get_credential_from_vefaas_iam()
|
|
34
|
+
access_key = cred.access_key_id
|
|
35
|
+
secret_key = cred.secret_access_key
|
|
36
|
+
session_token = cred.session_token
|
|
37
|
+
|
|
38
|
+
res = ve_request(
|
|
39
|
+
request_body={"ProjectName": "default", "OnlyAvailable": True},
|
|
40
|
+
header={"X-Security-Token": session_token},
|
|
41
|
+
action="ListAPIKeys",
|
|
42
|
+
ak=access_key,
|
|
43
|
+
sk=secret_key,
|
|
44
|
+
service="speech_saas_prod",
|
|
45
|
+
version="2025-05-20",
|
|
46
|
+
region=region,
|
|
47
|
+
host="open.volcengineapi.com",
|
|
48
|
+
)
|
|
49
|
+
try:
|
|
50
|
+
first_api_key_id = res["Result"]["APIKeys"][0]["APIKey"]
|
|
51
|
+
logger.info("Successfully fetching speech API Key.")
|
|
52
|
+
return first_api_key_id
|
|
53
|
+
except KeyError:
|
|
54
|
+
raise ValueError(f"Failed to get speech api key list: {res}")
|
|
@@ -24,6 +24,8 @@ from veadk.cli.cli_pipeline import pipeline
|
|
|
24
24
|
from veadk.cli.cli_prompt import prompt
|
|
25
25
|
from veadk.cli.cli_web import web
|
|
26
26
|
from veadk.cli.cli_uploadevalset import uploadevalset
|
|
27
|
+
from veadk.cli.cli_update import update
|
|
28
|
+
from veadk.cli.cli_clean import clean
|
|
27
29
|
from veadk.version import VERSION
|
|
28
30
|
|
|
29
31
|
|
|
@@ -49,6 +51,8 @@ veadk.add_command(pipeline)
|
|
|
49
51
|
veadk.add_command(eval)
|
|
50
52
|
veadk.add_command(kb)
|
|
51
53
|
veadk.add_command(uploadevalset)
|
|
54
|
+
veadk.add_command(update)
|
|
55
|
+
veadk.add_command(clean)
|
|
52
56
|
|
|
53
57
|
if __name__ == "__main__":
|
|
54
58
|
veadk()
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import time
|
|
16
|
+
import click
|
|
17
|
+
|
|
18
|
+
from veadk.config import getenv
|
|
19
|
+
from veadk.integrations.ve_faas.ve_faas import VeFaaS
|
|
20
|
+
from veadk.utils.logger import get_logger
|
|
21
|
+
|
|
22
|
+
logger = get_logger(__name__)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@click.command()
|
|
26
|
+
@click.option(
|
|
27
|
+
"--vefaas-application-name",
|
|
28
|
+
required=True,
|
|
29
|
+
help="VeFaaS application name to clean",
|
|
30
|
+
)
|
|
31
|
+
@click.option(
|
|
32
|
+
"--volcengine-access-key",
|
|
33
|
+
default=None,
|
|
34
|
+
help="Volcengine access key, if not set, will use the value of environment variable VOLCENGINE_ACCESS_KEY",
|
|
35
|
+
)
|
|
36
|
+
@click.option(
|
|
37
|
+
"--volcengine-secret-key",
|
|
38
|
+
default=None,
|
|
39
|
+
help="Volcengine secret key, if not set, will use the value of environment variable VOLCENGINE_SECRET_KEY",
|
|
40
|
+
)
|
|
41
|
+
def clean(
|
|
42
|
+
vefaas_application_name: str, volcengine_access_key: str, volcengine_secret_key: str
|
|
43
|
+
) -> None:
|
|
44
|
+
"""
|
|
45
|
+
Clean and delete a VeFaaS application from the cloud.
|
|
46
|
+
|
|
47
|
+
This command deletes a specified VeFaaS application after user confirmation.
|
|
48
|
+
It will prompt the user for confirmation before proceeding with the deletion
|
|
49
|
+
and monitor the deletion process until completion.
|
|
50
|
+
|
|
51
|
+
Args:
|
|
52
|
+
vefaas_application_name (str): The name of the VeFaaS application to delete
|
|
53
|
+
volcengine_access_key (str): Volcengine access key for authentication.
|
|
54
|
+
If None, will use VOLCENGINE_ACCESS_KEY environment variable
|
|
55
|
+
volcengine_secret_key (str): Volcengine secret key for authentication.
|
|
56
|
+
If None, will use VOLCENGINE_SECRET_KEY environment variable
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
None
|
|
60
|
+
"""
|
|
61
|
+
if not volcengine_access_key:
|
|
62
|
+
volcengine_access_key = getenv("VOLCENGINE_ACCESS_KEY")
|
|
63
|
+
if not volcengine_secret_key:
|
|
64
|
+
volcengine_secret_key = getenv("VOLCENGINE_SECRET_KEY")
|
|
65
|
+
|
|
66
|
+
confirm = input(f"Confirm delete cloud app {vefaas_application_name}? (y/N): ")
|
|
67
|
+
if confirm.lower() != "y":
|
|
68
|
+
click.echo("Delete cancelled.")
|
|
69
|
+
return
|
|
70
|
+
else:
|
|
71
|
+
vefaas_client = VeFaaS(
|
|
72
|
+
access_key=volcengine_access_key, secret_key=volcengine_secret_key
|
|
73
|
+
)
|
|
74
|
+
vefaas_application_id = vefaas_client.find_app_id_by_name(
|
|
75
|
+
vefaas_application_name
|
|
76
|
+
)
|
|
77
|
+
vefaas_client.delete(vefaas_application_id)
|
|
78
|
+
click.echo(
|
|
79
|
+
f"Cloud app {vefaas_application_name} delete request has been sent to VeFaaS"
|
|
80
|
+
)
|
|
81
|
+
while True:
|
|
82
|
+
try:
|
|
83
|
+
id = vefaas_client.find_app_id_by_name(vefaas_application_name)
|
|
84
|
+
if not id:
|
|
85
|
+
break
|
|
86
|
+
time.sleep(3)
|
|
87
|
+
except Exception as _:
|
|
88
|
+
break
|
|
89
|
+
click.echo("Delete application done.")
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import click
|
|
16
|
+
import os
|
|
17
|
+
|
|
18
|
+
from veadk.cloud.cloud_agent_engine import CloudAgentEngine
|
|
19
|
+
from veadk.utils.logger import get_logger
|
|
20
|
+
|
|
21
|
+
logger = get_logger(__name__)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@click.command()
|
|
25
|
+
@click.option(
|
|
26
|
+
"--volcengine-access-key",
|
|
27
|
+
default=None,
|
|
28
|
+
help="Volcengine access key for authentication. Defaults to VOLCENGINE_ACCESS_KEY environment variable.",
|
|
29
|
+
)
|
|
30
|
+
@click.option(
|
|
31
|
+
"--volcengine-secret-key",
|
|
32
|
+
default=None,
|
|
33
|
+
help="Volcengine secret key for authentication. Defaults to VOLCENGINE_SECRET_KEY environment variable.",
|
|
34
|
+
)
|
|
35
|
+
@click.option(
|
|
36
|
+
"--application-name",
|
|
37
|
+
required=True,
|
|
38
|
+
help="Name of the cloud application to update.",
|
|
39
|
+
)
|
|
40
|
+
@click.option(
|
|
41
|
+
"--path",
|
|
42
|
+
default=".",
|
|
43
|
+
help="Local path containing the updated code. Defaults to current directory.",
|
|
44
|
+
)
|
|
45
|
+
def update(
|
|
46
|
+
volcengine_access_key: str,
|
|
47
|
+
volcengine_secret_key: str,
|
|
48
|
+
application_name: str,
|
|
49
|
+
path: str,
|
|
50
|
+
) -> None:
|
|
51
|
+
"""Update function code of a deployed cloud application on Volcengine FaaS.
|
|
52
|
+
|
|
53
|
+
This command updates the code of an existing cloud application without changing
|
|
54
|
+
the endpoint or other resources. It uploads the local project code to replace
|
|
55
|
+
the existing function implementation.
|
|
56
|
+
|
|
57
|
+
The update process:
|
|
58
|
+
1. Authenticates with Volcengine using provided credentials
|
|
59
|
+
2. Validates the local project path and application name
|
|
60
|
+
3. Uploads the updated code to the existing application
|
|
61
|
+
4. Preserves the existing endpoint and gateway configuration
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
volcengine_access_key: Volcengine platform access key for authentication.
|
|
65
|
+
If not provided, uses VOLCENGINE_ACCESS_KEY environment variable.
|
|
66
|
+
volcengine_secret_key: Volcengine platform secret key for authentication.
|
|
67
|
+
If not provided, uses VOLCENGINE_SECRET_KEY environment variable.
|
|
68
|
+
application_name: Name of the existing cloud application to update.
|
|
69
|
+
path: Local directory path containing the updated agent project.
|
|
70
|
+
Defaults to current directory if not specified.
|
|
71
|
+
|
|
72
|
+
Note:
|
|
73
|
+
- Application must already exist on Volcengine FaaS
|
|
74
|
+
- Only function code is updated, endpoint remains unchanged
|
|
75
|
+
- Uses default region 'cn-beijing' for Volcengine services
|
|
76
|
+
|
|
77
|
+
Raises:
|
|
78
|
+
ValueError: If authentication fails or application not found.
|
|
79
|
+
FileNotFoundError: If local path does not exist.
|
|
80
|
+
"""
|
|
81
|
+
# Set environment variables if provided
|
|
82
|
+
if volcengine_access_key and "VOLCENGINE_ACCESS_KEY" not in os.environ:
|
|
83
|
+
os.environ["VOLCENGINE_ACCESS_KEY"] = volcengine_access_key
|
|
84
|
+
if volcengine_secret_key and "VOLCENGINE_SECRET_KEY" not in os.environ:
|
|
85
|
+
os.environ["VOLCENGINE_SECRET_KEY"] = volcengine_secret_key
|
|
86
|
+
|
|
87
|
+
# Initialize cloud agent engine
|
|
88
|
+
engine = CloudAgentEngine()
|
|
89
|
+
|
|
90
|
+
try:
|
|
91
|
+
# Update function code
|
|
92
|
+
updated_app = engine.update_function_code(
|
|
93
|
+
application_name=application_name,
|
|
94
|
+
path=path,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
logger.info(f"Successfully updated cloud application '{application_name}'")
|
|
98
|
+
logger.info(f"Endpoint: {updated_app.vefaas_endpoint}")
|
|
99
|
+
logger.info(f"Application ID: {updated_app.vefaas_application_id}")
|
|
100
|
+
|
|
101
|
+
except Exception as e:
|
|
102
|
+
logger.error(f"Failed to update cloud application: {e}")
|
|
103
|
+
raise
|
|
@@ -20,6 +20,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
20
20
|
|
|
21
21
|
from veadk.auth.veauth.prompt_pilot_veauth import PromptPilotVeAuth
|
|
22
22
|
from veadk.auth.veauth.vesearch_veauth import VesearchVeAuth
|
|
23
|
+
from veadk.auth.veauth.speech_veauth import get_speech_token
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
class PromptPilotConfig(BaseModel):
|
|
@@ -38,5 +39,16 @@ class VeSearchConfig(BaseSettings):
|
|
|
38
39
|
return os.getenv("TOOL_VESEARCH_API_KEY") or VesearchVeAuth().token
|
|
39
40
|
|
|
40
41
|
|
|
42
|
+
class VeSpeechConfig(BaseSettings):
|
|
43
|
+
model_config = SettingsConfigDict(env_prefix="TOOL_VESPEECH_")
|
|
44
|
+
|
|
45
|
+
endpoint: int | str = ""
|
|
46
|
+
|
|
47
|
+
@cached_property
|
|
48
|
+
def api_key(self) -> str:
|
|
49
|
+
return os.getenv("TOOL_VESPEECH_API_KEY") or get_speech_token()
|
|
50
|
+
|
|
51
|
+
|
|
41
52
|
class BuiltinToolConfigs(BaseModel):
|
|
42
53
|
vesearch: VeSearchConfig = Field(default_factory=VeSearchConfig)
|
|
54
|
+
vespeech: VeSpeechConfig = Field(default_factory=VeSpeechConfig)
|
|
@@ -442,7 +442,10 @@ class BaseEvaluator:
|
|
|
442
442
|
_input = user_content.parts[0].text
|
|
443
443
|
_expected_output = invocation.final_response.parts[0].text
|
|
444
444
|
|
|
445
|
-
if
|
|
445
|
+
if (
|
|
446
|
+
hasattr(invocation.intermediate_data, "tool_uses")
|
|
447
|
+
and invocation.intermediate_data.tool_uses
|
|
448
|
+
):
|
|
446
449
|
for expected_tool_use in invocation.intermediate_data.tool_uses:
|
|
447
450
|
_expected_tool.append(
|
|
448
451
|
{
|
|
@@ -451,6 +454,26 @@ class BaseEvaluator:
|
|
|
451
454
|
}
|
|
452
455
|
)
|
|
453
456
|
|
|
457
|
+
elif (
|
|
458
|
+
hasattr(invocation.intermediate_data, "invocation_events")
|
|
459
|
+
and invocation.intermediate_data.invocation_events
|
|
460
|
+
):
|
|
461
|
+
for event in invocation.intermediate_data.invocation_events:
|
|
462
|
+
if hasattr(event, "content") and hasattr(
|
|
463
|
+
event.content, "parts"
|
|
464
|
+
):
|
|
465
|
+
for part in event.content.parts:
|
|
466
|
+
if (
|
|
467
|
+
hasattr(part, "function_call")
|
|
468
|
+
and part.function_call is not None
|
|
469
|
+
):
|
|
470
|
+
_expected_tool.append(
|
|
471
|
+
{
|
|
472
|
+
"name": part.function_call.name,
|
|
473
|
+
"args": part.function_call.args,
|
|
474
|
+
}
|
|
475
|
+
)
|
|
476
|
+
|
|
454
477
|
eval_case_data.invocations.append(
|
|
455
478
|
Invocation(
|
|
456
479
|
invocation_id=invocation.invocation_id,
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
|
|
15
15
|
import time
|
|
16
16
|
from pathlib import Path
|
|
17
|
-
|
|
17
|
+
import os
|
|
18
18
|
from google.adk.cli.utils import evals
|
|
19
19
|
from google.adk.evaluation.eval_case import EvalCase, SessionInput
|
|
20
20
|
from google.adk.evaluation.local_eval_sets_manager import LocalEvalSetsManager
|
|
21
21
|
from google.adk.sessions import BaseSessionService
|
|
22
22
|
|
|
23
23
|
from veadk.utils.logger import get_logger
|
|
24
|
-
from veadk.utils.misc import formatted_timestamp,
|
|
24
|
+
from veadk.utils.misc import formatted_timestamp, get_agents_dir
|
|
25
25
|
|
|
26
26
|
logger = get_logger(__name__)
|
|
27
27
|
|
|
@@ -53,7 +53,7 @@ class EvalSetRecorder(LocalEvalSetsManager):
|
|
|
53
53
|
Raises:
|
|
54
54
|
ValueError: If eval_set_id is invalid.
|
|
55
55
|
"""
|
|
56
|
-
super().__init__(agents_dir=
|
|
56
|
+
super().__init__(agents_dir=get_agents_dir())
|
|
57
57
|
self.eval_set_id = eval_set_id if eval_set_id != "" else "default"
|
|
58
58
|
self.session_service: BaseSessionService = session_service
|
|
59
59
|
|
|
@@ -131,7 +131,8 @@ class EvalSetRecorder(LocalEvalSetsManager):
|
|
|
131
131
|
dump_path = self._get_eval_set_file_path(app_name, self.eval_set_id)
|
|
132
132
|
Path(dump_path).parent.mkdir(parents=True, exist_ok=True)
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
if not os.path.exists(dump_path):
|
|
135
|
+
self.create_eval_set(app_name=app_name, eval_set_id=self.eval_set_id)
|
|
135
136
|
|
|
136
137
|
await self.add_session_to_eval_set(
|
|
137
138
|
app_name=app_name,
|
{veadk_python-0.2.20 → veadk_python-0.2.21}/veadk/integrations/ve_identity/auth_processor.py
RENAMED
|
@@ -25,6 +25,7 @@ from google.adk.auth import AuthConfig
|
|
|
25
25
|
from google.genai import types
|
|
26
26
|
from google.adk.auth.auth_credential import OAuth2Auth
|
|
27
27
|
|
|
28
|
+
from veadk.integrations.ve_identity.auth_config import _get_default_region
|
|
28
29
|
from veadk.processors.base_run_processor import BaseRunProcessor
|
|
29
30
|
from veadk.integrations.ve_identity.identity_client import IdentityClient
|
|
30
31
|
from veadk.integrations.ve_identity.models import AuthRequestConfig, OAuth2AuthPoller
|
|
@@ -178,6 +179,10 @@ class AuthRequestProcessor(BaseRunProcessor):
|
|
|
178
179
|
f"Please open this URL in your browser to authorize: {url}"
|
|
179
180
|
)
|
|
180
181
|
)
|
|
182
|
+
# Use provided region or get from config
|
|
183
|
+
if self.config.region is None:
|
|
184
|
+
self.config.region = _get_default_region()
|
|
185
|
+
|
|
181
186
|
self._identity_client = self.config.identity_client or IdentityClient(
|
|
182
187
|
region=self.config.region
|
|
183
188
|
)
|
|
@@ -22,6 +22,7 @@ from typing import Optional, Union
|
|
|
22
22
|
from google.adk.tools.tool_context import ToolContext
|
|
23
23
|
from google.adk.agents.readonly_context import ReadonlyContext
|
|
24
24
|
|
|
25
|
+
from veadk.integrations.ve_identity.auth_config import _get_default_region
|
|
25
26
|
from veadk.utils.logger import get_logger
|
|
26
27
|
|
|
27
28
|
from veadk.integrations.ve_identity.identity_client import IdentityClient
|
|
@@ -49,13 +50,16 @@ class WorkloadTokenManager:
|
|
|
49
50
|
def __init__(
|
|
50
51
|
self,
|
|
51
52
|
identity_client: IdentityClient = None,
|
|
52
|
-
region: Optional[str] =
|
|
53
|
+
region: Optional[str] = None,
|
|
53
54
|
):
|
|
54
55
|
"""Initialize the token manager.
|
|
55
56
|
|
|
56
57
|
Args:
|
|
57
58
|
identity_client: The IdentityClient instance to use for token requests.
|
|
58
59
|
"""
|
|
60
|
+
if region is None:
|
|
61
|
+
region = _get_default_region()
|
|
62
|
+
|
|
59
63
|
self._identity_client = identity_client or IdentityClient(region=region)
|
|
60
64
|
|
|
61
65
|
def _build_cache_key(
|
|
@@ -144,7 +144,7 @@ def generate_headers(credential: AuthCredential) -> Optional[dict[str, str]]:
|
|
|
144
144
|
)
|
|
145
145
|
}
|
|
146
146
|
elif credential.api_key:
|
|
147
|
-
headers = {"Authorization":
|
|
147
|
+
headers = {"Authorization": credential.api_key}
|
|
148
148
|
elif credential.service_account:
|
|
149
149
|
pass
|
|
150
150
|
|