Skip to content

Commit

Permalink
Updated test_web_surfer for compatibility with #1110.
Browse files Browse the repository at this point in the history
  • Loading branch information
afourney committed Jan 2, 2024
1 parent 1aa2471 commit 40e3fa5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/agentchat/contrib/test_web_surfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import pytest
from autogen import ConversableAgent, UserProxyAgent, config_list_from_json
from autogen.oai.openai_utils import filter_config
from conftest import skip_openai

sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from test_assistant_agent import OAI_CONFIG_LIST, KEY_LOC # noqa: E402
from test_assistant_agent import KEY_LOC, OAI_CONFIG_LIST # noqa: E402

BLOG_POST_URL = "https://microsoft.github.io/autogen/blog/2023/04/21/LLM-tuning-math"
BLOG_POST_TITLE = "Does Model and Inference Parameter Matter in LLM Applications? - A Case Study for MATH | AutoGen"
Expand All @@ -21,12 +22,8 @@

try:
from openai import OpenAI

config_list = config_list_from_json(env_or_file=OAI_CONFIG_LIST, file_location=KEY_LOC)
except ImportError:
skip_openai = True
else:
skip_openai = False
skip_openai = True # noqa: F811, set skip_openai to True since it's not installed.

try:
BING_API_KEY = os.environ["BING_API_KEY"]
Expand All @@ -35,6 +32,9 @@
else:
skip_bing = False

if not skip_openai:
config_list = config_list_from_json(env_or_file=OAI_CONFIG_LIST, file_location=KEY_LOC)


@pytest.mark.skipif(
skip_all,
Expand Down

0 comments on commit 40e3fa5

Please sign in to comment.