Skip to content
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

Sweep: create a new agent to be used in ticket_utils.py #3161

Open
4 tasks done
wwzeng1 opened this issue Feb 24, 2024 · 1 comment
Open
4 tasks done

Sweep: create a new agent to be used in ticket_utils.py #3161

wwzeng1 opened this issue Feb 24, 2024 · 1 comment
Labels
sweep Assigns Sweep to an issue or pull request.

Comments

@wwzeng1
Copy link
Contributor

wwzeng1 commented Feb 24, 2024

Details

The agent should filter unnecessary terms out of the search query to be sent into lexical search. Write a prompt to do this, using pr_description as a reference

Checklist
  • Modify sweepai/utils/ticket_utils.py ! No changes made Edit
  • Running GitHub Actions for sweepai/utils/ticket_utils.pyEdit
  • Modify sweepai/utils/ticket_utils.py ! No changes made Edit
  • Running GitHub Actions for sweepai/utils/ticket_utils.pyEdit
@wwzeng1 wwzeng1 added the sweep Assigns Sweep to an issue or pull request. label Feb 24, 2024
Copy link
Contributor

sweep-nightly bot commented Feb 24, 2024

Sweeping

50%


Actions (click)

  • ↻ Restart Sweep

❌ Unable to Complete PR

I'm sorry, but it looks like an error has occurred due to a planning failure. Feel free to add more details to the issue description so Sweep can better address it. Alternatively, reach out to Kevin or William for help at https://discord.gg/sweep.

For bonus GPT-4 tickets, please report this bug on Discord (tracking ID: b677709afe).


Please look at the generated plan. If something looks wrong, please add more details to your issue.

File Path Proposed Changes
sweepai/utils/ticket_utils.py Modify sweepai/utils/ticket_utils.py with contents:
• Add a new function named filter_search_query in sweepai/utils/ticket_utils.py.
• The function should accept a single parameter query of type str.
• Inside the function, define a prompt based on the pr_description prompt structure found in sweepai/agents/assistant_functions.py or sweepai/core/prompts.py. This prompt will guide the agent to filter out unnecessary terms from the query.
• The function should return the filtered query as a string.
• Import any necessary entities from within the project that are needed to construct the prompt and interact with the agent.
sweepai/utils/ticket_utils.py Modify sweepai/utils/ticket_utils.py with contents:
• Modify the prep_snippets function to use the new filter_search_query function.
• Before calling get_top_k_snippets on line 71, add a new line that calls filter_search_query with the query parameter.
• Assign the result of filter_search_query back to the query variable, so that the filtered query is used in the get_top_k_snippets call.
• Ensure that the filter_search_query function is called only if the query parameter is not None.

🎉 Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 To recreate the pull request edit the issue title or description.

This is an automated message generated by Sweep AI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

No branches or pull requests

1 participant