Skip to content

marty916/simple-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatbot Setup with FastAPI and OpenAI

This guide will walk you through setting up a chatbot using FastAPI and the OpenAI API.

Prerequisites

Steps to Set Up the Chatbot

Step 1: Create a New Folder for Your Chatbot

Create a new folder on your computer where you will store your chatbot project.

Step 2: Open the New Folder with VS Code

Open Visual Studio Code and use the Open Folder option to open the newly created folder.

Step 3: Open the Terminal in VS Code

In the VS Code command bar, select Terminal. If you don't see it, click on the ... menu to find the terminal option.

Step 4: Create a New Terminal

Click New Terminal. A terminal window will open at the bottom of VS Code.

Step 5: Create and Activate a Python Virtual Environment

Run the following commands one at a time in the terminal to create and activate a virtual environment:

# Create a virtual environment
python -m venv venv

# Activate the virtual environment
.\venv\Scripts\activate

# Activate the virtual environment
source venv/bin/activate

Step 6: Install required libraries

pip install fastapi uvicorn openai websockets

Getting a copy of the code

Option 1: Using Git (Recommended)

  1. Open Terminal/Command Prompts
  2. Navigate to desired directly (don't create the simple-chatbot directory git clone will do it for you)
  3. Use the git clone command (copy this command)
git clone https://github.com/marty916/simple-chatbot.git
  1. After cloning, navigate into the newly created directory
cd simple-chatbot

Option 2: Downloading the ZIP file

If you don't have Git installed

  1. Click on the 'Code' button above
  2. Save the ZIP file to the desired location
  3. Extract the ZIP file to your desired directory

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages