Skip to content

Commit

Permalink
websurfer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
davorrunje committed Jan 27, 2024
1 parent c6a87f6 commit bbdc8dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/agentchat/contrib/test_web_surfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ def test_web_surfer():
def test_web_surfer_oai():
llm_config = {"config_list": config_list, "timeout": 180, "cache_seed": None}

model = ["gpt-3.5-turbo-1106", "gpt-3.5-turbo-16k-0613", "gpt-3.5-turbo-16k"]
model = model + [m.replace(".", "") for m in model]
summarizer_llm_config = {
"config_list": filter_config(
config_list, {"model": ["gpt-3.5-turbo-1106", "gpt-3.5-turbo-16k-0613", "gpt-3.5-turbo-16k"]}
),
"config_list": filter_config(config_list, {"model": model}),
"timeout": 180,
"cache_seed": None,
}
Expand Down
4 changes: 3 additions & 1 deletion test/test_browser_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ def test_simple_text_browser():
assert BLOG_POST_STRING in browser.page_content

# Check if page splitting works
approx_pages = int(len(browser.page_content) / viewport_size + 0.5) # May be fewer, since it aligns to word breaks
approx_pages = (
int(len(browser.page_content) / viewport_size + 0.5) + 1
) # May be fewer, since it aligns to word breaks
assert len(browser.viewport_pages) <= approx_pages
assert abs(len(browser.viewport_pages) - approx_pages) <= 1 # allow only a small deviation
assert browser.viewport_pages[0][0] == 0
Expand Down

0 comments on commit bbdc8dd

Please sign in to comment.