WebGPT, CoPilot for Small Libraries

WebGPT, CoPilot for Small Libraries

Before you ask, I know OpenAI have provided ChatGPT with internet access. I really don't care, I just wanted to play for a couple of hours on a Sunday, so I implemented my own solution. Check out WebGPT if you want to give it a go.

What I realised after I had done the job, is that it's a pretty kick ass tool to generate code, especially for small libraries. Small libraries are libraries typically so insignificant that the vanilla ChatGPT doesn't know how to create code for them.

An example is my own programming language Hyperlambda. I'm probably the only guy on earth coding in Hyperlambda, so OpenAI probably doesn't care about teaching it to its machine learning models. Or there simply aren't enough significant sources for it to be found online. Regardless, if you ask ChatGPT to generate Hyperlambda code for you, it'll render rubbish for you.

WebGPT to the rescue

However, if we nudge OpenAI a little bit by providing it with existing information about the language, things are different. All of a sudden it's more than capable of generating Hyperlambda code, because it's capable of determining its structure from context.

This fact allows me to point it to the documentation for Hyperlambda, and have it generate more or less perfect code for me without any hassle. Below is a screenshot of how I accomplished having it understand how to create a Hyperlambda snippet that sends an email.

ChatGPT generating Hyperlambda code to send email using WebGPT

Below is the code it produced for me.

         Foo Bar:foo@bar.com
         Your Name:your_email@example.com
      subject:Hello from Hyperlambda!
         content:This is the email body.

Small libraries

99% of all library code actually used in this world exists in tiny libraries, sometimes inhouse libraries, created to solve some narrow domain problem, a handful of companies care about. If you asked ChatGPT to generate code for you for such libraries it would probably choke on your instruction.

However, if you've got a website where the documentation exists for these libraries, and you've got code examples, you can simply point WebGPT at it, and have it understand the code for you, and modify its examples accordingly. It could be argued you've got "your own personal StackOverflow", where you can ask as many questions as you wish, and WebGPT generates the resulting answer in some few seconds. Below is a small video where I demonstrate it.

Got some obscure legacy library only used by your employer? Or maybe you've got an open source library you created with 5 stars on GitHub, and you need to rapidly generate code with it using AI?

Have fun 😊

Thomas Hansen

Thomas Hansen I am the CTO of AINIRO.IO AS and the CEO of AINIRO.IO, Ltd. I am a software developer with more than 25 years of experience. I write about Machine Learning, AI, and how to help organizations adopt said technologies. You can follow me on LinkedIn if you want to read more of what I write.

Published 3. Nov 2023

Free 7-Day Trial

Create your own Free 7-Day Trial Custom ChatGPT Chatbot
Or contact us if you want us to discuss your particular needs

Call to Action icon to create a ChatGPT demo website chatbot