Skip to content

shweta-29/OpenAI-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Chatbot (Minimal, Memory-Only)

Beginner-friendly chatbot that talks via the OpenAI API and keeps short-term memory in-session (a simple message buffer). No databases and no RAG.

Quickstart

  1. Python 3.10+ recommended. Create a venv: python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate

  2. Install deps: pip install -r requirements.txt

  3. Copy .env.example to .env and set your key: OPENAI_API_KEY=sk-...

  4. Launch Jupyter: python -m ipykernel install --user --name chatbot-minimal jupyter notebook # or VS Code / JupyterLab

  5. Open notebooks/chatbot_memory.ipynb and run the cells.

Notes

  • This demo uses the Responses API with a small, cost-effective model suited to learning and prototyping.
  • Memory is kept in a Python list (last N turns). Close the notebook and it’s gone.
  • Keep your API key safe; never commit .env.

Troubleshooting

  • If you see “API key missing”, ensure your .env is loaded or your environment has OPENAI_API_KEY set.
  • Network/proxy issues can prevent calls from completing; try again or check connectivity.

About

A beginner-friendly OpenAI chatbot with short-term memory, built in Python and Jupyter Notebook. No databases, no RAG – just a simple notebook demo that shows how to chat with the API and keep recent context.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors