ruff format
This commit is contained in:
parent
e12e516f64
commit
96f2a2f22b
3 changed files with 2 additions and 2 deletions
|
|
@ -150,7 +150,7 @@ class GraphCompletionCotRetriever(GraphCompletionRetriever):
|
||||||
cache_config = CacheConfig()
|
cache_config = CacheConfig()
|
||||||
user = session_user.get()
|
user = session_user.get()
|
||||||
user_id = getattr(user, "id", None)
|
user_id = getattr(user, "id", None)
|
||||||
|
|
||||||
if user_id and cache_config.caching:
|
if user_id and cache_config.caching:
|
||||||
context_summary = await summarize_text(context_text)
|
context_summary = await summarize_text(context_text)
|
||||||
await save_to_session_cache(
|
await save_to_session_cache(
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ from cognee.modules.engine.models.node_set import NodeSet
|
||||||
from cognee.infrastructure.databases.graph import get_graph_engine
|
from cognee.infrastructure.databases.graph import get_graph_engine
|
||||||
from cognee.context_global_variables import session_user
|
from cognee.context_global_variables import session_user
|
||||||
from cognee.infrastructure.databases.cache.config import CacheConfig
|
from cognee.infrastructure.databases.cache.config import CacheConfig
|
||||||
|
|
||||||
logger = get_logger("GraphCompletionRetriever")
|
logger = get_logger("GraphCompletionRetriever")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,4 +45,3 @@ async def save_to_session_cache(
|
||||||
context=context_summary,
|
context=context_summary,
|
||||||
answer=answer,
|
answer=answer,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue