Skip to content

Commit af2d7b6

Browse files
committed
VectorDB 설정을 CLI에서 제거하고 UI에서 관리하도록 변경. 관련된 옵션 및 초기화 함수 수정.
1 parent dd24db6 commit af2d7b6

File tree

2 files changed

+17
-23
lines changed

2 files changed

+17
-23
lines changed

cli/__init__.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,13 @@
5757
)
5858
@click.option(
5959
"--vectordb-type",
60-
type=click.Choice(["faiss", "pgvector"]),
61-
default="faiss",
62-
help="사용할 벡터 데이터베이스 타입 (기본값: faiss)",
60+
default=None,
61+
help="[Deprecated] VectorDB 타입. 이제는 UI 설정 > 데이터 소스에서 관리하세요.",
6362
)
6463
@click.option(
6564
"--vectordb-location",
66-
help=(
67-
"VectorDB 위치 설정\n"
68-
"- FAISS: 디렉토리 경로 (예: ./my_vectordb)\n"
69-
"- pgvector: 연결 문자열 (예: postgresql://user:pass@host:port/db)\n"
70-
"기본값: FAISS는 './dev/table_info_db', pgvector는 환경변수 사용"
71-
),
65+
default=None,
66+
help="[Deprecated] VectorDB 위치. 이제는 UI 설정 > 데이터 소스에서 관리하세요.",
7267
)
7368
def cli(
7469
ctx: click.Context,
@@ -77,8 +72,8 @@ def cli(
7772
port: int,
7873
env_file_path: str | None = None,
7974
prompt_dir_path: str | None = None,
80-
vectordb_type: str = "faiss",
81-
vectordb_location: str = None,
75+
vectordb_type: str | None = None,
76+
vectordb_location: str | None = None,
8277
) -> None:
8378
"""Lang2SQL CLI 엔트리포인트.
8479
@@ -88,10 +83,7 @@ def cli(
8883

8984
try:
9085
initialize_environment(
91-
env_file_path=env_file_path,
92-
prompt_dir_path=prompt_dir_path,
93-
vectordb_type=vectordb_type,
94-
vectordb_location=vectordb_location,
86+
env_file_path=env_file_path, prompt_dir_path=prompt_dir_path
9587
)
9688
except Exception:
9789
logger.error("Initialization failed.", exc_info=True)
@@ -110,6 +102,13 @@ def cli(
110102
fg="yellow",
111103
)
112104

105+
# Deprecated 안내: CLI에서 VectorDB 설정은 더 이상 처리하지 않습니다
106+
if vectordb_type or vectordb_location:
107+
click.secho(
108+
"[Deprecated] --vectordb-type/--vectordb-location 옵션은 더 이상 사용되지 않습니다. 설정 > 데이터 소스 탭에서 설정하세요.",
109+
fg="yellow",
110+
)
111+
113112
if run_streamlit:
114113
run_streamlit_command(port)
115114

cli/core/environment.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
1-
"""환경 변수 VectorDB 초기화 모듈."""
1+
"""환경 변수 초기화 모듈 (VectorDB 설정은 UI에서 관리)."""
22

33
from typing import Optional
44

5-
from cli.utils.env_loader import load_env, set_prompt_dir, set_vectordb
5+
from cli.utils.env_loader import load_env, set_prompt_dir
66

77

88
def initialize_environment(
99
*,
1010
env_file_path: Optional[str],
1111
prompt_dir_path: Optional[str],
12-
vectordb_type: str,
13-
vectordb_location: Optional[str],
1412
) -> None:
15-
"""환경 변수와 VectorDB 설정을 초기화합니다.
13+
"""환경 변수를 초기화합니다. VectorDB 설정은 UI에서 관리합니다.
1614
1715
Args:
1816
env_file_path (Optional[str]): 로드할 .env 파일 경로. None이면 기본값 사용.
1917
prompt_dir_path (Optional[str]): 프롬프트 템플릿 디렉토리 경로. None이면 설정하지 않음.
20-
vectordb_type (str): VectorDB 타입 ("faiss" 또는 "pgvector").
21-
vectordb_location (Optional[str]): VectorDB 위치. None이면 기본값 사용.
2218
2319
Raises:
2420
Exception: 초기화 과정에서 오류가 발생한 경우.
2521
"""
2622
load_env(env_file_path=env_file_path)
2723
set_prompt_dir(prompt_dir_path=prompt_dir_path)
28-
set_vectordb(vectordb_type=vectordb_type, vectordb_location=vectordb_location)

0 commit comments

Comments
 (0)