-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b396c60
commit 466f63a
Showing
6 changed files
with
62 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/fastagency/runtime/autogen/agent/websurfer/WebSurferAgent.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: fastagency.runtime.autogen.agent.websurfer.WebSurferAgent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from typing import Any, Union | ||
|
||
from autogen import AssistantAgent, ConversableAgent | ||
|
||
from ..tools import WebSurferTool | ||
|
||
|
||
class WebSurferAgent(AssistantAgent): # type: ignore[misc] | ||
def __init__( | ||
self, | ||
*args: Any, | ||
name: str, | ||
llm_config: dict[str, Any], | ||
summarizer_llm_config: dict[str, Any], | ||
executor: Union[ConversableAgent, list[ConversableAgent]], | ||
system_message: str = "You are a web surfer", | ||
**kwargs: Any, | ||
): | ||
"""Initialize the WebSurferAgent. | ||
Args: | ||
*args (Any): The positional arguments. | ||
name (str): The name of the agent. | ||
llm_config (dict[str, Any]): The LLM configuration. | ||
summarizer_llm_config (dict[str, Any]): The summarizer LLM configuration. | ||
executor (Union[ConversableAgent, list[ConversableAgent]]): The executor agent(s). | ||
system_message (str): The system message. | ||
**kwargs (Any): The keyword arguments. | ||
""" | ||
super().__init__( | ||
*args, | ||
name=name, | ||
system_message=system_message, | ||
llm_config=llm_config, | ||
**kwargs, | ||
) | ||
self.web_surfer_tool = WebSurferTool( | ||
name_prefix="Web_Surfer", | ||
llm_config=llm_config, | ||
summarizer_llm_config=summarizer_llm_config, | ||
) | ||
self.web_surfer_tool.register(caller=self, executor=executor) |