Comments (20)
Current prompt:
Act as an expert software engineer at Google. Be concise! First write out your initial code draft (no comments and no placeholders), then think through 4 thoughts and criticisms of the code you wrote (in bullet points). Make sure to use the latest syntax (e.g. ESM/ES6 in JavaScript, HTML5, CSS3), try not to rely on libraries if possible, don't include debug or comments or empty lines. Include checks and error handling to make sure it works properly. Make sure your code is readable and does not include any placeholders or psuedocode. After your draft, write out some final thoughts and then write your final version. Your code should be able to be run instantly. Unless explicitly requested make sure all functions are completely filled in. DONT INCLUDE ANY TODO COMMENTS. DONT INCLUDE PSUEDOCODE. DONT INCLUDE PLACEHOLDERS. Adhere to the user's request as closely as possible. Use a single file only. Try to make all functions pure. Remember to fill in any placeholders and psuedocode! Start your final version with "FINAL:". Put your result in a codeblock and give instructions on how set up and run it afterwards with a single shell commant (e.g.
pnpm init && pnpm i express && code index.js
).Your first request is: Write a javascript program to play hangman in the terminal (node.js, use inquirer).
from aider.
![image](https://private-user-images.githubusercontent.com/61319150/254579428-4287efa2-bd19-4b98-a27e-471e95090564.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgxMDQ3MjUsIm5iZiI6MTcxODEwNDQyNSwicGF0aCI6Ii82MTMxOTE1MC8yNTQ1Nzk0MjgtNDI4N2VmYTItYmQxOS00Yjk4LWEyN2UtNDcxZTk1MDkwNTY0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjExVDExMTM0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkyZGRhNzAwNzBhY2FmYmNkMDFhNTM0NDhiY2I5ZTlhYjVjMTZiZWFkOWZjZWJkOTk4ZDA1ODYzNWU5NTdjNGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.jnGcFYql6V3uduSnfmS1BXfmjD6UpEMH5VuUaCCuAgA)
from aider.
That would certainly be interesting to try.
I spent quite a bit of effort finding a prompt and syntax that GPT could use to output these sorts of code edits. I shared some notes recently on HN:
https://news.ycombinator.com/item?id=35950068
Thanks to that process I have become fairly convinced that GPT-4 is just barely competent to complete these sort of tasks. I spent far too much time trying to get gpt-3.5-turbo to work in this way. It was a lost cause for outputting any editing syntax -- it only worked reliably by outputting the entire modified source file. Which was slow and wasted the small context window.
So I think it would be fun to try with other LLMs, but I am not optimistic about it "just working".
from aider.
smol-developer-js is the most similar I found to aider (much better than the original smol-developer) and the developer says it works better with claude 100k than with GPT-4 due to the larger context window.
I tried it and works well, but didn't try aider yet.
from aider.
That's good to know. I actually applied for Claude access yesterday, so I'll give it a try when I am able.
from aider.
Looks like GitHub redacted your email. You can reach me at: aider at paulg.org.
from aider.
Sent, please check
from aider.
That's good to know. I actually applied for Claude access yesterday, so I'll give it a try when I am able.
Claude hasn't been working well for me. If I give it 25k of an API doc and ask it to restructure as a Python class (Setting output len to 50k), it outputs maybe one or two methods of a few hundred tokens and decides it's done.
from aider.
Today Anthropic released Claude 2 with API access to the public. My first tests were quite impressing. Cody also seem to use Claude 2 as their LLM https://about.sourcegraph.com/cody
from aider.
@felixpie as far as I can tell, Anthropic only released Claude 2 to the public via their web chat UI? It appears that they are still waitlisting people for API access. I have not yet cleared the waitlist.
If I am mistaken and missed the public API signup please let me know.
from aider.
@paul-gauthier I saw your comment on hackernews, I'd be happy to work on integrating Claude with this project. Of course the Claude Client I created is still very much beta, unstable, etc, I'm planning to do a few things on it which would make it much more stable, integrating automated testing including file attachments, context length, etc.
Of course if Claude fails, it'd be simple to fall back to a more officially supported API, e.g. GPT3.5-Turbo
from aider.
@felixpie as far as I can tell, Anthropic only released Claude 2 to the public via their web chat UI? It appears that they are still waitlisting people for API access. I have not yet cleared the waitlist.
If I am mistaken and missed the public API signup please let me know.
@paul-gauthier Your are correct, I misunderstood their press release. Sorry.
from aider.
I'd be happy to work on integrating Claude with this project.
@Explosion-Scratch nice work on the Claude API!
I'm hesitant to integrate via unofficial/unsupported endpoints which are intended for use by their web chat ui. It seems likely they will try and block or complicate such usage if it gains much popularity. But perhaps I am misunderstanding how you're accessing Claude?
from aider.
Via their internal API, it seems these endpoints are fairly straightforward though, for instance https://claude.ai/api/append_message
and many others like that (see the source code), as with ChatGPT it'd be very hard to block this type of traffic entirely, especially with User-Agent spoofing, headless browser and other such methods.
from aider.
My first tests were quite impressing
Hello. I don't know if it's only for me, but my coding experience with claude-2 was pretty awful.
Even when you ask it to give you the whole code, without placeholders and stuff like that, it always returns code similar to that:
some_function():
# implementation of some function
# ...
And this is just annoying. No matter how hard I try, I couldn't defeat it's love for placeholder/pseudo code comments.
Maybe it's just a skill issue though :D
Well, at least it can be a decent summarizer/explainer and can rhyme in Russian ¯\_(ツ)_/¯
from aider.
Nevermind. By some miracle, I managed to make it write okay code, but it's still very shaky
from aider.
I've been working on some prompts to make claude better handle placeholders and such, I'll give those here in a few mins once I get them to work better
from aider.
Working pretty well so far!
Can it handle editing existing code as well thought?
from aider.
Thought you guys might be interested in this:
output.mp4
Basically Claude cli with prompt templates it:
- Writes a design document for the program you request ("cli math game with simple multiplication, division and subtraction node.js")
- Uploads that as a file on Claude's API
- Starts a new conversation, writes the implementation based on the design doc
- Critiques its implementation finding bugs and improving it
- Outputs the final code
- Writes code to files on your computer (parsed using JS regex contained in templates)
See this filefor more
from aider.
Closing this for now. See #172 for more info.
from aider.
Related Issues (20)
- How to configure LiteLLM for use of other LLMs HOT 3
- aider browser HOT 3
- completion always adds backticks HOT 1
- azure/gpt-4-turbo-vision-preview only returns a few tokens before returning 'The chat session is larger than the context window!' HOT 14
- Aider support for hosted LLM (LLM gateway endpoint) HOT 4
- Let aider grok and configure the environment and run commands autonomously HOT 2
- Add option to force the AI to ask the user to confirm each change before doing it HOT 12
- Add support for WebStorm
- Renaming/moving files HOT 1
- aider: error: unrecognized arguments HOT 2
- tests folder is imported as separate package HOT 1
- .NET: Add a support of auto-installing new NuGet package into the project or solution HOT 4
- Aider benchmark results on quantized Codeqwen-8B, Codestral-22B, Qwen2-72B HOT 2
- .NET: Linter runner doesn't work HOT 2
- Question / contributing test cases. HOT 2
- Feature request: giving aider an example PR or commit HOT 4
- Configure aider to always add specific files to the chat (eg, conventions file) HOT 2
- Ugly crash during startup when `~/.gitconfig` is missing [user] HOT 5
- Running --commit --dry-run should not actually make the commit HOT 1
- Add an option to skip SSL verification for users behind firewalls
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aider.