veadk-python 0.2.1__py3-none-any.whl → 0.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of veadk-python might be problematic. Click here for more details.
- veadk/__init__.py +9 -3
- veadk/__pycache__/__init__.cpython-310.pyc +0 -0
- veadk/__pycache__/agent.cpython-310.pyc +0 -0
- veadk/__pycache__/runner.cpython-310.pyc +0 -0
- veadk/__pycache__/types.cpython-310.pyc +0 -0
- veadk/__pycache__/version.cpython-310.pyc +0 -0
- veadk/a2a/__pycache__/remote_ve_agent.cpython-310.pyc +0 -0
- veadk/a2a/__pycache__/ve_a2a_server.cpython-310.pyc +0 -0
- veadk/a2a/__pycache__/ve_agent_executor.cpython-310.pyc +0 -0
- veadk/a2a/remote_ve_agent.py +1 -1
- veadk/a2a/ve_a2a_server.py +0 -2
- veadk/agent.py +10 -7
- veadk/cli/__pycache__/__init__.cpython-310.pyc +0 -0
- veadk/cli/__pycache__/cli.cpython-310.pyc +0 -0
- veadk/cli/__pycache__/cli_deploy.cpython-310.pyc +0 -0
- veadk/cli/__pycache__/cli_init.cpython-310.pyc +0 -0
- veadk/cli/__pycache__/cli_prompt.cpython-310.pyc +0 -0
- veadk/cli/__pycache__/cli_studio.cpython-310.pyc +0 -0
- veadk/cli/__pycache__/cli_web.cpython-310.pyc +0 -0
- veadk/cli/__pycache__/main.cpython-310.pyc +0 -0
- veadk/cli/{services/agentpilot/__init__.py → cli.py} +25 -2
- veadk/cli/cli_deploy.py +147 -0
- veadk/cli/cli_init.py +106 -0
- veadk/cli/cli_prompt.py +64 -0
- veadk/cli/cli_web.py +154 -0
- veadk/cloud/__pycache__/cloud_agent_engine.cpython-310.pyc +0 -0
- veadk/cloud/__pycache__/cloud_app.cpython-310.pyc +0 -0
- veadk/cloud/cloud_agent_engine.py +77 -42
- veadk/cloud/cloud_app.py +37 -6
- veadk/database/__pycache__/__init__.cpython-310.pyc +0 -0
- veadk/database/__pycache__/database_adapter.cpython-310.pyc +0 -0
- veadk/database/database_adapter.py +2 -2
- veadk/database/kv/redis_database.py +12 -9
- veadk/database/relational/mysql_database.py +10 -9
- veadk/database/vector/opensearch_vector_database.py +14 -7
- veadk/database/viking/viking_database.py +23 -17
- veadk/database/viking/viking_memory_db.py +9 -9
- veadk/evaluation/__pycache__/base_evaluator.cpython-310.pyc +0 -0
- veadk/evaluation/adk_evaluator/adk_evaluator.py +12 -17
- veadk/evaluation/base_evaluator.py +10 -9
- veadk/evaluation/utils/prometheus.py +1 -4
- veadk/integrations/ve_apig/__pycache__/__init__.cpython-310.pyc +0 -0
- veadk/integrations/ve_apig/__pycache__/ve_apig.cpython-310.pyc +0 -0
- veadk/integrations/ve_faas/__pycache__/__init__.cpython-310.pyc +0 -0
- veadk/integrations/ve_faas/__pycache__/types.cpython-310.pyc +0 -0
- veadk/integrations/ve_faas/__pycache__/ve_faas.cpython-310.pyc +0 -0
- veadk/integrations/ve_faas/__pycache__/ve_faas_utils.cpython-310.pyc +0 -0
- veadk/{cli/services/vefaas → integrations/ve_faas}/__pycache__/vefaas.cpython-310.pyc +0 -0
- veadk/integrations/ve_faas/template/cookiecutter.json +11 -0
- veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/config.yaml.example +6 -0
- veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/deploy.py +103 -0
- veadk/{cli/services/vefaas/template → integrations/ve_faas/template/{{cookiecutter.local_dir_name}}}/src/__init__.py +0 -1
- veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/__pycache__/agent.cpython-310.pyc +0 -0
- veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/__pycache__/app.cpython-310.pyc +0 -0
- veadk/{cli/services/veapig/__init__.py → integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/agent.py} +10 -2
- veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/app.py +146 -0
- veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/requirements.txt +1 -0
- veadk/{cli/services/vefaas/template → integrations/ve_faas/template/{{cookiecutter.local_dir_name}}}/src/run.sh +10 -19
- veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name|replace('-', '_') }}/__init__.py +14 -0
- veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name|replace('-', '_') }}/__pycache__/__init__.cpython-310.pyc +0 -0
- veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name|replace('-', '_') }}/__pycache__/agent.cpython-310.pyc +0 -0
- veadk/{cli/services/vefaas/template/src/agent.py → integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name|replace('-', '_') }}/agent.py } +8 -6
- veadk/{cli/services/vefaas/vefaas.py → integrations/ve_faas/ve_faas.py} +15 -6
- veadk/integrations/ve_prompt_pilot/__init__.py +13 -0
- veadk/{cli/services/agentpilot → integrations/ve_prompt_pilot}/__pycache__/agentpilot.cpython-310.pyc +0 -0
- veadk/{cli/services/agentpilot/agentpilot.py → integrations/ve_prompt_pilot/ve_prompt_pilot.py} +5 -6
- veadk/knowledgebase/__pycache__/knowledgebase.cpython-310.pyc +0 -0
- veadk/knowledgebase/knowledgebase.py +3 -5
- veadk/memory/__pycache__/long_term_memory.cpython-310.pyc +0 -0
- veadk/memory/__pycache__/short_term_memory.cpython-310.pyc +0 -0
- veadk/memory/__pycache__/short_term_memory_processor.cpython-310.pyc +0 -0
- veadk/memory/long_term_memory.py +5 -2
- veadk/memory/short_term_memory.py +3 -7
- veadk/memory/short_term_memory_processor.py +7 -2
- veadk/prompts/prompt_optimization.py +11 -19
- veadk/runner.py +85 -68
- veadk/tools/__pycache__/load_knowledgebase_tool.cpython-310.pyc +0 -0
- veadk/tools/builtin_tools/__pycache__/vesearch.cpython-310.pyc +0 -0
- veadk/tools/load_knowledgebase_tool.py +3 -2
- veadk/tracing/__pycache__/base_tracer.cpython-310.pyc +0 -0
- veadk/tracing/base_tracer.py +27 -15
- veadk/tracing/telemetry/__pycache__/opentelemetry_tracer.cpython-310.pyc +0 -0
- veadk/tracing/telemetry/exporters/__pycache__/apmplus_exporter.cpython-310.pyc +0 -0
- veadk/tracing/telemetry/exporters/__pycache__/base_exporter.cpython-310.pyc +0 -0
- veadk/tracing/telemetry/exporters/__pycache__/cozeloop_exporter.cpython-310.pyc +0 -0
- veadk/tracing/telemetry/exporters/__pycache__/inmemory_exporter.cpython-310.pyc +0 -0
- veadk/tracing/telemetry/exporters/__pycache__/tls_exporter.cpython-310.pyc +0 -0
- veadk/tracing/telemetry/exporters/apmplus_exporter.py +0 -3
- veadk/tracing/telemetry/exporters/base_exporter.py +3 -0
- veadk/tracing/telemetry/exporters/cozeloop_exporter.py +0 -3
- veadk/tracing/telemetry/exporters/inmemory_exporter.py +13 -4
- veadk/tracing/telemetry/exporters/tls_exporter.py +2 -9
- veadk/tracing/telemetry/opentelemetry_tracer.py +14 -30
- veadk/types.py +20 -1
- veadk/utils/__pycache__/logger.cpython-310.pyc +0 -0
- veadk/utils/__pycache__/misc.cpython-310.pyc +0 -0
- veadk/utils/__pycache__/patches.cpython-310.pyc +0 -0
- veadk/utils/mcp_utils.py +1 -1
- veadk/utils/misc.py +31 -2
- veadk/utils/patches.py +0 -30
- veadk/version.py +1 -1
- {veadk_python-0.2.1.dist-info → veadk_python-0.2.2.dist-info}/METADATA +16 -5
- veadk_python-0.2.2.dist-info/RECORD +213 -0
- veadk_python-0.2.2.dist-info/entry_points.txt +2 -0
- veadk/cli/main.py +0 -379
- veadk/cli/services/veapig/__pycache__/__init__.cpython-310.pyc +0 -0
- veadk/cli/services/vefaas/__init__.py +0 -17
- veadk/cli/services/vefaas/__pycache__/__init__.cpython-310.pyc +0 -0
- veadk/cli/services/vefaas/template/README.md +0 -37
- veadk/cli/services/vefaas/template/config.yaml.example +0 -19
- veadk/cli/services/vefaas/template/deploy.py +0 -58
- veadk/cli/services/vefaas/template/src/__pycache__/agent.cpython-310.pyc +0 -0
- veadk/cli/services/vefaas/template/src/app.py +0 -70
- veadk/cli/services/vefaas/template/src/requirements.txt +0 -6
- veadk/cli/services/vefaas/template/src/studio_app.py +0 -47
- veadk/cli/services/vetls/__init__.py +0 -17
- veadk/cli/services/vetls/vetls.py +0 -87
- veadk/cli/studio/__pycache__/__init__.cpython-310.pyc +0 -0
- veadk/cli/studio/__pycache__/fast_api.cpython-310.pyc +0 -0
- veadk/cli/studio/__pycache__/models.cpython-310.pyc +0 -0
- veadk/cli/studio/__pycache__/studio_processor.cpython-310.pyc +0 -0
- veadk/cli/studio/fast_api.py +0 -392
- veadk/cli/studio/models.py +0 -76
- veadk/cli/studio/studio_processor.py +0 -127
- veadk/cli/studio/web/404.html +0 -1
- veadk/cli/studio/web/__pycache__/__init__.cpython-310.pyc +0 -0
- veadk/cli/studio/web/_next/static/chunks/1012.1c22f40693022876.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1017.577d2551c3a2b396.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1044.7c49605a0f9b5d5c.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1067.71aee8d185b3a9d7.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1088.8f7f3c71458d301b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1092.7b553ab1ec1737bf.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1117.8c537e259adccbe2.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1142.1faf8d46ccf4030c.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1146.25bf08c82f4ad1c5.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1192.55e7712b3dc8b6a8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1200.1038681512a9f69a.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1265.e055670c82b2d131.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1275.322d8bf8a580b859.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/140.d7e90f5e12cf288c.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1421.7fff0e9f0677f79b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1469.16c1e07a7c0f9817.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1480.3c94a6d6d61c4f56.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1507.4c7617217de3bef8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1523.1740f3d9d913fe76.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1526.5fb34657a70589b5.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1563.6c364e96b33f3328.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/157.2e3f508bc115c15c.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1577.b6cebda169ac9c75.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1622.a611b4dab478587d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1685.db5d4efe2f0e3767.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1687.a10254d4e1dd84c0.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1826.da2ac0fcfb59cfae.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1832.f81112d6166a9563.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1851.1d0bdfdf5fa89313.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/189.c602a68aadf321e4.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1899.dd303f08095745bc.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/193.1e81c5b253db2ee7.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1936.8fad6d3898c86483.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1942.165056b632c269d4.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/1974.ee28ba5ac111af70.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2.c2afe2e24520b5de.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2006.298ac00a777dc313.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2063.69ba443b7901194c.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2067-e02b0bc96d886930.js +0 -91
- veadk/cli/studio/web/_next/static/chunks/2119.4595d21bc0340c5b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/212.0a8d6163667d9369.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2190.5549f7a57901bd46.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2193.51ce38cc9e965abd.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2202.a6c08676680e55ad.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2247.af410bd18c38e538.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2313.6932520daf0fa88c.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2316.c9eafa57971eebc8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2324.766859688506ac0d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2328.131b0296bc19ba4e.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2332.b9b7ac0b386a4a28.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2344.cc417c70cb6dbc51.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2347.9f442b75b11de668.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2356.f6b4ac7eb50edb44.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2370.044b34646bc58363.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2378.2005af4d2bf100dd.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2437.68534e42d45c5c61.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2449.db460ea54b851bc1.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2455.153b04863d2ae9dc.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2484.139843b3f1cc8ea5.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2500.e2b8da0d1401bd5f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2513.a7056ff98b04c4cd.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2533.5e35d247414428d0.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2541.3e5a23b461d7a9fd.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2545.0e4e3a784391205b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2558.17eda1052d7c8c1f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2559.7432df2540cfff07.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2578.1be0687e71bc7731.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2601.aa7e57bdf472372c.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/261-19b52c2c85aefb5d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2642.9ea0966ca6bd8ace.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2669.e90ab188be48154e.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2737.4f5c7f7b9293ae65.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2804.b801cadc26133d92.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2817.8584109b4bc979e8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/282.cfff86fab979470f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2822.12cdf0520b2d321a.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/288.5c1053dbdc74212b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2964.a531dbf5eb867f3d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/2f7605f3.0531565b22967bb4.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3080.9aada68cdc9ad5c2.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3090.a9e7f71df818f607.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3103.b7cdb76d87ac0fdd.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/311.2737abd09304ba1b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3110.84511591e516221b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3126.307ac469edcf6ec9.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/320.a3c0085ebf05b7da.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/322.668c1a20cc012c68.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3341.a0f06b1edc2332fb.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3357.ced93e6bf8e56762.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3386.53f3aa4ff0dd0170.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3391.402e02fd7c297ff8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3392.5172b1d190ff0e8c.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/33fb68d2.aacf24a5979288bd.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3429.74dcaa985d188e43.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3433.737c3d948bdda1da.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3435.1798454b9a5b69ca.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3481.a916f933c4e534b8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3602.bdf28129f1569554.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3607.49cec7e9330d1f4d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3615.3280752d551adf2d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3721.f660b5b05621f5e4.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3786.ae0824e683556d37.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/3805.ec0340f0f6e61bbc.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4045.42a3c9fb7d932ebc.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4052.86cc820c95ad25a8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4058.3cea468f5370b7c9.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4068.ff830b92579f6b7f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/411.5679da8e6a856022.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4118.e2544434642f6640.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4139.80b0aab26d9a4601.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/423.da4e0abf5fd408dc.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4262.9d5532cb76a86371.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/431.ef6d705ac627958f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4337.3c94a6d6d61c4f56.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4357-39eb6b5934ac97db.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4382.64908590e0a18d66.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4489.7a9b45fb6f6bf491.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/450.76880cb957b128fa.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/452.14fb00ee415ad32b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4577.d1cbd95a87e2adb2.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4626.0866c7ee38885775.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4627.3d7df52a668a6b57.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4713.3891f7d347513ef5.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4749.25fd94a8ed476b13.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4836.afe027e38fb9a7e8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/483e0093.2a09b17ad5d1b3ed.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4852.cac6e9c5032df796.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4860.94324451a00fadc0.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4869.091903cb36ad77ad.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4888.e248e212b002f5df.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/492.ac958937dd36300f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4958.85e0dbc8b2319776.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4968.1477e29640b2deb8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4980.1300ab7d9c76e523.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/4aa6d3c9.dade76a8ff4112d3.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5006.8ee1d611f529da11.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5018.c34d2a9f82e24c51.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5050.c06b2d8e12720555.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5084.9b554002148843ea.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5097.2e9a097ccfb70707.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5113.fa5291624248676b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5115.ff49cf5e2be16db4.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/521.98b7995e15b59075.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5213.1a7618fcae8c5282.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/522.56063fbcf9aa8699.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5247.b304f94eb3132618.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5248.f9faaff2f0d7631f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/527-1c65afbb202752bd.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/529.7d231c2076b6d77a.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5305.9323b5f7efaa005e.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5317.fce75000492e9db4.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5326.3be5b04850f0a2f2.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5329.415b43aacdd9a471.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5331.77f0493c99857944.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5341.1fff90ab37947f62.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/541.04d938e895b7f678.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5428.fa789e4b0d61cd0d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5460.cee07b9411c5c5ca.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5472.f645717ad2edd28f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5503.75093ef3870b655f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5567.44555d5da6ed19b7.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5572.3c35c26a4867ca56.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5579.b3be6028d1833118.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5631.b8a2c0dc65737269.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5656.b743b6ab9a61eec0.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5677.c063822912e55a25.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5779.0b1a3c7d1c018a1d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5817.ae1fb69a154fbf4c.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5860.7154866a5d2dd82f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5865.645e44e8e171ba9f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5906.30cce16ed88f920a.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5942.cd6dfaad76581849.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/5958.e2f981fa3cba5d99.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/60f90b65.d526f39688baa769.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6128.3da302fb50769250.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/62.5408e55d383a8078.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/624.7c7198473a8877d8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6264.e7bdd878d9e7a249.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6266.97409ca00a3c32d9.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6269.668be917daafccaa.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/630.87a6f22ac3e8956b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6341.35afa02112051be8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6353.93869a804ffe525b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6375.46d2897cb2526abd.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6395.f113970ceec6ba91.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/63d31579-18fb2181524a9c6f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6423.d4cf9eb5b2ae6336.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6437.5eeaa7320bce1872.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6438.1c8486cc62da4117.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6451.f56cce0a07138982.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6456.f263b33ea51e4f54.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6504.0e6ae8d5bb987be6.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6560.b08504c0d99d71d4.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6563.e6d3bdba9860590d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6621.639e4057d9c15bea.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6625.c0233245d2c1ef25.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6641.5487a2d68b0c52f2.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6644.74de9f2de2dc75f5.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6730.aac5bd02aab8258f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6824.8c40dbd3eb390403.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6831.74b4a9b75f4ff9d1.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/688.9a27292bd19bc993.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6899.ac4207b9a778bd0e.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6901.4755ed550912589c.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6910.5d45b17e287dba94.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6928.d0a540480df90930.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6958.c58e8e991b201429.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/6d60d248-1bbd761ee88ab2e4.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/70207789-862965aac548ab2a.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7046.60a892c1e506cf5f.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7068.6639b51e828de233.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7172.aeda2e49d81fc0fd.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7185.0210768f3918ec41.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7200.86e672d8e2c1a920.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/730.2c5e46bf8fd29fcc.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7301.43929cd9c2a5d2ea.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7335.68692b193fa0dff6.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7412.98554f6ee574e288.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7422.e4a69fce6694ba90.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7448.63e7b8d5fd090bd1.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7479.97f696c6ada04b29.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7482.ab6a217c34f6934a.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7484.b91675bd38b250f8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7522.84dac217ae0701ac.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7540-38c13446d29f43f2.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7556.ae47807e378de233.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/761.2ce77249f8d3a1ce.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7678.ceea70830f2dd7ff.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7684.c43e4b5ad1f9b0af.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7698.44201098b212aee8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/76ff44ea.8322bdedaee78e2d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7725.b15cb8b6e1d15403.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7855.513a507852c649f2.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7910.266df3f992c16215.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7940.f490f3d5e6590e54.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/7960.491bd15bef82755c.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8020.795778775ed5c387.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8107.fbb6017b3e909da5.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8169.4d7fd139784eb935.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8196.6c5c3dfe86e1c3ca.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8257.ee682bc2599473cb.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8305.d2c965e56fe9350c.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8324.8c3edcc756f5e2f3.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8388.cc59fb03d62a71cf.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8394.d5ca17ce8f6fffb0.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8419.b11c64d18dc580b5.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8478.5f4272ae9afa4061.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8480.a071150cb4eddc29.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8535.0ab856b7bf0e161b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8571.8af7983b03c09f86.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8583.4afa8c68cb867b2d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8601.520cbfc8abbfb5f8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8656.5f8b6212d2b35257.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8665.7f24febc4a78ff5e.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8687.c94010eb559245b6.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8815.81a5c5700763ca02.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8878.28a43a5fe23f5bd0.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8884.e4e411c7978b2552.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8962.db5c7728bef5ff0b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/8984.dfcb15f115089c4a.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9022.d161e32a6b1bcc61.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9099.8ba5be825d17456a.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/914.72991ff6c9332951.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9217.40b78a38cadcd268.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/925.0cc74592f03b10e9.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9275.ac60c49c68c86e51.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/92a17e6d.da4fba322f70cd46.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/92b95f17.39f98387a9867b4a.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9361.d3535e4d87c1c527.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9433.55eb6e4ea7edb262.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9436.5b2462fa3ddebb27.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9445.e29312f685c22eff.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9471.646bdfb962cdd5c2.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9473.efa6db413edc23d1.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9484.e9f1cd4e3f8e75df.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9545.61026f3c11f914f2.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9555.287e4e4a50087d62.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/963.da40bca273fb82c6.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9636.4d3678b9a4e0b46e.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9657.459d6300b0bc8ef8.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9676.cef4d87274c64417.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/97.15df9ee2f6270421.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9754.76a3ea33dc0e9a07.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9790.7e01549d70279760.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9871.994068e90ef076a5.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9887.0fbd7c3721a3c1d1.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9923.14c88b64d7749eaa.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/997.193727d4b2eede68.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9971.36f503837f73d3c2.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9976.ab4ec59ede08f398.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9990.13e025853b0250b6.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/9997.a844d058b46bb680.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/app/_not-found/page-ce05b36a67c37396.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/app/layout-b0d50d105c55fd6d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/app/page-7b51d29c96f44f61.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/app/run/page-c2cd4dca690d6d29.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/c06218ab.b1da50a91b579a52.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/c911d7bd.bcca2e3dda67a7a6.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/d386b14e.c746c93eac03a58e.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/e925550e.ff706051f5223d26.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/fc645be4-662fd2da08676daa.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/framework-2b8e4864be10152d.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/main-33072985ea766514.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/main-app-4a8ccba13aa7606b.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/pages/_app-c0ae3ec92f260128.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/pages/_error-899a04d491d7df58.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
- veadk/cli/studio/web/_next/static/chunks/webpack-14afc8861a1fe293.js +0 -1
- veadk/cli/studio/web/_next/static/css/366cfdd7fdd8bcac.css +0 -1
- veadk/cli/studio/web/_next/static/gvLvin_lQcpkhQupQqPu1/_buildManifest.js +0 -1
- veadk/cli/studio/web/_next/static/gvLvin_lQcpkhQupQqPu1/_ssgManifest.js +0 -1
- veadk/cli/studio/web/_next/static/media/569ce4b8f30dc480-s.p.woff2 +0 -0
- veadk/cli/studio/web/_next/static/media/747892c23ea88013-s.woff2 +0 -0
- veadk/cli/studio/web/_next/static/media/8d697b304b401681-s.woff2 +0 -0
- veadk/cli/studio/web/_next/static/media/93f479601ee12b01-s.p.woff2 +0 -0
- veadk/cli/studio/web/_next/static/media/9610d9e46709d722-s.woff2 +0 -0
- veadk/cli/studio/web/_next/static/media/ba015fad6dcf6784-s.woff2 +0 -0
- veadk/cli/studio/web/favicon.ico +0 -0
- veadk/cli/studio/web/file.svg +0 -1
- veadk/cli/studio/web/globe.svg +0 -1
- veadk/cli/studio/web/index.html +0 -1
- veadk/cli/studio/web/index.txt +0 -43
- veadk/cli/studio/web/next.svg +0 -1
- veadk/cli/studio/web/run.html +0 -1
- veadk/cli/studio/web/run.txt +0 -44
- veadk/cli/studio/web/veadk-logo.png +0 -0
- veadk/cli/studio/web/vercel.svg +0 -1
- veadk/cli/studio/web/window.svg +0 -1
- veadk/tracing/telemetry/exporters/apiserver_exporter.py +0 -60
- veadk_python-0.2.1.dist-info/RECORD +0 -534
- veadk_python-0.2.1.dist-info/entry_points.txt +0 -2
- /veadk/{cli/services/vefaas/template → integrations/ve_apig}/__init__.py +0 -0
- /veadk/{cli/services/veapig → integrations/ve_apig}/__pycache__/apig.cpython-310.pyc +0 -0
- /veadk/{cli/services/veapig/apig.py → integrations/ve_apig/ve_apig.py} +0 -0
- /veadk/{cli/services/veapig/apig_utils.py → integrations/ve_apig/ve_apig_utils.py} +0 -0
- /veadk/{cli/studio → integrations/ve_faas}/__init__.py +0 -0
- /veadk/{cli/services/vefaas → integrations/ve_faas}/__pycache__/vefaas_utils.cpython-310.pyc +0 -0
- /veadk/{cli/studio/web → integrations/ve_faas/template/{{cookiecutter.local_dir_name}}}/__init__.py +0 -0
- /veadk/{cli/services/vefaas/template → integrations/ve_faas/template/{{cookiecutter.local_dir_name}}}/src/__pycache__/studio_app.cpython-310.pyc +0 -0
- /veadk/{cli/services/vefaas/vefaas_utils.py → integrations/ve_faas/ve_faas_utils.py} +0 -0
- /veadk/{cli/services/agentpilot → integrations/ve_prompt_pilot}/__pycache__/__init__.cpython-310.pyc +0 -0
- {veadk_python-0.2.1.dist-info → veadk_python-0.2.2.dist-info}/WHEEL +0 -0
- {veadk_python-0.2.1.dist-info → veadk_python-0.2.2.dist-info}/licenses/LICENSE +0 -0
- {veadk_python-0.2.1.dist-info → veadk_python-0.2.2.dist-info}/top_level.txt +0 -0
|
@@ -13,14 +13,17 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
import os
|
|
16
|
+
import socket
|
|
17
|
+
import subprocess
|
|
18
|
+
import time
|
|
16
19
|
from pathlib import Path
|
|
17
20
|
from typing import Any
|
|
18
21
|
|
|
19
22
|
from pydantic import BaseModel
|
|
20
23
|
|
|
21
|
-
from veadk.cli.services.vefaas import VeFaaS
|
|
22
24
|
from veadk.cloud.cloud_app import CloudApp
|
|
23
25
|
from veadk.config import getenv
|
|
26
|
+
from veadk.integrations.ve_faas.ve_faas import VeFaaS
|
|
24
27
|
from veadk.utils.logger import get_logger
|
|
25
28
|
from veadk.utils.misc import formatted_timestamp
|
|
26
29
|
|
|
@@ -52,37 +55,68 @@ class CloudAgentEngine(BaseModel):
|
|
|
52
55
|
f"Invalid Volcengine FaaS function name `{name}`, please use lowercase letters and numbers, or replace it with a `-` char."
|
|
53
56
|
)
|
|
54
57
|
|
|
55
|
-
#
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
# # copy user's requirements.txt
|
|
59
|
+
# module = load_module_from_file(
|
|
60
|
+
# module_name="agent_source", file_path=f"{path}/agent.py"
|
|
61
|
+
# )
|
|
62
|
+
|
|
63
|
+
# requirement_file_path = module.agent_run_config.requirement_file_path
|
|
64
|
+
# if Path(requirement_file_path).exists():
|
|
65
|
+
# shutil.copy(requirement_file_path, os.path.join(path, "requirements.txt"))
|
|
66
|
+
|
|
67
|
+
# logger.info(
|
|
68
|
+
# f"Copy requirement file: from {requirement_file_path} to {path}/requirements.txt"
|
|
69
|
+
# )
|
|
70
|
+
# else:
|
|
71
|
+
# logger.warning(
|
|
72
|
+
# f"Requirement file: {requirement_file_path} not found or you have no requirement file in your project. Use a default one."
|
|
73
|
+
# )
|
|
74
|
+
|
|
75
|
+
def _try_launch_fastapi_server(self, path: str):
|
|
76
|
+
"""Try to launch a fastapi server for tests according to user's configuration.
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
path (str): Local agent project path.
|
|
80
|
+
"""
|
|
81
|
+
RUN_SH = f"{path}/run.sh"
|
|
82
|
+
|
|
83
|
+
HOST = "0.0.0.0"
|
|
84
|
+
PORT = 8000
|
|
85
|
+
|
|
86
|
+
# Prepare environment variables
|
|
87
|
+
os.environ["_FAAS_FUNC_TIMEOUT"] = "900"
|
|
88
|
+
env = os.environ.copy()
|
|
89
|
+
|
|
90
|
+
process = subprocess.Popen(
|
|
91
|
+
["bash", RUN_SH],
|
|
92
|
+
stdout=subprocess.PIPE,
|
|
93
|
+
stderr=subprocess.STDOUT,
|
|
94
|
+
text=True,
|
|
95
|
+
env=env,
|
|
96
|
+
bufsize=1,
|
|
58
97
|
)
|
|
59
98
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
f"Local agent project path `{path}` does not contain `config.yaml` file. Some important config items may not be set."
|
|
63
|
-
)
|
|
99
|
+
timeout = 30
|
|
100
|
+
start_time = time.time()
|
|
64
101
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"app.py",
|
|
68
|
-
"studio_app.py",
|
|
69
|
-
"run.sh",
|
|
70
|
-
"requirements.txt",
|
|
71
|
-
"__init__.py",
|
|
72
|
-
]
|
|
73
|
-
for template_file in template_files:
|
|
74
|
-
if os.path.exists(os.path.join(path, template_file)):
|
|
75
|
-
logger.warning(
|
|
76
|
-
f"Local agent project path `{path}` contains a `{template_file}` file. Use your own `{template_file}` file may cause unexpected behavior."
|
|
77
|
-
)
|
|
78
|
-
else:
|
|
79
|
-
logger.info(
|
|
80
|
-
f"No `{template_file}` detected in local agent project path `{path}`. Prepare it."
|
|
81
|
-
)
|
|
82
|
-
template_file_path = f"{Path(__file__).resolve().parent.resolve().parent.resolve()}/cli/services/vefaas/template/src/{template_file}"
|
|
83
|
-
import shutil
|
|
102
|
+
for line in process.stdout: # type: ignore
|
|
103
|
+
print(line, end="")
|
|
84
104
|
|
|
85
|
-
|
|
105
|
+
if time.time() - start_time > timeout:
|
|
106
|
+
process.terminate()
|
|
107
|
+
raise RuntimeError(f"FastAPI server failed to start on {HOST}:{PORT}")
|
|
108
|
+
try:
|
|
109
|
+
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
|
110
|
+
s.settimeout(0.1)
|
|
111
|
+
s.connect(("127.0.0.1", PORT))
|
|
112
|
+
logger.info(f"FastAPI server is listening on {HOST}:{PORT}")
|
|
113
|
+
logger.info("Local deplyment test successfully.")
|
|
114
|
+
break
|
|
115
|
+
except (ConnectionRefusedError, socket.timeout):
|
|
116
|
+
continue
|
|
117
|
+
|
|
118
|
+
process.terminate()
|
|
119
|
+
process.wait()
|
|
86
120
|
|
|
87
121
|
def deploy(
|
|
88
122
|
self,
|
|
@@ -91,34 +125,28 @@ class CloudAgentEngine(BaseModel):
|
|
|
91
125
|
gateway_name: str = "",
|
|
92
126
|
gateway_service_name: str = "",
|
|
93
127
|
gateway_upstream_name: str = "",
|
|
94
|
-
use_studio: bool = False,
|
|
95
128
|
use_adk_web: bool = False,
|
|
129
|
+
local_test: bool = False,
|
|
96
130
|
) -> CloudApp:
|
|
97
131
|
"""Deploy local agent project to Volcengine FaaS platform.
|
|
98
132
|
|
|
99
133
|
Args:
|
|
134
|
+
application_name (str): Expected VeFaaS application name.
|
|
100
135
|
path (str): Local agent project path.
|
|
101
|
-
|
|
136
|
+
gateway_name (str): Gateway name.
|
|
137
|
+
gateway_service_name (str): Gateway service name.
|
|
138
|
+
gateway_upstream_name (str): Gateway upstream name.
|
|
139
|
+
use_adk_web (bool): Whether to use ADK Web.
|
|
140
|
+
local_test (bool): Whether to run local test for FastAPI Server.
|
|
102
141
|
|
|
103
142
|
Returns:
|
|
104
|
-
|
|
143
|
+
CloudApp: The deployed cloud application instance.
|
|
105
144
|
"""
|
|
106
|
-
assert not (use_studio and use_adk_web), (
|
|
107
|
-
"use_studio and use_adk_web can not be True at the same time."
|
|
108
|
-
)
|
|
109
|
-
|
|
110
145
|
# prevent deepeval writing operations
|
|
111
146
|
import veadk.config
|
|
112
147
|
|
|
113
148
|
veadk.config.veadk_environments["DEEPEVAL_TELEMETRY_OPT_OUT"] = "YES"
|
|
114
149
|
|
|
115
|
-
if use_studio:
|
|
116
|
-
veadk.config.veadk_environments["USE_STUDIO"] = "True"
|
|
117
|
-
else:
|
|
118
|
-
import veadk.config
|
|
119
|
-
|
|
120
|
-
veadk.config.veadk_environments["USE_STUDIO"] = "False"
|
|
121
|
-
|
|
122
150
|
if use_adk_web:
|
|
123
151
|
import veadk.config
|
|
124
152
|
|
|
@@ -132,6 +160,9 @@ class CloudAgentEngine(BaseModel):
|
|
|
132
160
|
path = str(Path(path).resolve())
|
|
133
161
|
self._prepare(path, application_name)
|
|
134
162
|
|
|
163
|
+
if local_test:
|
|
164
|
+
self._try_launch_fastapi_server(path)
|
|
165
|
+
|
|
135
166
|
if not gateway_name:
|
|
136
167
|
gateway_name = f"{application_name}-gw-{formatted_timestamp()}"
|
|
137
168
|
if not gateway_service_name:
|
|
@@ -166,6 +197,10 @@ class CloudAgentEngine(BaseModel):
|
|
|
166
197
|
return
|
|
167
198
|
else:
|
|
168
199
|
app_id = self._vefaas_service.find_app_id_by_name(app_name)
|
|
200
|
+
if not app_id:
|
|
201
|
+
raise ValueError(
|
|
202
|
+
f"Cloud app {app_name} not found, cannot delete it. Please check the app name."
|
|
203
|
+
)
|
|
169
204
|
self._vefaas_service.delete(app_id)
|
|
170
205
|
|
|
171
206
|
def update_function_code(
|
veadk/cloud/cloud_app.py
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
import json
|
|
15
16
|
from typing import Any
|
|
16
17
|
from uuid import uuid4
|
|
17
18
|
|
|
18
|
-
import json
|
|
19
19
|
import httpx
|
|
20
20
|
from a2a.client import A2ACardResolver, A2AClient
|
|
21
21
|
from a2a.types import AgentCard, Message, MessageSendParams, SendMessageRequest
|
|
@@ -79,14 +79,21 @@ class CloudApp:
|
|
|
79
79
|
volcengine_ak: str = getenv("VOLCENGINE_ACCESS_KEY"),
|
|
80
80
|
volcengine_sk: str = getenv("VOLCENGINE_SECRET_KEY"),
|
|
81
81
|
) -> str:
|
|
82
|
-
from veadk.
|
|
82
|
+
from veadk.integrations.ve_faas.ve_faas import VeFaaS
|
|
83
83
|
|
|
84
84
|
vefaas_client = VeFaaS(access_key=volcengine_ak, secret_key=volcengine_sk)
|
|
85
|
+
|
|
85
86
|
app = vefaas_client.get_application_details(
|
|
86
87
|
app_id=self.vefaas_application_id,
|
|
87
88
|
app_name=self.vefaas_application_name,
|
|
88
89
|
)
|
|
90
|
+
|
|
91
|
+
if not app:
|
|
92
|
+
raise ValueError(
|
|
93
|
+
f"VeFaaS CloudAPP with application_id `{self.vefaas_application_id}` or application_name `{self.vefaas_application_name}` not found."
|
|
94
|
+
)
|
|
89
95
|
cloud_resource = json.loads(app["CloudResource"])
|
|
96
|
+
|
|
90
97
|
try:
|
|
91
98
|
vefaas_endpoint = cloud_resource["framework"]["url"]["system_url"]
|
|
92
99
|
except Exception as e:
|
|
@@ -98,8 +105,15 @@ class CloudApp:
|
|
|
98
105
|
raise ValueError(
|
|
99
106
|
"VeFaaS CloudAPP must be set application_name to get application_id."
|
|
100
107
|
)
|
|
101
|
-
|
|
102
|
-
|
|
108
|
+
from veadk.integrations.ve_faas.ve_faas import VeFaaS
|
|
109
|
+
|
|
110
|
+
vefaas_client = VeFaaS(
|
|
111
|
+
access_key=getenv("VOLCENGINE_ACCESS_KEY"),
|
|
112
|
+
secret_key=getenv("VOLCENGINE_SECRET_KEY"),
|
|
113
|
+
)
|
|
114
|
+
vefaas_application_id = vefaas_client.find_app_id_by_name(
|
|
115
|
+
self.vefaas_application_name
|
|
116
|
+
)
|
|
103
117
|
return vefaas_application_id
|
|
104
118
|
|
|
105
119
|
async def _get_a2a_client(self) -> A2AClient:
|
|
@@ -149,7 +163,7 @@ class CloudApp:
|
|
|
149
163
|
print("Delete cancelled.")
|
|
150
164
|
return
|
|
151
165
|
else:
|
|
152
|
-
from veadk.
|
|
166
|
+
from veadk.integrations.ve_faas.ve_faas import VeFaaS
|
|
153
167
|
|
|
154
168
|
vefaas_client = VeFaaS(access_key=volcengine_ak, secret_key=volcengine_sk)
|
|
155
169
|
vefaas_client.delete(self.vefaas_application_id)
|
|
@@ -180,12 +194,29 @@ class CloudApp:
|
|
|
180
194
|
id=uuid4().hex,
|
|
181
195
|
params=MessageSendParams(**send_message_payload),
|
|
182
196
|
)
|
|
197
|
+
|
|
183
198
|
res = await a2a_client.send_message(
|
|
184
199
|
message_send_request,
|
|
185
200
|
http_kwargs={"timeout": httpx.Timeout(timeout)},
|
|
186
201
|
)
|
|
187
|
-
|
|
202
|
+
|
|
203
|
+
logger.debug(
|
|
204
|
+
f"Message sent to cloud app {self.vefaas_application_name} with response: {res}"
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
# we ignore type checking here, because the response
|
|
208
|
+
# from CloudApp will not be `Task` type
|
|
209
|
+
return res.root.result # type: ignore
|
|
188
210
|
except Exception as e:
|
|
189
211
|
# TODO(floritange): show error log on VeFaaS function
|
|
190
212
|
print(e)
|
|
191
213
|
return None
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def get_message_id(message: Message):
|
|
217
|
+
"""Get the messageId of the a2a message"""
|
|
218
|
+
if getattr(message, "messageId", None):
|
|
219
|
+
# Compatible with the messageId of the old a2a-python version (<0.3.0) in cloud app
|
|
220
|
+
return message.messageId # type: ignore
|
|
221
|
+
else:
|
|
222
|
+
return message.message_id
|
|
Binary file
|
|
Binary file
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
import re
|
|
16
16
|
import time
|
|
17
17
|
from typing import BinaryIO, TextIO
|
|
18
|
-
from veadk.database.base_database import BaseDatabase
|
|
19
18
|
|
|
19
|
+
from veadk.database.base_database import BaseDatabase
|
|
20
20
|
from veadk.utils.logger import get_logger
|
|
21
21
|
|
|
22
22
|
logger = get_logger(__name__)
|
|
@@ -41,7 +41,7 @@ class KVDatabaseAdapter:
|
|
|
41
41
|
)
|
|
42
42
|
raise e
|
|
43
43
|
|
|
44
|
-
def query(self, query: str, index: str, top_k: int = 0) -> list
|
|
44
|
+
def query(self, query: str, index: str, top_k: int = 0) -> list:
|
|
45
45
|
logger.debug(f"Querying Redis database: index={index} query={query}")
|
|
46
46
|
|
|
47
47
|
# ignore top_k, as KV search only return one result
|
|
@@ -17,7 +17,7 @@ from __future__ import annotations
|
|
|
17
17
|
from typing import Any
|
|
18
18
|
|
|
19
19
|
import redis
|
|
20
|
-
from pydantic import BaseModel, Field
|
|
20
|
+
from pydantic import BaseModel, Field
|
|
21
21
|
from typing_extensions import override
|
|
22
22
|
|
|
23
23
|
from veadk.config import getenv
|
|
@@ -30,19 +30,19 @@ logger = get_logger(__name__)
|
|
|
30
30
|
|
|
31
31
|
class RedisDatabaseConfig(BaseModel):
|
|
32
32
|
host: str = Field(
|
|
33
|
-
|
|
33
|
+
default_factory=lambda: getenv("DATABASE_REDIS_HOST"),
|
|
34
34
|
description="Redis host",
|
|
35
35
|
)
|
|
36
36
|
port: int = Field(
|
|
37
|
-
|
|
37
|
+
default_factory=lambda: int(getenv("DATABASE_REDIS_PORT")),
|
|
38
38
|
description="Redis port",
|
|
39
39
|
)
|
|
40
40
|
db: int = Field(
|
|
41
|
-
|
|
41
|
+
default_factory=lambda: int(getenv("DATABASE_REDIS_DB")),
|
|
42
42
|
description="Redis db",
|
|
43
43
|
)
|
|
44
44
|
password: str = Field(
|
|
45
|
-
|
|
45
|
+
default_factory=lambda: getenv("DATABASE_REDIS_PASSWORD"),
|
|
46
46
|
description="Redis password",
|
|
47
47
|
)
|
|
48
48
|
decode_responses: bool = Field(
|
|
@@ -53,7 +53,6 @@ class RedisDatabaseConfig(BaseModel):
|
|
|
53
53
|
|
|
54
54
|
class RedisDatabase(BaseModel, BaseDatabase):
|
|
55
55
|
config: RedisDatabaseConfig = Field(default_factory=RedisDatabaseConfig)
|
|
56
|
-
_client: redis.Redis = PrivateAttr(default=None)
|
|
57
56
|
|
|
58
57
|
def model_post_init(self, context: Any, /) -> None:
|
|
59
58
|
try:
|
|
@@ -64,6 +63,7 @@ class RedisDatabase(BaseModel, BaseDatabase):
|
|
|
64
63
|
password=self.config.password,
|
|
65
64
|
decode_responses=self.config.decode_responses,
|
|
66
65
|
)
|
|
66
|
+
|
|
67
67
|
self._client.ping()
|
|
68
68
|
logger.info("Connected to Redis successfully.")
|
|
69
69
|
except Exception as e:
|
|
@@ -79,10 +79,10 @@ class RedisDatabase(BaseModel, BaseDatabase):
|
|
|
79
79
|
raise e
|
|
80
80
|
|
|
81
81
|
@override
|
|
82
|
-
def query(self, key: str, query: str = "", **kwargs) -> list
|
|
82
|
+
def query(self, key: str, query: str = "", **kwargs) -> list:
|
|
83
83
|
try:
|
|
84
84
|
result = self._client.lrange(key, 0, -1)
|
|
85
|
-
return result
|
|
85
|
+
return result # type: ignore
|
|
86
86
|
except Exception as e:
|
|
87
87
|
logger.error(f"Failed to search from Redis list key '{key}': {e}")
|
|
88
88
|
raise e
|
|
@@ -99,8 +99,11 @@ class RedisDatabase(BaseModel, BaseDatabase):
|
|
|
99
99
|
|
|
100
100
|
try:
|
|
101
101
|
# For simple key deletion
|
|
102
|
+
# We use sync Redis client to delete the key
|
|
103
|
+
# so the result will be `int`
|
|
102
104
|
result = self._client.delete(key)
|
|
103
|
-
|
|
105
|
+
|
|
106
|
+
if result > 0: # type: ignore
|
|
104
107
|
logger.info(f"Deleted key `{key}` from Redis.")
|
|
105
108
|
else:
|
|
106
109
|
logger.info(f"Key `{key}` not found in Redis. Skipping deletion.")
|
|
@@ -17,7 +17,7 @@ from __future__ import annotations
|
|
|
17
17
|
from typing import Any
|
|
18
18
|
|
|
19
19
|
import pymysql
|
|
20
|
-
from pydantic import BaseModel, Field
|
|
20
|
+
from pydantic import BaseModel, Field
|
|
21
21
|
from typing_extensions import override
|
|
22
22
|
|
|
23
23
|
from veadk.config import getenv
|
|
@@ -30,23 +30,23 @@ logger = get_logger(__name__)
|
|
|
30
30
|
|
|
31
31
|
class MysqlDatabaseConfig(BaseModel):
|
|
32
32
|
host: str = Field(
|
|
33
|
-
|
|
33
|
+
default_factory=lambda: getenv("DATABASE_MYSQL_HOST"),
|
|
34
34
|
description="Mysql host",
|
|
35
35
|
)
|
|
36
36
|
user: str = Field(
|
|
37
|
-
|
|
37
|
+
default_factory=lambda: getenv("DATABASE_MYSQL_USER"),
|
|
38
38
|
description="Mysql user",
|
|
39
39
|
)
|
|
40
40
|
password: str = Field(
|
|
41
|
-
|
|
41
|
+
default_factory=lambda: getenv("DATABASE_MYSQL_PASSWORD"),
|
|
42
42
|
description="Mysql password",
|
|
43
43
|
)
|
|
44
44
|
database: str = Field(
|
|
45
|
-
|
|
45
|
+
default_factory=lambda: getenv("DATABASE_MYSQL_DATABASE"),
|
|
46
46
|
description="Mysql database",
|
|
47
47
|
)
|
|
48
48
|
charset: str = Field(
|
|
49
|
-
|
|
49
|
+
default_factory=lambda: getenv("DATABASE_MYSQL_CHARSET", "utf8mb4"),
|
|
50
50
|
description="Mysql charset",
|
|
51
51
|
)
|
|
52
52
|
|
|
@@ -54,8 +54,6 @@ class MysqlDatabaseConfig(BaseModel):
|
|
|
54
54
|
class MysqlDatabase(BaseModel, BaseDatabase):
|
|
55
55
|
config: MysqlDatabaseConfig = Field(default_factory=MysqlDatabaseConfig)
|
|
56
56
|
|
|
57
|
-
_connection: pymysql.Connection = PrivateAttr(default=None)
|
|
58
|
-
|
|
59
57
|
def model_post_init(self, context: Any, /) -> None:
|
|
60
58
|
self._connection = pymysql.connect(
|
|
61
59
|
host=self.config.host,
|
|
@@ -65,6 +63,9 @@ class MysqlDatabase(BaseModel, BaseDatabase):
|
|
|
65
63
|
charset=self.config.charset,
|
|
66
64
|
cursorclass=pymysql.cursors.DictCursor,
|
|
67
65
|
)
|
|
66
|
+
self._connection.ping()
|
|
67
|
+
logger.info("Connected to MySQL successfully.")
|
|
68
|
+
|
|
68
69
|
self._type = "mysql"
|
|
69
70
|
|
|
70
71
|
def table_exists(self, table: str) -> bool:
|
|
@@ -83,7 +84,7 @@ class MysqlDatabase(BaseModel, BaseDatabase):
|
|
|
83
84
|
self._connection.commit()
|
|
84
85
|
|
|
85
86
|
@override
|
|
86
|
-
def query(self, sql: str, params=None, **kwargs) ->
|
|
87
|
+
def query(self, sql: str, params=None, **kwargs) -> tuple[dict[str, Any], ...]:
|
|
87
88
|
with self._connection.cursor() as cursor:
|
|
88
89
|
cursor.execute(sql, params)
|
|
89
90
|
return cursor.fetchall()
|
|
@@ -32,23 +32,29 @@ logger = get_logger(__name__)
|
|
|
32
32
|
|
|
33
33
|
class OpenSearchVectorDatabaseConfig(BaseModel):
|
|
34
34
|
host: str = Field(
|
|
35
|
-
|
|
35
|
+
default_factory=lambda: getenv("DATABASE_OPENSEARCH_HOST"),
|
|
36
36
|
description="OpenSearch host",
|
|
37
37
|
)
|
|
38
|
+
|
|
38
39
|
port: str | int = Field(
|
|
39
|
-
|
|
40
|
+
default_factory=lambda: getenv("DATABASE_OPENSEARCH_PORT"),
|
|
40
41
|
description="OpenSearch port",
|
|
41
42
|
)
|
|
43
|
+
|
|
42
44
|
username: Optional[str] = Field(
|
|
43
|
-
|
|
45
|
+
default_factory=lambda: getenv("DATABASE_OPENSEARCH_USERNAME"),
|
|
44
46
|
description="OpenSearch username",
|
|
45
47
|
)
|
|
48
|
+
|
|
46
49
|
password: Optional[str] = Field(
|
|
47
|
-
|
|
50
|
+
default_factory=lambda: getenv("DATABASE_OPENSEARCH_PASSWORD"),
|
|
48
51
|
description="OpenSearch password",
|
|
49
52
|
)
|
|
53
|
+
|
|
50
54
|
secure: bool = Field(default=True, description="Whether enable SSL")
|
|
55
|
+
|
|
51
56
|
verify_certs: bool = Field(default=False, description="Whether verify SSL certs")
|
|
57
|
+
|
|
52
58
|
auth_method: Literal["basic", "aws_managed_iam"] = Field(
|
|
53
59
|
default="basic", description="OpenSearch auth method"
|
|
54
60
|
)
|
|
@@ -231,15 +237,16 @@ class OpenSearchVectorDatabase(BaseModel, BaseDatabase):
|
|
|
231
237
|
for hit in response["hits"]["hits"]
|
|
232
238
|
]
|
|
233
239
|
|
|
234
|
-
def delete_by_query(self, collection_name: str, query: str):
|
|
240
|
+
def delete_by_query(self, collection_name: str, query: str) -> Any:
|
|
235
241
|
"""Delete docs by query in one index of OpenSearch"""
|
|
236
242
|
if not self.collection_exists(collection_name):
|
|
237
243
|
raise ValueError(f"Collection {collection_name} does not exist.")
|
|
238
244
|
|
|
239
|
-
|
|
245
|
+
query_payload = {"query": {"match": {"page_content": query}}}
|
|
240
246
|
response = self._opensearch_client.delete_by_query(
|
|
241
|
-
index=collection_name, body=
|
|
247
|
+
index=collection_name, body=query_payload
|
|
242
248
|
)
|
|
249
|
+
|
|
243
250
|
self._opensearch_client.indices.refresh(index=collection_name)
|
|
244
251
|
return response
|
|
245
252
|
|
|
@@ -16,7 +16,7 @@ import io
|
|
|
16
16
|
import json
|
|
17
17
|
import os
|
|
18
18
|
import uuid
|
|
19
|
-
from typing import Any, BinaryIO, Literal,
|
|
19
|
+
from typing import Any, BinaryIO, Literal, TextIO
|
|
20
20
|
|
|
21
21
|
import requests
|
|
22
22
|
import tos
|
|
@@ -44,42 +44,44 @@ doc_del_path = "/api/collection/drop"
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
class VolcengineTOSConfig(BaseModel):
|
|
47
|
-
endpoint:
|
|
48
|
-
|
|
47
|
+
endpoint: str = Field(
|
|
48
|
+
default_factory=lambda: getenv(
|
|
49
|
+
"DATABASE_TOS_ENDPOINT", "tos-cn-beijing.volces.com"
|
|
50
|
+
),
|
|
49
51
|
description="VikingDB TOS endpoint",
|
|
50
52
|
)
|
|
51
|
-
region:
|
|
52
|
-
|
|
53
|
+
region: str = Field(
|
|
54
|
+
default_factory=lambda: getenv("DATABASE_TOS_REGION", "cn-beijing"),
|
|
53
55
|
description="VikingDB TOS region",
|
|
54
56
|
)
|
|
55
|
-
bucket:
|
|
56
|
-
|
|
57
|
+
bucket: str = Field(
|
|
58
|
+
default_factory=lambda: getenv("DATABASE_TOS_BUCKET"),
|
|
57
59
|
description="VikingDB TOS bucket",
|
|
58
60
|
)
|
|
59
|
-
base_key:
|
|
61
|
+
base_key: str = Field(
|
|
60
62
|
default="veadk",
|
|
61
63
|
description="VikingDB TOS base key",
|
|
62
64
|
)
|
|
63
65
|
|
|
64
66
|
|
|
65
67
|
class VikingDatabaseConfig(BaseModel):
|
|
66
|
-
volcengine_ak:
|
|
67
|
-
|
|
68
|
+
volcengine_ak: str = Field(
|
|
69
|
+
default_factory=lambda: getenv("VOLCENGINE_ACCESS_KEY"),
|
|
68
70
|
description="VikingDB access key",
|
|
69
71
|
)
|
|
70
|
-
volcengine_sk:
|
|
71
|
-
|
|
72
|
+
volcengine_sk: str = Field(
|
|
73
|
+
default_factory=lambda: getenv("VOLCENGINE_SECRET_KEY"),
|
|
72
74
|
description="VikingDB secret key",
|
|
73
75
|
)
|
|
74
|
-
project:
|
|
75
|
-
|
|
76
|
+
project: str = Field(
|
|
77
|
+
default_factory=lambda: getenv("DATABASE_VIKING_PROJECT"),
|
|
76
78
|
description="VikingDB project name",
|
|
77
79
|
)
|
|
78
|
-
region:
|
|
79
|
-
|
|
80
|
+
region: str = Field(
|
|
81
|
+
default_factory=lambda: getenv("DATABASE_VIKING_REGION"),
|
|
80
82
|
description="VikingDB region",
|
|
81
83
|
)
|
|
82
|
-
tos:
|
|
84
|
+
tos: VolcengineTOSConfig = Field(
|
|
83
85
|
default_factory=VolcengineTOSConfig,
|
|
84
86
|
description="VikingDB TOS configuration",
|
|
85
87
|
)
|
|
@@ -136,13 +138,17 @@ class VikingDatabase(BaseModel, BaseDatabase):
|
|
|
136
138
|
file_ext = kwargs.get(
|
|
137
139
|
"file_ext", ".pdf"
|
|
138
140
|
) # when bytes data, file_ext is required
|
|
141
|
+
|
|
139
142
|
ak = self.config.volcengine_ak
|
|
140
143
|
sk = self.config.volcengine_sk
|
|
144
|
+
|
|
141
145
|
tos_bucket = self.config.tos.bucket
|
|
142
146
|
tos_endpoint = self.config.tos.endpoint
|
|
143
147
|
tos_region = self.config.tos.region
|
|
144
148
|
tos_key = self.config.tos.base_key
|
|
149
|
+
|
|
145
150
|
client = tos.TosClientV2(ak, sk, tos_endpoint, tos_region, max_connections=1024)
|
|
151
|
+
|
|
146
152
|
if isinstance(data, str) and os.path.isfile(data): # Process file path
|
|
147
153
|
file_ext = os.path.splitext(data)[1]
|
|
148
154
|
new_key = f"{tos_key}/{str(uuid.uuid4())}{file_ext}"
|
|
@@ -18,7 +18,7 @@ import string
|
|
|
18
18
|
import threading
|
|
19
19
|
import time
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from typing import Any
|
|
21
|
+
from typing import Any
|
|
22
22
|
|
|
23
23
|
from pydantic import BaseModel, Field
|
|
24
24
|
from volcengine.ApiInfo import ApiInfo
|
|
@@ -35,20 +35,20 @@ logger = get_logger(__name__)
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class VikingMemConfig(BaseModel):
|
|
38
|
-
volcengine_ak:
|
|
39
|
-
|
|
38
|
+
volcengine_ak: str = Field(
|
|
39
|
+
default_factory=lambda: getenv("VOLCENGINE_ACCESS_KEY"),
|
|
40
40
|
description="VikingDB access key",
|
|
41
41
|
)
|
|
42
|
-
volcengine_sk:
|
|
43
|
-
|
|
42
|
+
volcengine_sk: str = Field(
|
|
43
|
+
default_factory=lambda: getenv("VOLCENGINE_SECRET_KEY"),
|
|
44
44
|
description="VikingDB secret key",
|
|
45
45
|
)
|
|
46
|
-
project:
|
|
47
|
-
|
|
46
|
+
project: str = Field(
|
|
47
|
+
default_factory=lambda: getenv("DATABASE_VIKING_PROJECT"),
|
|
48
48
|
description="VikingDB project name",
|
|
49
49
|
)
|
|
50
|
-
region:
|
|
51
|
-
|
|
50
|
+
region: str = Field(
|
|
51
|
+
default_factory=lambda: getenv("DATABASE_VIKING_REGION"),
|
|
52
52
|
description="VikingDB region",
|
|
53
53
|
)
|
|
54
54
|
|
|
Binary file
|
|
@@ -19,6 +19,7 @@ from os import path
|
|
|
19
19
|
from typing import Any, Optional
|
|
20
20
|
|
|
21
21
|
from google.adk import Runner
|
|
22
|
+
from google.adk.agents.base_agent import BaseAgent
|
|
22
23
|
from google.adk.artifacts import BaseArtifactService, InMemoryArtifactService
|
|
23
24
|
from google.adk.evaluation.agent_evaluator import (
|
|
24
25
|
NUM_RUNS,
|
|
@@ -68,7 +69,7 @@ class VeEvaluationGenerator(EvaluationGenerator):
|
|
|
68
69
|
eval_set: EvalSet,
|
|
69
70
|
agent: Agent,
|
|
70
71
|
repeat_num: int = 3,
|
|
71
|
-
agent_name: str = None,
|
|
72
|
+
agent_name: str | None = None,
|
|
72
73
|
):
|
|
73
74
|
results = []
|
|
74
75
|
|
|
@@ -90,7 +91,7 @@ class VeEvaluationGenerator(EvaluationGenerator):
|
|
|
90
91
|
@staticmethod
|
|
91
92
|
async def _ve_generate_inferences_from_root_agent(
|
|
92
93
|
invocations: list[Invocation],
|
|
93
|
-
root_agent:
|
|
94
|
+
root_agent: BaseAgent,
|
|
94
95
|
reset_func: Any,
|
|
95
96
|
initial_session: Optional[SessionInput] = None,
|
|
96
97
|
session_id: Optional[str] = None,
|
|
@@ -117,21 +118,15 @@ class VeEvaluationGenerator(EvaluationGenerator):
|
|
|
117
118
|
if not artifact_service:
|
|
118
119
|
artifact_service = InMemoryArtifactService()
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
runner = Runner(
|
|
130
|
-
app_name=app_name,
|
|
131
|
-
agent=root_agent,
|
|
132
|
-
artifact_service=artifact_service,
|
|
133
|
-
session_service=session_service,
|
|
134
|
-
)
|
|
121
|
+
runner = Runner(
|
|
122
|
+
app_name=app_name,
|
|
123
|
+
agent=root_agent,
|
|
124
|
+
artifact_service=artifact_service,
|
|
125
|
+
session_service=session_service,
|
|
126
|
+
memory_service=root_agent.long_term_memory
|
|
127
|
+
if isinstance(root_agent, Agent)
|
|
128
|
+
else None,
|
|
129
|
+
)
|
|
135
130
|
|
|
136
131
|
# Reset agent state for each query
|
|
137
132
|
if callable(reset_func):
|