import os class ServiceConfig: def __init__(self): self.HF_TOKEN = os.getenv("HF_TOKEN") self.MODEL_BASE = "TURKCELL/Turkcell-LLM-7b-v1" self.USE_FINE_TUNE = False self.FINE_TUNE_REPO = "UcsTurkey/trained-zips" self.FINE_TUNE_ZIP = "trained_model_000_009.zip" self.USE_SAMPLING = False self.INTENT_CONFIDENCE_THRESHOLD = 0.5 self.LLM_CONFIDENCE_THRESHOLD = 0.2 self.TRAIN_CONFIDENCE_THRESHOLD = 0.7 self.FALLBACK_ANSWERS = [ "Bu konuda maalesef bilgim yok.", "Ne demek istediğinizi tam anlayamadım.", "Bu soruya şu an yanıt veremiyorum." ] self.INTENT_MODEL_PATH = "intent_model" self.INTENT_MODEL_ID = "dbmdz/bert-base-turkish-cased" self.INTENT_MODEL = None self.INTENT_TOKENIZER = None self.LABEL2ID = {} self.INTENT_DEFINITIONS = {} def setup_environment(): os.environ["TRANSFORMERS_NO_ADVISORY_WARNINGS"] = "true" os.environ["TORCH_HOME"] = "/app/.torch_cache" os.makedirs("/app/.torch_cache", exist_ok=True)