[go: up one dir, main page]

Skip to content

An open-source weekend fun project aims to make LLMs more like a human.

License

Notifications You must be signed in to change notification settings

AspadaX/MemoryGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MemoryGPT

An open-source weekend fun project aims to make LLMs more like a human.

Overview

This project implements a conversational AI assistant, who possesses long-term memories, that can track context and refer back to previous conversations, even if the conversation happened days ago or sessions ago. It utilizes the OpenAI libray for text generation paired with vector similarity search to find relevant passages from prior chat history.

Be aware that you can actually use the OpenAI extension of Text Generation WebUI to use this project with your own LLM. I tested this project with a Vicuna 13B 16K model.

The assistant is built in a modular way, separating the UI, API calls, memory management, and content generation. Key features:

  • Web interface for chatting via Gradio
  • Conversation memory tracking
  • Retrieval of old messages via vector embeddings
  • Dynamic memory truncation based on context length
  • Modular components for extensibility

Usage

To use this assistant:

  1. Install python libraries: ChromaDB and OpenAI
  2. Obtain OpenAI API keys and add to config.py
  3. Run WebUI.py to launch the web interface
  4. Chat with the assistant in your browser

The assistant will track context, refer to old messages, and truncate memory when needed.

Files

  • chat.py: OpenAI ChatCompletion API interface
  • config.py: API keys
  • embeddings.py: Manages message embeddings for similarity search
  • memories.py: Conversation memory manager
  • WebUI.py: Web interface with Gradio

To Do

Some ideas for extending this project:

Credit

  • ChromaDB, the backbone of this project's vector database.
  • Text Generation WebUI OpenAI Extension, I tested the OpenAI api with this extension and loaded a small LLM with the WebUI.
  • Vicuna 13B 16K, I used this LLM for testing.

License

This project is open source and available under the MIT License.

Let me know if you would like any changes or have additional sections to add!

About

An open-source weekend fun project aims to make LLMs more like a human.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages