c889a57b6b
Test Suites / Build CI Environment (push) Has been cancelled
Test Suites / Basic Tests (push) Has been cancelled
Test Suites / End-to-End Tests (push) Has been cancelled
Test Suites / CLI Tests (push) Has been cancelled
Test Suites / Slow End-to-End Tests (push) Has been cancelled
Test Suites / Graph Database Tests (push) Has been cancelled
Test Suites / Vector DB Tests (push) Has been cancelled
Test Suites / Temporal Graph Test (push) Has been cancelled
Test Suites / Search Test on Different DBs (push) Has been cancelled
Test Suites / Example Tests (push) Has been cancelled
Test Suites / Notebook Tests (push) Has been cancelled
Test Suites / OS and Python Tests Ubuntu (push) Has been cancelled
Test Suites / OS and Python Tests Extended (push) Has been cancelled
Test Suites / LLM Test Suite (push) Has been cancelled
Test Suites / S3 File Storage Test (push) Has been cancelled
Test Suites / Run Integration Tests (push) Has been cancelled
Test Suites / MCP Tests (push) Has been cancelled
Test Suites / Docker Compose Test (push) Has been cancelled
Test Suites / Docker CI test (push) Has been cancelled
Test Suites / Relational DB Migration Tests (push) Has been cancelled
Test Suites / Distributed Cognee Test (push) Has been cancelled
Test Suites / DB Examples Tests (push) Has been cancelled
Test Suites / Test Completion Status (push) Has been cancelled
Test Suites / Claude Code Review (push) Has been cancelled
Test Suites / basic checks (push) Has been cancelled
build | Build and Push Cognee MCP Docker Image to dockerhub / docker-build-and-push (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
build | Build and Push Docker Image to dockerhub / docker-build-and-push (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges Core Functionality (3.11) (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges Core Functionality (3.12) (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges with Different Graph Databases (kuzu, kuzu) (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges with Different Graph Databases (neo4j, neo4j) (push) Has been cancelled
Weighted Edges Tests / Test Weighted Edges Examples (push) Has been cancelled
Weighted Edges Tests / Code Quality for Weighted Edges (push) Has been cancelled
61 lines
1.6 KiB
Python
61 lines
1.6 KiB
Python
from typing import TypedDict
|
|
from cognee.infrastructure.llm import get_llm_config
|
|
from cognee.infrastructure.databases.graph import get_graph_config
|
|
from cognee.infrastructure.databases.vector import get_vectordb_config
|
|
from cognee.infrastructure.databases.relational.config import get_relational_config
|
|
|
|
|
|
class LLMConfig(TypedDict):
|
|
model: str
|
|
provider: str
|
|
|
|
|
|
class VectorDBConfig(TypedDict):
|
|
url: str
|
|
provider: str
|
|
|
|
|
|
class GraphDBConfig(TypedDict):
|
|
url: str
|
|
provider: str
|
|
|
|
|
|
class RelationalConfig(TypedDict):
|
|
url: str
|
|
provider: str
|
|
|
|
|
|
class SettingsDict(TypedDict):
|
|
llm: LLMConfig
|
|
graph: GraphDBConfig
|
|
vector: VectorDBConfig
|
|
relational: RelationalConfig
|
|
|
|
|
|
def get_current_settings() -> SettingsDict:
|
|
llm_config = get_llm_config()
|
|
graph_config = get_graph_config()
|
|
vector_config = get_vectordb_config()
|
|
relational_config = get_relational_config()
|
|
|
|
return dict(
|
|
llm={
|
|
"provider": llm_config.llm_provider,
|
|
"model": llm_config.llm_model,
|
|
},
|
|
graph={
|
|
"provider": graph_config.graph_database_provider,
|
|
"url": graph_config.graph_database_url or graph_config.graph_file_path,
|
|
},
|
|
vector={
|
|
"provider": vector_config.vector_db_provider,
|
|
"url": vector_config.vector_db_url,
|
|
},
|
|
relational={
|
|
"provider": relational_config.db_provider,
|
|
"url": f"{relational_config.db_host}:{relational_config.db_port}"
|
|
if relational_config.db_host
|
|
else f"{relational_config.db_path}/{relational_config.db_name}",
|
|
},
|
|
)
|