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>
22 lines
642 B
Python
22 lines
642 B
Python
import pytest
|
|
|
|
from autogpt.agent import Agent
|
|
from tests.integration.challenges.utils import run_interaction_loop
|
|
from tests.utils import requires_api_key
|
|
|
|
CYCLE_COUNT = 2
|
|
|
|
|
|
@requires_api_key("OPENAI_API_KEY")
|
|
@pytest.mark.vcr
|
|
def test_browse_website(
|
|
browser_agent: Agent,
|
|
patched_api_requestor: None,
|
|
monkeypatch: pytest.MonkeyPatch,
|
|
) -> None:
|
|
file_path = browser_agent.workspace.get_path("browse_website.txt")
|
|
run_interaction_loop(monkeypatch, browser_agent, CYCLE_COUNT)
|
|
|
|
content = open(file_path, encoding="utf-8").read()
|
|
assert "£25.89" in content, f"Expected £25.89, got {content}"
|