ChatCrafters – Chat with AI powered personas

This is a submission for the Cloudflare AI Challenge.

What I Built

ChatCrafters is a platform where you can create so-called “Personas”. These are AI-powered characters who you can chat with, and they’re all powered by a choice of six open models hosted by Cloudflare.

ChatCrafters also allows you to generate an image of the persona using just text with the help of the Stable Diffusion Lightning text-to-image generator. This allows you to better connect with your persona.

Personas can be used for many different purposes, such as fine-tuning the AI to focus only on one subset of professional work, and then asking it questions related to that work. It can also be used for general chatting and role-playing.

There is also a sharing system, where people can share their personas with others, and people can search for personas built by other people. This encourages community-building, and with features like the ability to Report Personas, this allows people do it safely too!

This app was built with Svelte Kit, Tailwind CSS, and many other technologies. For a full rundown, please visit the GitHub repository

Demo

The app is hosted live on https://chatcrafters-c70.pages.dev

Here are some screenshots:

Messaging a persona

Exploring personas

Creating a persona

My Code

The code is hosted on GitHub with a permissive MIT License

Craft your conversations, meet virtual personas, connect!

THIS IS A WORK IN PROGRESS!

Craft your conversations, meet virtual personas, connect!

ChatCrafters is a web application which allows you to create AI Personas, which are specialised instructions for an LLM to be able to act as another character. You can also chat with Personas other people create.

This website was built for the dev.to Cloudflare AI Challenge.

Hosted live at https://chatcrafters-c70.pages.dev.
View my submission post at https://dev.to/arnu515/chatcrafters-chat-with-ai-powered-personas-40o0.

AI Models used

This application uses seven different models!

One of them being Stable Diffusion XL Lightning, for generating Persona images.

The other six are Text Generation models. They are:

Tech stack

  • Svelte Kit for the fullstack framework

    • It has first class support for Cloudflare Pages
    • Svelte is a very elegant framework, and Svelte Kit is a very good meta-framework for Svelte.
    • Svelte was probably the reason that…

Journey

There are quite a few applications similar to ChatCrafters out there, but most of them are built on top of closed models, which makes them just a black box in which you give your data and you get its output. Nobody except the company which made the application knows what happens to your data.

But this changes today. With the help of Cloudflare’s Workers AI, it has become much easier for anyone to build on top of open models, since the issues that were present before, such as the high upfront cost of GPUs, and/or the complexity of hosting such a model are handled by Cloudflare instead, and developers can just focus on building the app.

I decided to use Svelte Kit for this project, because of its first class support for Cloudflare Pages.

For the database, I decided to use Cloudflare D1, since it is fast, and bindings are already available without having to install/setup anything else.

Cloudflare makes calling the text generation models very easy, since every model has the same request format. Using multiple models becomes much easier, since the only part of the request that has to change is the Model’s ID.

As of the time of writing, ChatCrafters has support for six different text generation LLMs, all thanks to Cloudflare.

ChatCrafters also supports image generation, with the help of Stable Diffusion XL Lightning, also hosted on Cloudflare. This allows you to give your Persona more character.

Multiple Models and/or Triple Task Types

This application uses seven different models!

One of them being Stable Diffusion XL Lightning, for generating Persona images.

The other six are Text Generation models. They are:

These models were handpicked by me after thorough testing on the Cloudflare Workers AI LLM Playground

I hope you enjoy using this application as much as I enjoyed building it! You can see it hosted live here


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top