跳至内容

Multion

Multion工具规范 #

基类: BaseToolSpec

Multion工具规范。

Source code in llama-index-integrations/tools/llama-index-tools-multion/llama_index/tools/multion/base.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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(cmd: str)

使用Multion浏览网页 Multion赋予LLM通过自然语言指令控制网页浏览器的能力。

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

参数:

名称 类型 描述 默认值
cmd str

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

required
Source code in llama-index-integrations/tools/llama-index-tools-multion/llama_index/tools/multion/base.py
17
18
19
20
21
22
23
24
25
26
27
28
29
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)
优云智算