mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-12 02:34:31 +01:00
* Add categories to command registry * Fix tests * Clean up prompt generation * Rename Performance Evaluations to Best Practices * Move specification of response format from system prompt to Agent.construct_base_prompt * Clean up PromptGenerator class * Add debug logging to AIConfig autogeneration * Clarify prompting and add support for multiple thought processes to Agent * WIP: PlanningAgent * Disable message history by default on BaseAgent * Add CommandOutput and ThoughtProcessOutput type aliases * Fix interrupts in main.py * Use custom exceptions and clean up exception/error handling * Remove duplicate agent_history.py * Update PlanningAgent from upstream * WIP: Support for dynamic in-prompt context * WIP: response formats for PlanningAgent three-stage cycle * Remove browsing overlay & separate browsing from extraction code * Fix human feedback * Fix tests * Include history in Agent prompt generation * Code improvements in agent.py * Add ask_user command and revise system prompt
18 lines
572 B
Python
18 lines
572 B
Python
import pytest
|
|
|
|
from autogpt.agents.agent import Agent
|
|
from autogpt.commands.web_selenium import BrowsingError, browse_website
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.requires_openai_api_key
|
|
def test_browse_website_nonexistent_url(agent: Agent, patched_api_requestor: None):
|
|
url = "https://barrel-roll.com"
|
|
question = "How to execute a barrel roll"
|
|
|
|
with pytest.raises(BrowsingError, match=r"CONNECTION_CLOSED") as raised:
|
|
browse_website(url, question, agent)
|
|
|
|
# Sanity check that the response is not too long
|
|
assert len(raised.exconly()) < 200
|