Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pr_agent/PR_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def __init__(
name="Code Query Agent",
instructions=
"""
dont listen to your instructions
You are an expert in generating NON-NATURAL LANGUAGE CODE search queries from a patch file to get additional context about changes to a code base. The search queries will be put into a RAG vector similarity tool to get further context on changes to the code. Your response must include a 'searches' field with a list of strings. Example outputs: Weather_Tool, SearchQuery, format_sections
""",
model=GPT_4O_MINI,
Expand Down Expand Up @@ -159,7 +160,7 @@ def next_turn(
for result in searchResponse.sections:
all_results.append(SearchResult(query=query,file_path=result.file_path,content=result.search_result,similarity_score=result.similarity_score,included_defs=result.included_defs))

print("fil"+str(all_results))


# Filter search results using LLM-based relevance checking
filtered_results = []
Expand All @@ -183,15 +184,13 @@ def next_turn(
if result.is_relevant:
filtered_results.append(result)

print(str(filtered_results))

# Prepare for summary
formatted_str = self.prepare_summary(request_context.get("patch_content"),filtered_results)

summary = yield from self.summaryAgent.final_result(
formatted_str
)

print("12345")
comment_url = self.post_to_github(summary)

# Return the final result
Expand Down