mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-09 19:10:53 +00:00
962becb9a5
* validate python formatting on every build with Ruff * fix lint warnings
21 lines
698 B
Python
21 lines
698 B
Python
from pathlib import Path
|
|
|
|
from pydantic import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
LLM_NAME: str = "openai_chat"
|
|
EMBEDDINGS_NAME: str = "openai_text-embedding-ada-002"
|
|
CELERY_BROKER_URL: str = "redis://localhost:6379/0"
|
|
CELERY_RESULT_BACKEND: str = "redis://localhost:6379/1"
|
|
MONGO_URI: str = "mongodb://localhost:27017/docsgpt"
|
|
|
|
API_URL: str = "http://localhost:5001" # backend url for celery worker
|
|
|
|
API_KEY: str = None # LLM api key
|
|
EMBEDDINGS_KEY: str = None # api key for embeddings (if using openai, just copy API_KEY
|
|
|
|
|
|
path = Path(__file__).parent.parent.absolute()
|
|
settings = Settings(_env_file=path.joinpath(".env"), _env_file_encoding="utf-8")
|