-
Notifications
You must be signed in to change notification settings - Fork 99
feat(pipelines): integrate GitHub issues ingestion into RAG pipeline #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -230,7 +230,7 @@ def chunk_and_embed( | |||||
| import re | ||||||
| import torch | ||||||
| from sentence_transformers import SentenceTransformer | ||||||
| from langchain.text_splitter import RecursiveCharacterTextSplitter | ||||||
| from langchain_text_splitter import RecursiveCharacterTextSplitter | ||||||
|
|
||||||
| device = 'cuda' if torch.cuda.is_available() else 'cpu' | ||||||
| model = SentenceTransformer('sentence-transformers/all-mpnet-base-v2', device=device) | ||||||
|
|
@@ -420,6 +420,13 @@ def github_rag_pipeline( | |||||
| github_token=github_token | ||||||
| ) | ||||||
|
|
||||||
| issues_task = download_github_issues( | ||||||
| repos="kubeflow/kubeflow,kubeflow/pipelines", | ||||||
| labels="", | ||||||
| state="open", | ||||||
| max_issues_per_repo=50, | ||||||
| github_token=github_token | ||||||
| ) | ||||||
|
Comment on lines
+423
to
+429
|
||||||
| # Chunk and embed the content | ||||||
| chunk_task = chunk_and_embed( | ||||||
| github_data=download_task.outputs["github_data"], | ||||||
|
|
@@ -428,7 +435,14 @@ def github_rag_pipeline( | |||||
| chunk_size=chunk_size, | ||||||
| chunk_overlap=chunk_overlap | ||||||
| ) | ||||||
|
|
||||||
| issues_chunk_task = chunk_and_embed( | ||||||
| github_data=issues_task.outputs["issues_data"], | ||||||
| repo_name="kubeflow-issues", | ||||||
| base_url="https://github.com", | ||||||
|
||||||
| base_url="https://github.com", | |
| base_url="", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks!
You're right that using html_url from the GitHub API would produce more accurate citations for issues.
To keep this PR focused on integrating issues ingestion without modifying existing chunk_and_embed behavior, I’ve kept the current approach unchanged.
I’m happy to open a follow-up PR to update chunk_and_embed to prefer html_url when available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chunk_and_embednow importsRecursiveCharacterTextSplitterfromlangchain_text_splitter, but the installed dependency in this component islangchain(seepackages_to_install), and the repository requirements uselangchain-text-splitterswhose module name is typicallylangchain_text_splitters(plural). As written, this is likely to fail at runtime withModuleNotFoundError. Align the import with the dependency you install (either revert tolangchain.text_splitterwhen installinglangchain, or installlangchain-text-splittersand import fromlangchain_text_splitters).