Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/volkansah/chatgpt-memory-function

This document provides an in-depth explanation of the ChatGPT Memory Function. The memory feature enables OpenAI's ChatGPT to retain key pieces of information between interactions. This is an account-specific feature, meaning that any data saved is connected to your account across different sessions and tabs.
https://github.com/volkansah/chatgpt-memory-function

chatgpt chatgpt-api gpt gpt-api memories memory openai

Last synced: 3 days ago
JSON representation

This document provides an in-depth explanation of the ChatGPT Memory Function. The memory feature enables OpenAI's ChatGPT to retain key pieces of information between interactions. This is an account-specific feature, meaning that any data saved is connected to your account across different sessions and tabs.

Awesome Lists containing this project

README

        

# ChatGPT Memory Function
![ChatGPT Memory Function](chatgpt.png)
## Overview

This document provides an in-depth explanation of the **ChatGPT Memory Function**. The memory feature enables OpenAI's ChatGPT to retain key pieces of information between interactions. This is an account-specific feature, meaning that any data saved is connected to your account across different sessions and tabs. Below are detailed descriptions of how the memory function works, its capabilities, limitations, and how to potentially interact with it programmatically.

---

## Features

### 1. **Account-Specific Memory**
- The memory is **for ChatGPT Plus accounts**, meaning any saved information persists across multiple tabs, sessions, or devices, as long as you're logged in.
- Information stored can be recalled, modified, or deleted upon request.
- Each piece of memory is tagged with specific keywords or phrases for easy recall during future interactions.

### 2. **CRUD Operations (Create, Read, Update, Delete)**
- You can ask ChatGPT to **save** (create) new memories, **retrieve** (read) previously stored data, **update** specific entries, or **delete** any stored information.
- This allows for flexible management of the information you choose to keep in memory.

### 3. **Examples of Memory Use Cases**
- Remember key project details.
- Recall personal preferences (e.g., how you like code formatted).
- Store long-term information about ongoing issues (e.g., "Problem with Crap and Junk").
- Automatically recall previous conversations or key facts across multiple sessions.

---

## How the Memory Works

### 1. **Memory Structure**
- The memory is structured like a **JSON object** or **dictionary**, with specific attributes like:
- `id`: A unique identifier for each memory.
- `title`: A short description or tag for easy recall (e.g., “Project Alpha Details”).
- `description`: The full text or details of what has been saved.
- `date_saved`: Timestamp of when the memory was created or last updated.

Example memory entry:
```json
{
"id": 1,
"title": "Project Alpha",
"description": "Ongoing Python project focusing on data analysis.",
"date_saved": "2024-09-05"
}
```

### 2. **Retrieval Process**
- Memory is **contextually triggered**. When you mention a keyword or phrase linked to saved information, ChatGPT will recall the relevant data.
- For example, if you mention “Problem with Wohnheim Neustart,” ChatGPT will automatically bring up the relevant details.

### 3. **Memory Lifespan**
- Memories are persistent and remain saved until explicitly deleted or overwritten.
- No time limits are set on memory unless you specify one.

---

## Interactions

### 1. **Manual Interaction**
- You can manage memory manually via commands such as:
- `save_memory(title, description)`: Create new memory entries.
- `retrieve_memory(title)`: Fetch stored memory data.
- `update_memory(title, new_description)`: Update an existing entry.
- `delete_memory(title)`: Delete a memory.

### 2. **Automatic Recall**
- When discussing a subject you’ve previously mentioned (e.g., "Problem with Wohnheim Neustart"), ChatGPT will automatically recall the memory and provide you with the relevant details.

### 3. **Custom Preferences**
- You can set preferences for how you want ChatGPT to interact with your memory. For example, you can instruct it to forget certain topics after a specific task is completed or remember important projects indefinitely.

---

## API and Automation

### 1. **API Memory Management**
- As of now, **direct API access to the memory system is not available**, meaning you cannot create, read, update, or delete memories via API calls.
- However, you can interact directly with OpenAI's ChatGPT to manage memory through conversations, and the internal memory storage will adjust based on your inputs.

### 2. **Possible Future Enhancements**
- As memory features evolve, future updates might include API access for developers to create or manage memories programmatically, allowing for more automated and customized workflows.

---

## Use Cases & Best Practices

1. **Project Management**:
- Use the memory to keep track of different ongoing projects, deadlines, or coding preferences. You can store details like project names, technologies used, or progress updates.

2. **Problem Solving**:
- If you frequently encounter recurring issues (like debugging in a specific project), you can save key troubleshooting steps and recall them when needed.

3. **Learning and Documentation**:
- You can use ChatGPT to track key learning concepts and revisit them whenever needed.

---

## Deleting or Updating Memory

### 1. **Manual Deletion**:
You can request ChatGPT to delete specific memory entries at any time. Example commands:
```text
"Forget the memory about Project Alpha."
```

### 2. **Manual Update**:
To update an entry:
```text
"Update the memory for 'Project Alpha' to include new details about the data analysis module."
```

---

## Frequently Asked Questions (FAQs)

### Q: Can I access the memory via an API?
A: Currently, there is no direct API access to create or manage memory. You must interact directly with OpenAI's ChatGPT to manage memories.

### Q: Is memory stored permanently?
A: Memory is stored indefinitely until you choose to delete or update it.

### Q: Is memory shared across different sessions or devices?
A: Yes, as long as you are logged into the same OpenAI account, the memory persists across all devices and sessions.

---

## Conclusion

The memory function in OpenAI's ChatGPT is a powerful tool designed to enhance your experience by allowing the system to remember key details across sessions. While memory cannot yet be managed via API calls, it is fully integrated into interactions, making it a flexible and adaptive feature for long-term projects, problem-solving, and knowledge management.

This README.md was generated with the help of OpenAI's ChatGPT to better understand its memory functions. For any updates or questions, feel free to explore the OpenAI platform for further information.

## Credits
- Volkan Sah
- ChatGPT-4o