Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yoshitunaiga/gi-python-ai-chatbot
A custom chatbot in python using OpenAI.
https://github.com/yoshitunaiga/gi-python-ai-chatbot
colorama openai-api os python
Last synced: 2 months ago
JSON representation
A custom chatbot in python using OpenAI.
- Host: GitHub
- URL: https://github.com/yoshitunaiga/gi-python-ai-chatbot
- Owner: YoshiTunaiga
- Created: 2024-09-10T14:46:43.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T00:03:51.000Z (4 months ago)
- Last Synced: 2024-09-12T22:25:03.863Z (4 months ago)
- Topics: colorama, openai-api, os, python
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project: Build an AI-Chatbot
## Project Overview
I will be building a custom chatbot using OpenAI. I will use the OpenAI API to generate explanations based on code blocks in multiple programming languages like a software engineer.
## Requirements: Installation & Setip
#### Packages:
- OpenAI: [OpenAI](https://python.langchain.com/docs/integrations/platforms/openai) is a Python library that provides a simple interface to the OpenAI API. It also provides a command-line interface (CLI) for interacting with the API.
## Create and activate a virtual environment
#### MacOs/Linux:
```py
# Create environment
python3 -m venv env
``````py
# Activate environment
source env/bin/activate
```## Installation
#### MacOs/Linux:
```py
pip3 install -r requirements.txt
pip3 install streamlit-chat
```## API Keys
### Set the key as an environment variable:
```py
export OPENAI_API_KEY='sk-foij....4hi3hi3j5h'
```.env file:
```py
OPENAI_API_KEY='sk-foij....4hi3hi3j5h'
```## Start the application
```py
streamlit run main.py
```