Skip to content

Commit 1442cb5

Browse files
authored
fix: rename studio app (#28)
* fix: studio app * fix: studio web and pyproject
1 parent 3f32ec2 commit 1442cb5

File tree

6 files changed

+42
-2
lines changed

6 files changed

+42
-2
lines changed

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,10 @@ dev = [
6464

6565
[tool.setuptools.packages.find]
6666
include = ["veadk*"]
67-
exclude = ["app*", "assets*", "examples*", "ide*", "tests*",]
67+
exclude = ["assets*", "ide*", "tests*"]
68+
69+
[tool.setuptools]
70+
include-package-data = true
71+
72+
[tool.setuptools.package-data]
73+
"veadk.cli.studio.web" = ["_next/**/*"]
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
git+https://github.com/volcengine/veadk-python.git
1+
veadk-python[eval] @ git+https://github.com/volcengine/veadk-python.git # extra eval for prompt optimization in veadk studio
2+
agent-pilot-sdk>=0.0.9 # extra dep for prompt optimization in veadk studio
23
uvicorn[standard]
34
fastapi
File renamed without changes.

veadk/cli/studio/web/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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.

veadk/cloud/cloud_agent_engine.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,21 @@ def _prepare(self, path: str, name: str):
7171

7272
shutil.copy(template_app_py, os.path.join(path, "app.py"))
7373

74+
if os.path.exists(os.path.join(path, "studio_app.py")):
75+
logger.warning(
76+
f"Local agent project path `{path}` contains an `studio_app.py` file. Use your own `studio_app.py` file may cause unexpected behavior."
77+
)
78+
else:
79+
logger.info(
80+
f"No `studio_app.py` detected in local agent project path `{path}`. Prepare it."
81+
)
82+
template_studio_app_py = (
83+
f"{Path(__file__).resolve().parent.resolve()}/template/studio_app.py"
84+
)
85+
import shutil
86+
87+
shutil.copy(template_studio_app_py, os.path.join(path, "studio_app.py"))
88+
7489
if os.path.exists(os.path.join(path, "run.sh")):
7590
logger.warning(
7691
f"Local agent project path `{path}` contains a `run.sh` file. Use your own `run.sh` file may cause unexpected behavior."
@@ -104,6 +119,11 @@ def deploy(
104119
Returns:
105120
str: Volcengine FaaS function endpoint.
106121
"""
122+
# prevent deepeval writing operations
123+
import veadk.config
124+
125+
veadk.config.veadk_environments["DEEPEVAL_TELEMETRY_OPT_OUT"] = "YES"
126+
107127
if use_studio:
108128
import veadk.config
109129

0 commit comments

Comments
 (0)