feat: LLM 모델명 외부 설정 + 포인트 추가 기능

- mcp-server: 하드코딩된 모델명을 llm-model.json 기반 config.py로 외부화
- C#: AppendPointsAsync로 기존 데이터 유지하면서 포인트 추가
- C#: LlmConfigController로 LLM 모델명 조회/저장 API
- Frontend: LLM 설정 UI 카드 + 포인트 빌더에서 추가하기 버튼
This commit is contained in:
windpacer
2026-05-11 17:55:18 +09:00
parent de728f013a
commit 5cacc5dbb5
15 changed files with 544 additions and 35 deletions

View File

@@ -31,7 +31,8 @@ import uvicorn
# ── 설정 ─────────────────────────────────────────────────────────────────────
VLLM_BASE_URL = os.environ.get("VLLM_BASE_URL", "http://localhost:8000/v1")
VLLM_MODEL = os.environ.get("VLLM_MODEL", "Qwen3.6-27B-FP8")
from config import get_vllm_model
VLLM_MODEL = get_vllm_model()
DB_CONNECTION_STRING = os.environ.get("DB_CONNECTION_STRING", "postgresql://postgres:postgres@localhost:5432/iiot_platform")
DB_TIMEOUT = int(os.environ.get("DB_TIMEOUT", "10"))
@@ -174,7 +175,7 @@ def _extract_pid_tags(text: str, source_type: str) -> str:
)
truncated = text[:100000]
resp = _llm().chat.completions.create(
model="Qwen3.6-27B-FP8",
model=VLLM_MODEL,
messages=[
{"role": "system", "content": system},
{"role": "user", "content": f"Source: {source_type}\n\nText:\n{truncated}"},
@@ -203,7 +204,7 @@ def _match_pid_tags(pid_tags: list, experion_tags: list) -> str:
"- Output ONLY the JSON array.\n"
)
resp = _llm().chat.completions.create(
model="Qwen3.6-27B-FP8",
model=VLLM_MODEL,
messages=[
{"role": "system", "content": system},
{"role": "user", "content": (
@@ -248,7 +249,7 @@ def _parse_pid_dxf(filepath: str) -> str:
ensure_ascii=False, indent=2)
resp = _llm().chat.completions.create(
model="Qwen3.6-27B-FP8",
model=VLLM_MODEL,
messages=[
{"role": "system", "content": _TAG_EXTRACT_SYSTEM},
{"role": "user", "content": f"Source: dxf\n\nText:\n{text[:8000]}"},
@@ -274,7 +275,7 @@ def _parse_pid_pdf(filepath: str, use_ocr: bool = True) -> str:
ensure_ascii=False, indent=2)
resp = _llm().chat.completions.create(
model="Qwen3.6-27B-FP8",
model=VLLM_MODEL,
messages=[
{"role": "system", "content": _TAG_EXTRACT_SYSTEM},
{"role": "user", "content": f"Source: pdf\n\nText:\n{text[:12000]}"},