mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-02 05:44:32 +01:00
Additional changes: * Improve typing * Modularize message history memory & fix/refactor lots of things * Fix summarization * Move memory relevance calculation to MemoryItem & improve test * Fix import warnings in web_selenium.py * Remove `memory_add` ghost command * Implement overlap in `split_text` * Move memory tests into subdirectory * Remove deprecated `get_ada_embedding()` and helpers * Fix used token calculation in `chat_with_ai` * Replace Message TypedDict by dataclass * Fix AgentManager singleton issues in tests --------- Co-authored-by: Auto-GPT-Bot <github-bot@agpt.co>
37 lines
804 B
Python
37 lines
804 B
Python
"""A class that does not store any data. This is the default memory provider."""
|
|
from __future__ import annotations
|
|
|
|
from typing import Iterator, Optional
|
|
|
|
from autogpt.config.config import Config
|
|
|
|
from .. import MemoryItem
|
|
from .base import VectorMemoryProvider
|
|
|
|
|
|
class NoMemory(VectorMemoryProvider):
|
|
"""
|
|
A class that does not store any data. This is the default memory provider.
|
|
"""
|
|
|
|
def __init__(self, config: Optional[Config] = None):
|
|
pass
|
|
|
|
def __iter__(self) -> Iterator[MemoryItem]:
|
|
return iter([])
|
|
|
|
def __contains__(self, x: MemoryItem) -> bool:
|
|
return False
|
|
|
|
def __len__(self) -> int:
|
|
return 0
|
|
|
|
def add(self, item: MemoryItem):
|
|
pass
|
|
|
|
def discard(self, item: MemoryItem):
|
|
pass
|
|
|
|
def clear(self):
|
|
pass
|