|
9 | 9 | that is attached as an attribute.
|
10 | 10 | """
|
11 | 11 |
|
12 |
| -from typing import Any, Callable, Dict, Optional, Tuple |
13 |
| -from litellm.utils import function_to_dict |
14 |
| -from llamabot.bot.simplebot import SimpleBot |
15 |
| -from llamabot.components.messages import user |
16 |
| -from bs4 import BeautifulSoup |
| 12 | +import os |
| 13 | +import random |
17 | 14 | from concurrent.futures import ThreadPoolExecutor, as_completed
|
18 | 15 | from datetime import datetime
|
| 16 | +from functools import wraps |
| 17 | +from typing import Any, Callable, Dict, Optional, Tuple |
19 | 18 | from uuid import uuid4
|
| 19 | + |
20 | 20 | import requests
|
21 |
| -from llamabot.components.sandbox import ScriptExecutor, ScriptMetadata |
22 |
| -import random |
| 21 | +from bs4 import BeautifulSoup |
23 | 22 | from duckduckgo_search.exceptions import DuckDuckGoSearchException
|
24 |
| -from llamabot.prompt_manager import prompt |
| 23 | +from litellm.utils import function_to_dict |
25 | 24 | from loguru import logger
|
26 |
| -from functools import wraps |
| 25 | + |
| 26 | +from llamabot.bot.simplebot import SimpleBot |
| 27 | +from llamabot.components.messages import user |
| 28 | +from llamabot.components.sandbox import ScriptExecutor, ScriptMetadata |
| 29 | +from llamabot.prompt_manager import prompt |
27 | 30 |
|
28 | 31 |
|
29 | 32 | def tool(func: Callable) -> Callable:
|
@@ -241,7 +244,10 @@ def summarize_web_results(
|
241 | 244 | :param webpage_contents: The content of the webpage
|
242 | 245 | :return: The summarized content
|
243 | 246 | """
|
244 |
| - model_name = bot_kwargs.pop("model_name", "gpt-4.1-mini") |
| 247 | + default_model_name = os.getenv( |
| 248 | + "LMB_INTERNET_SUMMARIZER_MODEL_NAME", "ollama_chat/llama3.1:latest" |
| 249 | + ) |
| 250 | + model_name = bot_kwargs.pop("model_name", default_model_name) |
245 | 251 | stream_target = bot_kwargs.pop("stream_target", "none")
|
246 | 252 | system_prompt = bot_kwargs.pop("system_prompt", summarization_bot_system_prompt())
|
247 | 253 | bot = SimpleBot(
|
|
0 commit comments