An open API service indexing awesome lists of open source software.

https://github.com/samay-jain/chatbot-with-context-and-memory-management

A lightweight, privacy-focused command-line chatbot built in Python that interacts with large language models locally using the Ollama API. Supports conversation saving, loading, and automatic summarization to manage token limits. Perfect for offline, secure AI-assisted chats leveraging models like LLaMA.
https://github.com/samay-jain/chatbot-with-context-and-memory-management

ai chatbot cli command-line conversation language-model llama local-llm machine-learning nlp offline-ai ollama privacy-focused python token-management

Last synced: about 2 months ago
JSON representation

A lightweight, privacy-focused command-line chatbot built in Python that interacts with large language models locally using the Ollama API. Supports conversation saving, loading, and automatic summarization to manage token limits. Perfect for offline, secure AI-assisted chats leveraging models like LLaMA.

Awesome Lists containing this project

README

          

# ๐Ÿง  Local Chatbot Using Ollama API

This is a simple command-line chatbot built in Python that uses the [Ollama](https://ollama.com/) API to interact with large language models (such as LLaMA). It allows you to chat with the model, save and load conversations, and summarize previous messages to manage token usage.

---

## ๐Ÿš€ Features

- ๐Ÿค– Interactive chatbot powered by local LLMs via Ollama
- ๐Ÿ’พ Save and load conversation history to/from a file
- ๐Ÿงน Automatically or manually summarize past messages to reduce token usage
- ๐Ÿ“ก Connects to `localhost:11434` using Ollama's REST API
- ๐Ÿ› ๏ธ Easy to extend or customize

---

## ๐Ÿ›  Requirements

- Python 3.7+
- [Ollama](https://ollama.com/) installed and running locally
- An Ollama-compatible model (e.g., LLaMA 3) pulled and ready

### Install required Python packages:

```bash
pip install requests