mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-19 06:54:22 +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>
19 lines
475 B
Python
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={},
|
|
)
|