mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Merge branch 'master' of github.com:khoj-ai/khoj into features/include-full-file-in-convo-with-filter
This commit is contained in:
commit
7543360210
1 changed files with 4 additions and 0 deletions
|
@ -1481,6 +1481,8 @@ class EntryAdapters:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
async def aagent_has_entries(agent: Agent):
|
async def aagent_has_entries(agent: Agent):
|
||||||
|
if agent is None:
|
||||||
|
return False
|
||||||
return await Entry.objects.filter(agent=agent).aexists()
|
return await Entry.objects.filter(agent=agent).aexists()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -1499,6 +1501,8 @@ class EntryAdapters:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
async def aget_agent_entry_filepaths(agent: Agent):
|
async def aget_agent_entry_filepaths(agent: Agent):
|
||||||
|
if agent is None:
|
||||||
|
return []
|
||||||
return await sync_to_async(set)(
|
return await sync_to_async(set)(
|
||||||
Entry.objects.filter(agent=agent).distinct("file_path").values_list("file_path", flat=True)
|
Entry.objects.filter(agent=agent).distinct("file_path").values_list("file_path", flat=True)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue