WebSurferTool
fastagency.runtimes.autogen.tools.WebSurferTool #
WebSurferTool(
*,
name_prefix: str,
llm_config: dict[str, Any],
summarizer_llm_config: dict[str, Any],
viewport_size: int = 4096,
bing_api_key: Optional[str] = None,
max_consecutive_auto_reply: int = 30,
max_links_to_click: int = 10,
websurfer_kwargs: Optional[dict[str, Any]] = None,
assistant_kwargs: Optional[dict[str, Any]] = None
)
Create a new WebSurferChat instance.
PARAMETER | DESCRIPTION |
---|---|
name_prefix | The name prefix of the inner AutoGen agents TYPE: |
llm_config | The LLM configuration |
summarizer_llm_config | The summarizer LLM configuration |
viewport_size | The viewport size. Defaults to 4096. TYPE: |
bing_api_key | The Bing API key. Defaults to None. |
max_consecutive_auto_reply | The maximum consecutive auto reply. Defaults to 30. TYPE: |
max_links_to_click | The maximum links to click. Defaults to 10. TYPE: |
websurfer_kwargs | The WebSurfer kwargs. Defaults to None. |
assistant_kwargs | The Assistant kwargs. Defaults to None. |
Source code in fastagency/runtimes/autogen/tools/websurfer.py
assistant instance-attribute
#
assistant = AssistantAgent(
name=f"{name_prefix}_inner_assistant",
llm_config=llm_config,
human_input_mode="NEVER",
system_message=system_message,
max_consecutive_auto_reply=max_consecutive_auto_reply,
**assistant_kwargs,
)
browser_config instance-attribute
#
browser_config = {
"viewport_size": viewport_size,
"bing_api_key": bing_api_key,
"request_kwargs": {
"headers": {
"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"
}
},
}
max_consecutive_auto_reply instance-attribute
#
max_consecutive_auto_reply = max_consecutive_auto_reply
websurfer instance-attribute
#
websurfer = WebSurferAgent(
name=f"{name_prefix}_inner_websurfer",
llm_config=llm_config,
summarizer_llm_config=summarizer_llm_config,
browser_config=browser_config,
human_input_mode="NEVER",
is_termination_msg=is_termination_msg,
**websurfer_kwargs,
)
continue_task_with_additional_instructions #
Source code in fastagency/runtimes/autogen/tools/websurfer.py
create_final_reply #
create_final_reply(
task: str, message: WebSurferAnswer
) -> str
Source code in fastagency/runtimes/autogen/tools/websurfer.py
create_new_task #
Source code in fastagency/runtimes/autogen/tools/websurfer.py
is_termination_msg #
Source code in fastagency/runtimes/autogen/tools/websurfer.py
register #
register(
*,
caller: ConversableAgent,
executor: Union[
ConversableAgent, list[ConversableAgent]
]
) -> None