This commit is contained in:
Timothy J. Baek 2024-10-04 19:32:33 -07:00
parent c400f40663
commit 493745a70b
2 changed files with 3 additions and 2 deletions

View File

@ -347,7 +347,7 @@ def get_rag_context(
try:
context = None
if file["type"] == "text":
if file.get("type") == "text":
context = file["content"]
else:
if hybrid_search:

View File

@ -61,7 +61,8 @@
items = [...$knowledge, ...legacy_collections].map((item) => {
return {
...item,
...(item?.legacy || item?.meta?.legacy || item?.meta?.document ? { legacy: true } : {})
...(item?.legacy || item?.meta?.legacy || item?.meta?.document ? { legacy: true } : {}),
type: item?.meta?.document ? 'document' : 'collection'
};
});