mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-19 01:51:15 -05:00
refac
This commit is contained in:
1 parent
3ec0774503
commit
97a66ef73e
2 files changed
+2
-2
No files matched your search
@@ -1421,7 +1421,7 @@ async def get_sources_from_items(
|
||||
# Fallback to item content
|
||||
query_result = {
|
||||
'documents': [[item.get('content')]],
|
||||
'metadatas': [[{'file_id': item.get('id'), 'name': item.get('name')}]],
|
||||
'metadatas': [[{'name': item.get('name')}]],
|
||||
}
|
||||
|
||||
elif item.get('type') == 'note':
|
||||
|
||||
@@ -1000,7 +1000,7 @@ def get_source_context(sources: list, source_ids: dict = None, include_content:
|
||||
source_ids[source_id] = len(source_ids) + 1
|
||||
src_name = source.get('source', {}).get('name')
|
||||
src_type = source.get('source', {}).get('type')
|
||||
src_rid = source.get('source', {}).get('id')
|
||||
src_rid = source.get('source', {}).get('id') if src_type != 'text' else None
|
||||
body = doc if include_content else ''
|
||||
extra_attrs = ''
|
||||
for key, value in filter_source_metadata(meta).items():
|
||||
|
||||
Reference in new issue
Block a user