mirror of
https://github.com/getzep/graphiti.git
synced 2025-06-27 02:00:02 +00:00

* feat: configurable embedding model format * chore: Update comment * chore: Pass embedding model in search utils --------- Co-authored-by: paulpaliychuk <pavlo.paliychuk.ca@gmail.com>
27 lines
637 B
Python
27 lines
637 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
|
|
neo4j_user: str
|
|
neo4j_password: str
|
|
|
|
model_config = SettingsConfigDict(env_file='.env', extra='ignore')
|
|
|
|
|
|
@lru_cache
|
|
def get_settings():
|
|
return Settings()
|
|
|
|
|
|
ZepEnvDep = Annotated[Settings, Depends(get_settings)]
|