File size: 762 Bytes
c24fab8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43478d2
 
c24fab8
 
 
 
 
 
 
 
 
 
 
43478d2
c24fab8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from os import getenv
from dotenv import load_dotenv

from pydantic import BaseSettings


class Config(BaseSettings):
    """Configuration for the application."""
    # Pinecone
    pinecone_api_key: str
    pinecone_env: str
    pinecone_index: str
    # LLM
    embedding_dim: int
    embedding_version: str
    embedding_dir: str
    model_name: str
    # HF
    password: str


load_dotenv()
config = Config(
    pinecone_api_key=getenv("PINECONE_API_KEY"),
    pinecone_env=getenv("PINECONE_ENV"),
    pinecone_index=getenv("PINECONE_INDEX"),
    embedding_dim=int(getenv("EMBEDDING_DIM")),
    embedding_version=getenv("EMBEDDING_VERSION"),
    embedding_dir=getenv("EMBEDDING_DIR"),
    model_name=getenv("MODEL_NAME"),
    password=getenv("PASSWORD"),
)