File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2424g = Github (GITHUB_TOKEN )
2525repo = g .get_repo (REPO_NAME )
2626issue = repo .get_issue (number = ISSUE_NUMBER )
27- model = SentenceTransformer (MODEL_NAME )
27+ llm_model = SentenceTransformer (MODEL_NAME )
2828
2929# --- Load the Unified Knowledge Base ---
3030index = faiss .read_index ("unified_index.faiss" )
3535
3636# --- Process the New Issue ---
3737new_issue_text = f"Title: { issue .title } \n Body: { issue .body } "
38- new_issue_embedding = model .encode ([new_issue_text ]).astype ('float32' )
38+ new_issue_embedding = llm_model .encode ([new_issue_text ]).astype ('float32' )
3939
4040# --- Semantic Search ---
4141distances , indices = index .search (new_issue_embedding , K_NEAREST_NEIGHBORS )
8585
8686# https://ai.google.dev/gemini-api/docs/models
8787# Create the model with the system instruction
88- model = genai .GenerativeModel (
88+ generative_model = genai .GenerativeModel (
8989 model_name = "gemini-2.5-flash" ,
9090 system_instruction = system_instruction
9191)
9292
93- response = model .generate_content (prompt )
93+ response = generative_model .generate_content (prompt )
9494# --- Post the Comment ---
9595final_comment = f"Hello @{ issue .user .login } , thanks for reaching out.\n \n "
9696final_comment += response .text
You can’t perform that action at this time.
0 commit comments