forked from Archives/langchain
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:
parent
5111bec540
commit
e363e709cb
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user