utkarsh134's picture
Upload 15 files
f245c77 verified
Raw History Blame Contribute Delete
860 Bytes
import os
from dotenv import load_dotenv
DEFAULT_CHUNK_SIZE = 1000
DEFAULT_CHUNK_OVERLAP = 200
DEFAULT_LLM_MODEL = "gemini-2.0-flash"
DEFAULT_EMBEDDING_MODEL = "models/embedding-001"
DEFAULT_TEMPERATURE = 0
def init_settings():
load_dotenv()
if not os.getenv("GOOGLE_API_KEY"):
raise ValueError("GOOGLE_API_KEY environment variable is not set")
def get_settings():
return {
"chunk_size": int(os.getenv("CHUNK_SIZE", DEFAULT_CHUNK_SIZE)),
"chunk_overlap": int(os.getenv("CHUNK_OVERLAP", DEFAULT_CHUNK_OVERLAP)),
"llm_model": os.getenv("LLM_MODEL", DEFAULT_LLM_MODEL),
"embedding_model": os.getenv("EMBEDDING_MODEL", DEFAULT_EMBEDDING_MODEL),
"temperature": float(os.getenv("TEMPERATURE", DEFAULT_TEMPERATURE)),
"google_api_key": os.getenv("GOOGLE_API_KEY")
}