Spaces:
Sleeping
Sleeping
Download src/techdocs_graphrag/config.py from nvikou/techdocs-graphrag: direct link, hf CLI and curl.
- Browser
- Download file 994 Bytes
-
https://huggingface.co/spaces/nvikou/techdocs-graphrag/resolve/main/src/techdocs_graphrag/config.py
- Command line
-
hf download hf://spaces/nvikou/techdocs-graphrag/src/techdocs_graphrag/config.py
-
curl -L -o config.py https://huggingface.co/spaces/nvikou/techdocs-graphrag/resolve/main/src/techdocs_graphrag/config.py
994 Bytes
| from functools import lru_cache | |
| from pydantic import Field, SecretStr | |
| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| class Settings(BaseSettings): | |
| model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore") | |
| openai_api_key: SecretStr | |
| chat_model: str = "gpt-4o-mini" | |
| chat_temperature: float | None = 0.0 | |
| embedding_model: str = "text-embedding-3-small" | |
| embedding_dimensions: int = Field(default=1536, gt=0) | |
| neo4j_uri: str | |
| neo4j_username: str = "neo4j" | |
| neo4j_password: SecretStr | |
| neo4j_database: str = "neo4j" | |
| chunk_size: int = Field(default=900, gt=0) | |
| chunk_overlap: int = Field(default=150, ge=0) | |
| extraction_workers: int = Field(default=4, ge=1, le=16) | |
| vector_top_k: int = Field(default=5, ge=1, le=50) | |
| graph_max_hops: int = Field(default=2, ge=1, le=4) | |
| graph_max_facts: int = Field(default=40, ge=1, le=200) | |
| def get_settings() -> Settings: | |
| return Settings() | |