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: #79

Open
4 tasks done
reconsumeralization opened this issue Jan 23, 2024 · 1 comment
Open
4 tasks done

Sweep: #79

reconsumeralization opened this issue Jan 23, 2024 · 1 comment
Labels
sweep Sweep your software chores

Comments

@reconsumeralization
Copy link
Owner

reconsumeralization commented Jan 23, 2024

Details

[
{
"model": "gemini-pro",
"api_key": "your-gemini-pro-key",
"api_type": "google"
}

Checklist
  • Modify config/aiConfig.json ! No changes made Edit
  • Running GitHub Actions for config/aiConfig.jsonEdit
  • Modify components/ResourceLibrary.jsc5ab11e Edit
  • Running GitHub Actions for components/ResourceLibrary.jsEdit
@reconsumeralization reconsumeralization added the sweep Sweep your software chores label Jan 23, 2024
Copy link
Contributor

sweep-ai bot commented Jan 23, 2024

🚀 Here's the PR! #93

See Sweep's progress at the progress dashboard!
Sweep Basic Tier: I'm using GPT-4. You have 4 GPT-4 tickets left for the month and 3 for the day. (tracking ID: 6e971f1890)

For more GPT-4 tickets, visit our payment portal. For a one week free trial, try Sweep Pro (unlimited GPT-4 tickets).

Tip

I'll email you at [email protected] when I complete this pull request!


Actions (click)

  • ↻ Restart Sweep

GitHub Actions✓

Here are the GitHub Actions logs prior to making any changes:

Sandbox logs for 83b9963
Checking config/aiConfig.json for syntax errors... ✅ config/aiConfig.json has no syntax errors! 1/1 ✓
Checking config/aiConfig.json for syntax errors...
✅ config/aiConfig.json has no syntax errors!

Sandbox passed on the latest master, so sandbox checks will be enabled for this issue.


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/reconsumeralization/tk/blob/83b9963e8ea6f75163b779831b57c36080c3037e/config/aiConfig.json#L1-L4

https://github.com/reconsumeralization/tk/blob/83b9963e8ea6f75163b779831b57c36080c3037e/components/ResourceLibrary.js#L1-L165


Step 2: ⌨️ Coding

  • Modify config/aiConfig.json ! No changes made Edit
Modify config/aiConfig.json with contents:
• Replace the placeholder values in the aiConfig.json file with the actual values provided by the user.
• Update the "model" key to have the value "gemini-pro".
• Update the "api_key" key to have the value "your-gemini-pro-key".
• Update the "api_type" key to have the value "google".
• Ensure that the JSON syntax remains valid after the changes.
  • Running GitHub Actions for config/aiConfig.jsonEdit
Check config/aiConfig.json with contents:
  • Modify components/ResourceLibrary.jsc5ab11e Edit
Modify components/ResourceLibrary.js with contents:
• Ensure that the fetchAiResponse function in the ChatComponent uses the correct API endpoint and headers based on the updated aiConfig.json.
• Modify the endpoint variable to use the correct API endpoint if it is provided in the aiConfig.json file.
• Update the headers variable to include the 'Authorization' header with the 'Bearer' token followed by the API key from aiConfig.json if the 'api_type' is 'google'.
• Ensure that the body of the fetch request is correctly formatted to send the userMessage to the AI API.
• Confirm that the response from the AI API is correctly parsed and the aiResponse is returned.
--- 
+++ 
@@ -142,10 +142,8 @@
     };
     const response = await fetch(endpoint, {
       method: 'POST',
-      body: JSON.stringify({ userMessage }),
-      headers: {
-        'Content-Type': 'application/json',
-      },
+      body: JSON.stringify({ message: userMessage }),
+      headers: headers,
     });
     const data = await response.json();
     return data.aiResponse;
  • Running GitHub Actions for components/ResourceLibrary.jsEdit
Check components/ResourceLibrary.js with contents:

Ran GitHub Actions for c5ab11ef93e6fb0db221de3897635adcac6cc0fc:


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/_87763.


🎉 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. To tweak the pull request, leave a comment on the pull request.Something wrong? Let us know.

This is an automated message generated by Sweep AI.

This was referenced Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Sweep your software chores
Projects
None yet
Development

No branches or pull requests

1 participant