3 ms·
Codeblocks: Library for merging incomplete LLM-generated code
- jumploops 3y agoThis is very neat. I've explored similar approaches for merging code artifacts from an LLM, but my solution wasn't always 100% accurate. Most of the time a linter step was required after any merging due to missing or no longer needed dependencies. Do you have a timeline for supporting Typescript? It'd be nice to abstract this functionality away from the rest of our LLM-handling code.
- aorwall 3y agoI'm the author of the project and am working on a parser for TypeScript right now. And I do agree that it's hard to get this 100% accurate. The merging part of this lib can be considered as an experiment right now, where I try to fix every new way GPT is writing code as I go
- aorwall 3y agoAdded TypeScript support but not much verifications yet. Here's an example: * Original code: https://github.com/aorwall/codeblocks/blob/main/tests/typescript/todo.tsx https://github.com/aorwall/codeblocks/blob/main/tests/typesc... * Update: https://github.com/aorwall/codeblocks/blob/main/tests/typescript/todo_add_filter.tsx https://github.com/aorwall/codeblocks/blob/main/tests/typesc... * Merged: https://github.com/aorwall/codeblocks/blob/main/tests/typescript/todo_merged.tsx https://github.com/aorwall/codeblocks/blob/main/tests/typesc...