d-walsh / sweep

Sweep: open-source AI-powered Software Developer for small features and bug fixes.
https://sweep.dev
Other
0 stars 0 forks source link

Sweep: fix this bug #3

Open d-walsh opened 1 week ago

d-walsh commented 1 week ago

Details

webhook | INFO: 172.25.0.1:44898 - "POST / HTTP/1.1" 200 OK webhook | Exception in thread Thread-1 (run_on_ticket): webhook | Traceback (most recent call last): webhook | File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner webhook | self.run() webhook | File "/usr/local/lib/python3.10/threading.py", line 953, in run webhook | self._target(*self._args, *self._kwargs) webhook | File "/app/sweepai/api.py", line 113, in run_on_ticket webhook | return on_ticket(args, **kwargs, tracking_id=tracking_id) webhook | File "/app/sweepai/chat/api.py", line 200, in wrapper webhook | raise e webhook | File "/app/sweepai/chat/api.py", line 193, in wrapper webhook | result = function( webhook | File "/app/sweepai/handlers/on_ticket.py", line 729, in on_ticket webhook | raise e webhook | File "/app/sweepai/handlers/on_ticket.py", line 508, in on_ticket webhook | raise e webhook | File "/app/sweepai/handlers/on_ticket.py", line 425, in on_ticket webhook | for message, repo_context_manager in fetch_relevant_files.stream( webhook | TypeError: fetch_relevant_files() got multiple values for argument 'images'

Branch

No response

Checklist - [ ] ``sweepai/utils/ticket_utils.py``
dw-auto[bot] commented 1 week ago
Sweeping

0%

Actions

@d-walsh, editing this issue description to include more details will automatically make me relaunch. Please join our community forum for support (tracking_id=943d227f80)

Report a bug.


[!TIP] To recreate the pull request, edit the issue title or description.

This is an automated message generated by Sweep AI.

d-walsh commented 1 week ago
Sweeping

50%
πŸ’Ž Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID: None)

[!TIP] I can email you when I complete this pull request if you set up your email here!


Actions (click)


Step 1: πŸ”Ž Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L1060-L1242 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L798-L1059 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L554-L797 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L462-L553 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L450-L461 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L280-L449 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L1-L279 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/handlers/on_ticket.py#L1-L79 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/utils/ticket_utils.py#L443-L589 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/api.py#L1-L373 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/utils/multi_query.py#L1-L103 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/handlers/on_jira_ticket.py#L1-L83 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/core/context_pruning.py#L1-L198 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/agents/search_agent.py#L1-L188 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/search_prompts.py#L1-L216 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/utils/openai_listwise_reranker.py#L1-L380 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/handlers/on_ticket.py#L410-L631 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/agents/question_answerer.py#L644-L836 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/agents/question_answerer.py#L393-L643 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/handlers/on_ticket.py#L97-L187 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/handlers/on_ticket.py#L80-L93 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/utils/openai_listwise_reranker.py#L485-L787

Step 2: ⌨️ Coding

Locate the line that calls multi_get_top_k_snippets.stream(), which looks like:

for message, ranked_snippets_list, snippets, content_to_lexical_score_list in multi_get_top_k_snippets.stream(
    cloned_repo, [query], k, do_not_use_file_cache=do_not_use_file_cache, use_repo_dir=use_repo_dir, seed=seed, *args, **kwargs, images=images
):

Remove the images=images parameter from the call, so it becomes:

for message, ranked_snippets_list, snippets, content_to_lexical_score_list in multi_get_top_k_snippets.stream(
    cloned_repo, [query], k, do_not_use_file_cache=do_not_use_file_cache, use_repo_dir=use_repo_dir, seed=seed, *args, **kwargs
):

This will resolve the TypeError by no longer passing the unexpected images argument to multi_get_top_k_snippets.stream().


Step 3: πŸ” Code Review

Working on it...


πŸŽ‰ 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. Something wrong? Let us know.

This is an automated message generated by Sweep AI.

d-walsh commented 1 week ago
Sweeping

50%
πŸ’Ž Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID: None)

[!TIP] I can email you when I complete this pull request if you set up your email here!


Actions (click)


Step 1: πŸ”Ž Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L1060-L1242 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L798-L1059 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L554-L797 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L462-L553 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L450-L461 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L280-L449 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/api.py#L1-L279 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/handlers/on_ticket.py#L1-L79 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/utils/ticket_utils.py#L443-L589 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/api.py#L1-L373 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/utils/multi_query.py#L1-L103 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/handlers/on_jira_ticket.py#L1-L83 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/core/context_pruning.py#L1-L198 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/agents/search_agent.py#L1-L188 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/chat/search_prompts.py#L1-L216 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/utils/openai_listwise_reranker.py#L1-L380 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/handlers/on_ticket.py#L410-L631 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/agents/question_answerer.py#L644-L836 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/agents/question_answerer.py#L393-L643 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/handlers/on_ticket.py#L97-L187 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/handlers/on_ticket.py#L80-L93 https://github.com/d-walsh/sweep/blob/77b2d2f23e2a074c2d7d5243a6523af2e720a377/sweepai/utils/openai_listwise_reranker.py#L485-L787

Step 2: ⌨️ Coding

Locate the line that calls multi_get_top_k_snippets.stream(), which looks like:

for message, ranked_snippets_list, snippets, content_to_lexical_score_list in multi_get_top_k_snippets.stream(
    cloned_repo, [query], k, do_not_use_file_cache=do_not_use_file_cache, use_repo_dir=use_repo_dir, seed=seed, *args, **kwargs, images=images
):

Remove the images=images parameter from the call, so it becomes:

for message, ranked_snippets_list, snippets, content_to_lexical_score_list in multi_get_top_k_snippets.stream(
    cloned_repo, [query], k, do_not_use_file_cache=do_not_use_file_cache, use_repo_dir=use_repo_dir, seed=seed, *args, **kwargs
):

This will resolve the TypeError by no longer passing the unexpected images argument to multi_get_top_k_snippets.stream().


Step 3: πŸ” Code Review

Working on it...


πŸŽ‰ 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. Something wrong? Let us know.

This is an automated message generated by Sweep AI.