Claude 리뷰 기반 운영 안정성 보강
This commit is contained in:
1 parent
8b0a7e45ac
commit
725e44e999
15 files changed
+1427
-67
No files matched your search
+14
-1
@@ -13,7 +13,15 @@ class Settings(BaseSettings):
|
||||
log_level: str = "info" # debug / info / warning / error
|
||||
reload: bool = False # 개발용 자동 재시작
|
||||
root_path: str = "" # 리버스 프록시 sub-path (예: /plagiarism)
|
||||
api_key: str = "" # 설정 시 /v1/health 외 X-API-Key 필수
|
||||
|
||||
# --- 인증 (#1) ---
|
||||
# api_key 만으로는 "빈 값 = 무인증"이 조용히 성립한다. 운영에서는
|
||||
# require_api_key=true 로 명시적 fail-closed 를 걸어, 키가 없으면 앱이
|
||||
# 아예 뜨지 않게 한다.
|
||||
api_key: str = "" # 설정 시 X-API-Key 필수
|
||||
require_api_key: bool = False # true 인데 api_key 가 비면 기동 실패
|
||||
public_health: bool = True # /v1/health 를 인증 없이 공개할지
|
||||
public_docs: bool = True # /docs, /openapi.json, /redoc 공개 여부
|
||||
|
||||
engine_version: str = "o2o-plagiarism-2.0.0-pdf-v1.2"
|
||||
reference_corpus_dir: str = "./data/reference"
|
||||
@@ -25,6 +33,8 @@ class Settings(BaseSettings):
|
||||
persistent_similarity_threshold: float = 0.65
|
||||
persistent_min_exact_span: int = 80
|
||||
persistent_min_coverage: float = 0.30
|
||||
# 상위 N개 후보만 SequenceMatcher 정밀 비교 + union coverage 에 참여시킨다.
|
||||
# 이 값이 곧 요청당 O(질의길이 × 세그먼트길이) 연산의 상한이다 (#3/#5).
|
||||
persistent_rerank_top_k: int = 20
|
||||
precedents_path: str = "./data/precedents/precedents.jsonl"
|
||||
ai_detector_model_path: str = "./data/models/ai_detector.joblib"
|
||||
@@ -33,6 +43,9 @@ class Settings(BaseSettings):
|
||||
|
||||
# PDF VII-4 권장: 정밀도 우선 보수적 임계값
|
||||
similarity_threshold: float = 0.85
|
||||
# 임계값이 실데이터로 캘리브레이션되었는지. false 면 API 응답에
|
||||
# provisional=true 로 노출된다 (#9). 79권 FP 분포 측정 후 true 로 전환.
|
||||
similarity_threshold_calibrated: bool = False
|
||||
|
||||
# KoSimCSE / KoSBERT (PDF VII-3 권장) - 한국어 오픈소스 임베딩
|
||||
use_kosimcse: bool = False
|
||||
|
||||
Reference in new issue
Block a user