mirror of
https://github.com/open-webui/open-webui
synced 2024-11-07 00:59:52 +00:00
refac
This commit is contained in:
parent
c400f40663
commit
493745a70b
@ -347,7 +347,7 @@ def get_rag_context(
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
context = None
|
context = None
|
||||||
if file["type"] == "text":
|
if file.get("type") == "text":
|
||||||
context = file["content"]
|
context = file["content"]
|
||||||
else:
|
else:
|
||||||
if hybrid_search:
|
if hybrid_search:
|
||||||
|
@ -61,7 +61,8 @@
|
|||||||
items = [...$knowledge, ...legacy_collections].map((item) => {
|
items = [...$knowledge, ...legacy_collections].map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...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'
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user