Skip to main content

Base package for myscalekb agent

Project description

MySaleKB Agent Plugin 使用指南

本使用指南重点介绍如何基于 MyScaleKB Agent Docker 运行环境载入 Plugin 代码。

如何载入 Plugin

MyScaleKB Agent Plugin(SubAgent) 代码的运行依赖于 MyScaleKB Agent Docker 环境。阅读 MyScale KB Agent 平台部署指南 以了解如何在本地部署完整的 MyScaleKB Agent 服务。

在此基础上,Plugin 代码使用 Docker Mount 的方式进行载入。

# 假设目录结构如下
# -- workspace
# ---- myscalekb-agent-plugin
# ---- myscalekb-deployment
cd workspace
git clone https://github.com/myscale/myscalekb-agent-plugin.git

# 以 myscalekb-deployment 为根目录操作 docker-compose
cd myscalekb-deployment

# 使用下面的命令 restart agent service (以 cpu yaml 为例)
docker-compose -f docker-compose-linux-cpu.yaml -v ../myscalekb-agent-plugin/myscalekb_agent_plugin:/app/myscalekb_agent_plugin up -d agent

查看日志

使用下面的命令来验证 Plugin SubAgent 是否正确载入:

docker-compose -f docker-compose-linux-cpu.yaml logs agent --since 10m | grep "PaperRecommendationAgent"

使用下面的命令来查看 Agent Workflow 的执行情况:

docker-compose -f docker-compose-linux-cpu.yaml logs agent --since 10m | grep "QueryTrace"

也可以通过 TraceId 来定位具体的一次请求执行情况,假设 TraceId 为 5dd78e08ae994ef898704052b84447b7a373

docker-compose -f docker-compose-linux-cpu.yaml logs agent --since 10m | grep -F "QueryTrace[5dd78e08ae994ef898704052b84447b7a373]"

如何开发 Plugin

MyScaleKB Agent Plugin 的介绍及开发流程请阅读 MyScaleKB Agent 二次开发用户指南

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myscalekb_agent_base-0.0.2.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

myscalekb_agent_base-0.0.2-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file myscalekb_agent_base-0.0.2.tar.gz.

File metadata

  • Download URL: myscalekb_agent_base-0.0.2.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.1

File hashes

Hashes for myscalekb_agent_base-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d666a532a087772724c7973115c63e72494f03594eedf6c4808ae5e6d336e880
MD5 d9c2ba5e94420da1860737a631ca8c48
BLAKE2b-256 ba07317c059b5821a8f2f997200a571b4c8d72a0ceca871fbe7d2b87db6765fc

See more details on using hashes here.

File details

Details for the file myscalekb_agent_base-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for myscalekb_agent_base-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e3531a44a6d7910b5230c60e1c89276a2baa08f35a3d334e89a334be5314a13a
MD5 3531068457754ff957385869dfb931be
BLAKE2b-256 38db20117b23231830f380fbaf21c698d7aa76d56bf1055a257194bfa5d408f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page