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 24
24
g = Github (GITHUB_TOKEN )
25
25
repo = g .get_repo (REPO_NAME )
26
26
issue = repo .get_issue (number = ISSUE_NUMBER )
27
- model = SentenceTransformer (MODEL_NAME )
27
+ llm_model = SentenceTransformer (MODEL_NAME )
28
28
29
29
# --- Load the Unified Knowledge Base ---
30
30
index = faiss .read_index ("unified_index.faiss" )
35
35
36
36
# --- Process the New Issue ---
37
37
new_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' )
39
39
40
40
# --- Semantic Search ---
41
41
distances , indices = index .search (new_issue_embedding , K_NEAREST_NEIGHBORS )
85
85
86
86
# https://ai.google.dev/gemini-api/docs/models
87
87
# Create the model with the system instruction
88
- model = genai .GenerativeModel (
88
+ generative_model = genai .GenerativeModel (
89
89
model_name = "gemini-2.5-flash" ,
90
90
system_instruction = system_instruction
91
91
)
92
92
93
- response = model .generate_content (prompt )
93
+ response = generative_model .generate_content (prompt )
94
94
# --- Post the Comment ---
95
95
final_comment = f"Hello @{ issue .user .login } , thanks for reaching out.\n \n "
96
96
final_comment += response .text
You can’t perform that action at this time.
0 commit comments