mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-18 02:14:06 +00:00
fix: github loader metadata clickable
This commit is contained in:
1 parent
7717242112
commit
c04687fdd1
1 file changed
+2
-1
@@ -48,5 +48,6 @@ class GitHubLoader(BaseRemote):
|
|||||||
documents = []
|
documents = []
|
||||||
for file_path in files:
|
for file_path in files:
|
||||||
content = self.fetch_file_content(repo_name, file_path)
|
content = self.fetch_file_content(repo_name, file_path)
|
||||||
documents.append(Document(page_content=content, metadata={"file_path": file_path}))
|
documents.append(Document(page_content=content, metadata={"title": file_path,
|
||||||
|
"source": f"https://github.com/{repo_name}/blob/main/{file_path}"}))
|
||||||
return documents
|
return documents
|
||||||
Reference in new issue
Block a user