Skip to content

Hermes本地接入MaaS ​

Hermes配置 ​

安装Hermes Agent ​

  • Linux/macOS
    1. 执行如下命令安装Hermes Agent。
      Bash
      curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
    2. 执行如下命令加载shell。
      Bash
      source ~/.bashrc    # 重新加载 shell(或: source ~/.zshrc)
  • Windows
    1. 在PowerShell中运行如下命令安装Hermes Agent。
      PowerShell
      iex (irm https://hermes-agent.nousresearch.com/install.ps1)
    2. 安装完成后,需要重启终端。

配置Hermes Agent连接Maas ​

  1. 在PowerShell中输入hermes model,选择32. Custom endpoint (enter URL manually)

  2. 输入API base URL :https://maas.yicloud.com/v1

    Image

  3. 输入API key。

    API key为模型中心 > 模型推理 > API KEY页面获取。

    Image

  4. 选择API compatibility mode:1. Auto-detect

    Image

  5. 选择你想要使用的模型。 可以随时通过 hermes model切换model。

    Image

  6. 上下文长度与展示名称可直接回车。

    Image

  7. Hermes Agent连接Maas配置完成后,可在PowerShell中输入hermes启动hermes。

接入消息平台 ​

本文以飞书/Lark操作为例。

  1. 在PowerShell中输入hermes gateway setup,选择 10. Feishu / Lark

    Image

  2. 选择 1. Scan QR code to create a new bot automatically。 Image

  3. 单击链接进入网页设置页面,单击立即创建完成设置。

    Image

  4. 返回PowerShell继续进行如下图配置。

    Image

    Image

    Image

  5. 配置完成后打开 Hermes 配置文件:

    PowerShell
    notepad C:\Users\liujw\AppData\Local\hermes\.env

    将FEISHU_ALLOW_ALL_USERS的参数值修改为true。

    Plain
    FEISHU_ALLOW_ALL_USERS=true
  6. 在 PowerShell 中输入 hermes gateway 启动 Gateway。

    Image

  7. 接下来即可回到飞书使用智能助手。

    Image