aider
aider copied to clipboard
try aider with anthropic claude-instant-100k
I would be very curious to see how aider performs with claude-instant, especially the 100k context variant. I think the latency and cost might be really different. Let me know if you're interested and don't have access
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".
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.
That's good to know. I actually applied for Claude access yesterday, so I'll give it a try when I am able.
Looks like GitHub redacted your email. You can reach me at: aider at paulg.org.
Sent, please check
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.
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
@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 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
@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.
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?
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.
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 ¯\_(ツ)_/¯
Nevermind. By some miracle, I managed to make it write okay code, but it's still very shaky
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
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).
Working pretty well so far!
Can it handle editing existing code as well thought?
Thought you guys might be interested in this:
https://github.com/Explosion-Scratch/claude-unofficial-api/assets/61319150/68b11264-d56e-4ade-a2bf-d4625b1397bb
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
Closing this for now. See #172 for more info.