From c04687fdd1cc797121bd030d0f6eafde5b18d5d2 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 5 Oct 2024 21:53:30 +0100 Subject: [PATCH] fix: github loader metadata clickable --- application/parser/remote/github_loader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/parser/remote/github_loader.py b/application/parser/remote/github_loader.py index 2137e62a..d35da20d 100644 --- a/application/parser/remote/github_loader.py +++ b/application/parser/remote/github_loader.py @@ -48,5 +48,6 @@ class GitHubLoader(BaseRemote): documents = [] for file_path in files: 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