跳到内容

Multion

MultionToolSpec #

基类: BaseToolSpec

Multion 工具规范。

源代码位于 llama-index-integrations/tools/llama-index-tools-multion/llama_index/tools/multion/base.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class MultionToolSpec(BaseToolSpec):
    """Multion tool spec."""

    spec_functions = ["browse"]

    def __init__(self, api_key: str) -> None:
        """Initialize with parameters."""
        from multion.client import MultiOn

        self.multion = MultiOn(api_key=api_key)

    def browse(self, cmd: str):
        """
        Browse the web using Multion
        Multion gives the ability for LLMs to control web browsers using natural language instructions.

        You may have to repeat the instruction through multiple steps or update your instruction to get to
        the final desired state. If the status is 'CONTINUE', reissue the same instruction to continue execution

        Args:
            cmd (str): The detailed and specific natural language instructrion for web browsing

        """
        return self.multion.browse(cmd=cmd, local=True)

browse #

browse(cmd: str)

使用 Multion 浏览网页 Multion 使 LLM 能够使用自然语言指令控制网页浏览器。

您可能需要通过多个步骤重复指令或更新指令以达到最终期望的状态。如果状态是“CONTINUE”,请重新发出相同的指令以继续执行。

参数

名称 类型 描述 默认值
cmd str

用于网页浏览的详细且具体的自然语言指令

必需
源代码位于 llama-index-integrations/tools/llama-index-tools-multion/llama_index/tools/multion/base.py
16
17
18
19
20
21
22
23
24
25
26
27
28
def browse(self, cmd: str):
    """
    Browse the web using Multion
    Multion gives the ability for LLMs to control web browsers using natural language instructions.

    You may have to repeat the instruction through multiple steps or update your instruction to get to
    the final desired state. If the status is 'CONTINUE', reissue the same instruction to continue execution

    Args:
        cmd (str): The detailed and specific natural language instructrion for web browsing

    """
    return self.multion.browse(cmd=cmd, local=True)