ChatCraft.org

I've been continuing my experiments with AI development.  I wrote previously about my attempts to use ChatGPT more intentionally, as a way to better understand how my students are encountering it.  Since then, I've been focusing on contributing to https://chatcraft.org/ and wanted to talk about what it is and what it's been like to build it.

My recent AI posts prompted an old friend from my Mozilla days (Taras Glek) to reach out on Twitter.  He wanted to talk about our shared interest in AI and programming.  Both of us learned to program long before AI, but we also see the tremendous potential of using AI to accelerate our work going forward.  We've also been finding that many of our colleagues and peers aren't as interested as we are, and having someone else to talk to and work with on this stuff has been important.

Taras wanted to show me an experiment he'd been building to create his own open source, programming-focused, ChatGPT web client.  It already had a lot of cool features like being able to render Mermaid diagrams and HTML in responses from the ChatGPT API.  He'd also hooked up langchainjs, which is a project I've been following with interest.

Seeing a pure browser-based web app (no server-side code) really inspired me.  For some reason, all of my AI work thus far has been done using two-tier web apps or with node.js all on the server.  I don't know why it never occurred to me to do all of this in the browser.  Seeing what Taras was doing, it all suddenly clicked for me: I really want my AI to be in the browser.

Before this, I was using various AI Assistants in VSCode to see what that's like.  I've tried Cody from Sourcegraph, Amazon CodeWhisperer, and a few more.  So far this process has convinced me that what I really want is the ability to reason with, and explore ideas in code with an AI vs. having it dump suggestions in my editor.  I love having this be a browser tab vs. an editor extension.

Like me, Taras had started using GPT via the OpenAI Playground.  We both loved it.  You could try things in a web page, use it or delete it, and keep trying again until you were happy. It was so easy to experiment.  The ephemeral nature of the output (nothing being saved, not integrated with anything you're working on) encouraged playfulness and exploration. Then OpenAI brought out ChatGPT.  I don't need to tell you what it is.  Again, the "it's just a website" phenomenon really struck me.

Rather than give up on his own UI and using ChatGPT, Taras kept going with what he was building.  He wanted to know if I'd help him with the UI.  It felt like old times, when I was building DXR (a web UI) on top of his Dehydra gcc plugins.

Since then I've been working with Taras to rebuild the UI for what's become chatcraft.org.  It's now gotten to the point that I only use it vs ChatGPT or VSCode assistants.  I like how much freedom it gives: paste in your OpenAI API key and you're ready to go.  No logins, annoying rate limits, and the UI and responses are tailored to what a programmer wants vs. being a general purpose chatbot.

I've also loved being able to build it the way that makes sense to us.  I don't have to wait on OpenAI or some other company to give me what I want--I can build it myself.  The cheap and ready access we have to the underlying models, and the flexibility of the web as a UI and rendering platform is amazing.

Another unexpected benefit of having an AI-based project is that it's helped me get over the hump of using AI to program.  I don't naturally think to use AI when programming: I've never had access to one in the past, and old habits die hard.  However, writing an AI app has made it obvious that I should be using AI to build it.  I've had all kinds of help from ChatGPT and GPT-4 while writing the code.

When I'd get stumped on something, I paste in the code and start talking about my bugs.  Because I work in Markdown, it's very similar to writing issues on GitHub.  Often I get what I need back: a push in the right direction and sometimes complete code as well.  I've also been amazed at how it has been able to replace automate tests.  For example, the other day I was working on a bug in the syntax highlighting code, and I worked with ChatCraft on ChatCraft.  I'd ask it for examples of code blocks, fix the code, repeat, ask about bugs I was seeing, fix things, repeat.  Using the app as an AI-REPL is extremely productive and unlike any programming I've done before.  It's like assembling a robot with the robot's help.

I'm excited to try using it for some other AI experiments over the next few months. I have a few other collaborations I'm wanting to do with friends who are interested in AI, and I'm going to suggest we use ChatCraft to do the work.

ChatCraft.org is still pretty young, but I love it and wanted to share.  If you'd like to give it a try and contribute, please do.  Let Taras and I know what you think.

UPDATE: Taras has also written his own post about ChatCraft.

Show Comments