File tree Expand file tree Collapse file tree 6 files changed +18
-13
lines changed
Expand file tree Collapse file tree 6 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 11# app/core/neo4j.py
22import os
3+
34from app .repositories .graph_repository import GraphRepository
45
5- _graph_repo : GraphRepository
6+ _graph_repo : GraphRepository
67
78
89def get_graph_repo () -> GraphRepository | None :
@@ -27,4 +28,4 @@ def get_graph_repo() -> GraphRepository | None:
2728 return _graph_repo
2829 except Exception as e :
2930 print (f"Neo4j not available: { e } " , flush = True )
30- return None
31+ return None
Original file line number Diff line number Diff line change 1- from fastapi import APIRouter , Depends
2- from supabase ._async .client import AsyncClient
3-
41from app .core .supabase import get_async_supabase
52from app .routes .classification_routes import router as classification_router
63from app .routes .migration_routes import router as migration_router
74from app .routes .pattern_recognition_routes import router as pattern_recognition_router
85from app .routes .preprocess_routes import router as preprocess_router
96from app .routes .search_routes import router as search_router
7+ from fastapi import APIRouter , Depends
8+ from supabase ._async .client import AsyncClient
9+
1010from app .routes .documents import router as documents_router
1111
1212api_router = APIRouter (prefix = "/api" )
Original file line number Diff line number Diff line change 11import os
2+
23from cognee import configure
34
45_cognee_initialized : bool = False
@@ -14,7 +15,7 @@ async def setup_cognee() -> None:
1415 llm_model = os .getenv ("LLM_MODEL" )
1516 llm_api_key = os .getenv ("LLM_API_KEY" )
1617
17- # Embeddings
18+ # Embeddings
1819 embedding_provider = os .getenv ("EMBEDDING_PROVIDER" )
1920 embedding_model = os .getenv ("EMBEDDING_MODEL" )
2021 embedding_api_key = os .getenv ("EMBEDDING_API_KEY" )
Original file line number Diff line number Diff line change 2121 )
2222
2323
24- from app .api import api_router # noqa: E402
2524from app .core .supabase import get_async_supabase # noqa: E402
2625from app .core .webhooks import configure_webhooks # noqa: E402
2726from app .services .extraction .preprocessing_queue import init_queue # noqa: E402
2827from app .services .supabase_check import wait_for_supabase # noqa: E402
29- from app .cognee_config import setup_cognee
28+
29+ from app .api import api_router # noqa: E402
30+ from app .cognee_config import setup_cognee
3031
3132
3233@asynccontextmanager
Original file line number Diff line number Diff line change 11from dotenv import load_dotenv
2+
23load_dotenv (override = True )
34
4- import cognee
55import asyncio
6+
7+ import cognee
68from cognee .api .v1 .search import SearchType
79
10+
811async def setup_cognee ():
912 """Initialize cognee environment."""
1013 pass
11-
14+
1215async def ingest_document (files ):
1316 """Ingest documents"""
1417 for file in files :
@@ -41,7 +44,7 @@ async def search_knowledge_graph():
4144
4245async def main ():
4346 files = ["mock_data/DeepFryer-1.pdf" , "mock_data/DeepFryer-2.pdf" ]
44-
47+
4548 await setup_cognee ()
4649 await ingest_document (files )
4750
@@ -68,4 +71,4 @@ async def main():
6871 await cognee .prune .prune_system (graph = True , vector = True , metadata = False )
6972
7073if __name__ == '__main__' :
71- asyncio .run (main ())
74+ asyncio .run (main ())
Original file line number Diff line number Diff line change 11
22import asyncio
3- import os
43from supabase ._async .client import create_client
54
65# Local Supabase credentials inside Docker or accessible from within
You can’t perform that action at this time.
0 commit comments