Build Your Own AI

I am a developer working as a freelancer and the creator of the open-source TypeScript framework PURISTA. While working on PURISTA, I came up with the idea of creating a GPT-like chatbot specialized for the PURISTA framework.

This book will take you on my journey to build this custom chatbot, focusing on practical solutions based on a real project. Don’t worry, this book is not about the PURISTA framework itself. Together, we will explore different approaches to solve specific problems. By doing so, we will learn step by step which solutions fit which use cases. Additionally, we will evaluate why some methods work better for specific problems while others do not.

In this book, the following topics will be covered practically:

  • Basic understanding of how large language models work
  • How to run models locally
  • How to interact with large language models
  • The pros and cons of different strategies
  • Enhancing the knowledge of large language models
  • Enabling large language models to access real-time data and perform actions

💡 Good To Know

The book does not focus on a specific provider. Instead, it will cover different open-source models and freely available models. By the end, you will have comprehensive knowledge to work with large language models, regardless of which model or provider you choose.

The source code is available on GitHub: github.com/buildownai. Feel free to star it! 😉 You can also check out my other repositories and projects. You might find some useful software there.

The Big Goal

The goal is to create a custom GPT that can:

  • Correctly answer general questions about PURISTA
  • Answer questions about the source code of PURISTA projects
  • Create source code for a PURISTA-based project

Technical Requirements

While Python is the standard programming language in the AI/ML field, we will primarily use TypeScript for our implementations.

💡 Good To Know

No worries. Everything will be explained and will mostly be language-agnostic. This allows you to easily adapt the learnings to your preferred programming language.

To follow the code examples, you will need:

  • A code editor like VSCode, Zed, or similar
  • Node.js or Bun installed
  • A web browser

Your machine should be as powerful as possible. A high-performance graphics card and sufficient RAM will significantly impact performance when running large language models locally. Additionally, large language models require several gigabytes of disk space.

For simplicity, we will use Bun as our runtime and package manager. For linting and code style, we will use Biome. We will also use other excellent software like SurrealDB and Hono.

Understanding the Magic