Add source field to metadata (#4462)

This is needed if one want to use index.query_with_sources on git files.
Without a source field, index.query_with_sources fails with an
exception.
This commit is contained in:
mvhensbergen 2023-05-15 23:30:12 +02:00 committed by GitHub
parent 5111bec540
commit e363e709cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,6 +75,7 @@ class GitLoader(BaseLoader):
continue
metadata = {
"source": rel_file_path,
"file_path": rel_file_path,
"file_name": item.name,
"file_type": file_type,