12 lines
328 B
Python
12 lines
328 B
Python
from pydantic import BaseSettings
|
|
import os
|
|
|
|
class Settings(BaseSettings):
|
|
INDEX_FILE: str = os.getenv("INDEX_FILE", "index_data/index.faiss")
|
|
EMBEDDING_DIM: int = 768
|
|
TOP_K: int = 5
|
|
DOC_PATH: str = "docs/"
|
|
DEVICE: str = "cpu" # 可设置为 cuda:0
|
|
MODEL_NAME: str = "BAAI/bge-m3"
|
|
|
|
settings = Settings() |