Files
wehub-resource-sync 4a19d70af1
Lint with Ruff / ruff (push) Has been cancelled
MCP Server Tests / live-mcp-tests (push) Has been cancelled
Tests / unit-tests (push) Has been cancelled
Tests / database-integration-tests (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Server Tests / live-server-tests (push) Has been cancelled
Pyright Type Check / pyright (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:54 +08:00

31 lines
899 B
Python

from functools import lru_cache
from typing import Annotated
from fastapi import Depends
from pydantic import Field
from pydantic_settings import BaseSettings, SettingsConfigDict # type: ignore
class Settings(BaseSettings):
openai_api_key: str
openai_base_url: str | None = Field(None)
model_name: str | None = Field(None)
embedding_model_name: str | None = Field(None)
neo4j_uri: str | None = Field(None)
neo4j_user: str | None = Field(None)
neo4j_password: str | None = Field(None)
falkordb_host: str | None = Field(None)
falkordb_port: int | None = Field(None)
falkordb_database: str | None = Field(None)
db_backend: str = Field('neo4j')
model_config = SettingsConfigDict(env_file='.env', extra='ignore')
@lru_cache
def get_settings():
return Settings() # type: ignore[call-arg]
ZepEnvDep = Annotated[Settings, Depends(get_settings)]