diff --git a/deployment/kustomizations/base/cm.yaml b/deployment/kustomizations/base/cm.yaml index 654d43c96..6f38b3df1 100644 --- a/deployment/kustomizations/base/cm.yaml +++ b/deployment/kustomizations/base/cm.yaml @@ -182,3 +182,7 @@ data: langfuse_enable: true logging_level: DEBUG development: false + pairs.json: | + { + "sample": [] + } diff --git a/deployment/kustomizations/base/deploy-wren-ai-service.yaml b/deployment/kustomizations/base/deploy-wren-ai-service.yaml index 928bac05b..6664e98ef 100644 --- a/deployment/kustomizations/base/deploy-wren-ai-service.yaml +++ b/deployment/kustomizations/base/deploy-wren-ai-service.yaml @@ -63,6 +63,8 @@ spec: key: LANGFUSE_SECRET_KEY - name: CONFIG_PATH value: /app/data/config.yaml + - name: SQL_PAIRS_PATH + value: /app/data/pairs.json ports: - containerPort: 5555 volumes: @@ -72,3 +74,5 @@ spec: items: - key: config.yaml path: config.yaml + - key: pairs.json + path: pairs.json diff --git a/docker/docker-compose-dev.yaml b/docker/docker-compose-dev.yaml index 2faaf633e..e28bd005c 100644 --- a/docker/docker-compose-dev.yaml +++ b/docker/docker-compose-dev.yaml @@ -45,10 +45,12 @@ services: # using PYTHONUNBUFFERED: 1 can fix this PYTHONUNBUFFERED: 1 CONFIG_PATH: /app/data/config.yaml + SQL_PAIRS_PATH: /app/data/pairs.json env_file: - ${PROJECT_DIR}/.env volumes: - ${PROJECT_DIR}/config.yaml:/app/data/config.yaml + - ${PROJECT_DIR}/pairs.json:/app/data/pairs.json networks: - wren depends_on: diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 01a354f7d..d4e9b48f8 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -56,10 +56,12 @@ services: # using PYTHONUNBUFFERED: 1 can fix this PYTHONUNBUFFERED: 1 CONFIG_PATH: /app/data/config.yaml + SQL_PAIRS_PATH: /app/data/pairs.json env_file: - ${PROJECT_DIR}/.env volumes: - ${PROJECT_DIR}/config.yaml:/app/data/config.yaml + - ${PROJECT_DIR}/pairs.json:/app/data/pairs.json networks: - wren depends_on: diff --git a/wren-ai-service/src/config.py b/wren-ai-service/src/config.py index a41dcfc7e..991a29010 100644 --- a/wren-ai-service/src/config.py +++ b/wren-ai-service/src/config.py @@ -54,7 +54,7 @@ class Settings(BaseSettings): config_path: str = Field(default="config.yaml") _components: list[dict] - sql_pairs_path: str = Field(default="sql_pairs.json") + sql_pairs_path: str = Field(default="pairs.json") def __init__(self): load_dotenv(".env.dev", override=True)