Files
Auto-GPT/tests/integration/memory/conftest.py
Reinier van der Leer bfbe613960 Vector memory revamp (part 1: refactoring) (#4208)
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>
2023-05-25 20:31:11 +02:00

19 lines
475 B
Python

import numpy
import pytest
from autogpt.memory.vector.memory_item import MemoryItem
from autogpt.memory.vector.utils import Embedding
@pytest.fixture
def memory_item(mock_embedding: Embedding):
return MemoryItem(
raw_content="test content",
summary="test content summary",
chunks=["test content"],
chunk_summaries=["test content summary"],
e_summary=mock_embedding,
e_chunks=[mock_embedding],
metadata={},
)