Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused settings #70

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 1 addition & 44 deletions llm-service/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,56 +46,13 @@

import logging
import os.path
from typing import Optional

from pydantic_settings import BaseSettings, SettingsConfigDict


class OTelSettings(BaseSettings, str_strip_whitespace=True):
"""
OpenTelemetry configuration.

Environment variable names are taken from the OTel spec. This exists to enforce
values we require and set our own defaults; otherwise OTel will use its defaults
which could error at runtime.

"""

model_config = SettingsConfigDict(env_prefix="otel_")

service_name: str = "llm-service"
exporter_otlp_endpoint: Optional[str] = None


class PGVectorStoreSettings(BaseSettings, str_strip_whitespace=True):
"""Postgres vector store configuration."""

db_url: str = "postgresql://postgres:password@localhost:5432"
db_name: str = "vector_db"


class PrometheusSettings(BaseSettings, str_strip_whitespace=True):
"""Prometheus client configuration."""

model_config = SettingsConfigDict(env_prefix="prometheus_")

port: int = 9464


class S3Settings(BaseSettings, str_strip_whitespace=True):
"""S3 configuration."""

endpoint_url: str = "http://s3:9090"
from pydantic_settings import BaseSettings


class Settings(BaseSettings):
"""RAG configuration."""

otel: OTelSettings = OTelSettings()
pgvector: PGVectorStoreSettings = PGVectorStoreSettings()
prometheus: PrometheusSettings = PrometheusSettings()
s3: S3Settings = S3Settings()

rag_log_level: int = logging.INFO
rag_databases_dir: str = os.path.join("..", "databases")

Expand Down
Loading