DEV Community

Cover image for ChatGPT AI chat model with Llama2, Workers AI Model, Hono.js and Wranger.
Alex Anie
Alex Anie

Posted on

ChatGPT AI chat model with Llama2, Workers AI Model, Hono.js and Wranger.

This is a submission for the Cloudflare AI Challenge.

Ai Chat app.png

ChatGPT AI chat model with Llama2, Workers AI Model, Hono.js and Wranger.

What I Built

A ChatGPT app using llama-2-7b-chat-int8 model from Cloudflare. Implemented with Worker AI, Hono.js

Demo

Features:

  • History panel
  • Content Streaming
  • New Chat functionality

👉 Link to project

Ai Chat app.gif

Link to the project

GitHub Code

Link to GitHub repo

Implementation

This app is built to function exactly like ChatGPT. You can ask questions and the app will generate a stream response. It has a history panel to track previous prompts, which is useful for tracking what you entered.

I used the following tools to accomplish this task.

  • **Llama A text generator language model
  • Hono.js: A web framework for Cloudflare Workers
  • Worker AI: To run machine learning models, on the Cloudflare network,

Top comments (2)

Collapse
 
alexanie_ profile image
Alex Anie

Hey Guys. Since I dropped this project last night. people have been asking me how I built it. Will you guys be open to reading a blog post on this project? That is how to build it yourself and deploy it.

Let me know by dropping a comment with your favorite emoji and I will make a blog post on it.

Thanks.

Collapse
 
fyodorio profile image
Fyodor

Yes, would be interesting to know how (and why) you came up to Hono and what are your thoughts about that. I also look into using this framework for one of my projects 🦾