https://github.com/cfryerdev/ai-solution-worker
An ai assistant example where we ask it to write entire solutions to disk
https://github.com/cfryerdev/ai-solution-worker
Last synced: 4 days ago
JSON representation
An ai assistant example where we ask it to write entire solutions to disk
- Host: GitHub
- URL: https://github.com/cfryerdev/ai-solution-worker
- Owner: cfryerdev
- Created: 2024-06-20T01:11:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-20T15:59:30.000Z (about 2 years ago)
- Last Synced: 2024-06-21T15:02:32.501Z (about 2 years ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# OpenAI Solution Generation
This is a proof of concept for programmatically creating a code assistant to create full solutions, writing the files to disk, and adding more context to the thread for example adding unit tests.
The output is placed in an output folder, each execution gets its own thread id and puts it in a folder. OpenAI Response dumps are included as `_openaidump.txt` and `_openaidumptests.txt` for debug purposes.
Enjoy!
## Getting started
First you need to update the `OPENAI_API_KEY` key in the `.env` file with your OpenAI API Key. Then you can run the following:
```sh
npm install
npm start
```
### Todo Items
- Sometimes OpenAI gives us garbage responses, we need to catch this, and re-attempt the question.
- Clean up the code a bit, pretty messy
- Add more comments for educational purposes
- create constants for each language we want to support
- Include expected folder structures for each language we want to support