Skip to content

Latest commit

 

History

History
81 lines (63 loc) · 2.62 KB

README_en.md

File metadata and controls

81 lines (63 loc) · 2.62 KB

Curious Black Cat

📺bilibili • 🌐 Github▶️ YouTube

👋 If you like it, please give a little star in the top right corner. ⭐

Read this in Chinese.

Introduction

This is a demonstration of using the OpenAI Assistant API, including complete front-end and back-end code.

Background

In my childhood, a black cat brought me a lot of joy.

His eyes were like an entire universe, and his black fur would shimmer with a purplish-gold hue under the sunlight, looking particularly beautiful.

This cat was extremely lively, with a loud and piercing meow, full of energy, visible to the neighbors on the hill behind during the day.

Every day after school, as soon as I opened the door, he would run down from the platform of my house to play with me.

Unfortunately, he later accidentally ate rat poison from a neighbor's house and left me too soon.

This project is the "Curious Black Cat" built using OpenAI's Assistant API.

He is full of curiosity about the world and appears in a city in China every day. If I miss him, he can also send me his current picture.

I know that today's technology has a very grand and vast significance for the future, to the extent that people in the future, when reminiscing about their childhood like I do, may fondly remember an AI agent that accompanied them through their childhood.

And on this weekend evening, I just suddenly missed my old friend from my childhood again.

Usage

API Key

First, modify the API KEY in .env

Server

  1. Install anaconda or miniconda: search for installation methods
  2. Create a Python virtual environment
conda create -n cat python=3.11
  1. Enter the Python virtual environment
conda activate cat
  1. Install project dependencies
cd server
pip install -r requirements.txt
  1. Start the backend server
python run.py

Web

  1. Install Node.js: search for installation methods
  2. Install dependencies
cd web
npm i
# or
yarn
  1. Run the frontend web
npm run dev
# or
yarn dev

Web Usage

Open a browser and enter the address: 127.0.0.1:3000

Caution

If using WSL (Windows Subsystem for Linux), please modify 127.0.0.1 in the code to the host IP address accordingly.