Inspiration
Plug-ins are a powerful new feature of OpenAI however building APIs can be time consuming and tedious. We decided to build an automated plugin generator to help fill in the gaps.
What it does
Smol Plug-in takes in a prompt describing a plugin and produces a full repository that gets you about 95% of the way to a finished plug-in.
How we built it
We forked https://github.com/smol-ai/developer, cleaned it up, and created a Plugin Prompt (plugins.md) that generates ChatGPT plug-ins. Our first example was an Etherscan plugin that fetches account balances from the Ethereum blockchain. We also created plugin_generator.py which uses the plugins.md as a template to allow users to create plugins based on their own API descriptions.
Challenges we ran into
Issues with Plugin Generator
sometimes it gets the file structure wrong idea:we fix this by specifying the file structure more concretely
sometimes it get the dependencies wrong idea: we will try making sure it doesn't use specific versions that don't exists
frequently there is a divergence between the openapi.yaml spec and the actual routes defined in app.py idea: a possible fix is generate the openapi.yaml first, then generate app.py from the routes?
operationId in openapi.yaml is required and should be mentioned in prompt
Limitations
- It has context over files but not contents of files which leads to hallucinations based on what files contain. This leads to a lot of bugs like calling methods that are not implemented. More work needs to be done on shared dependencies
Accomplishments that we're proud of
Smol Plugins removes most of the work needed to produce an OpenAI plug-in getting developers closer to finish line in far less time.
What we learned
We learned that entire application generation is possible, but still not perfect.
What's next for Smol Plugins
- In the future use a web scraper to automatically fill out
descriptionbased on scraped API docs - Implement a knowledge graph to ensure file context is preserved across dependent files
- Automated testing using
debugger.py - Better Documentation
- Improved user interface
- Prompt versioning
Built With
- openai
- python
Log in or sign up for Devpost to join the conversation.