@ansible/ansible-ai-connect-chatbot

中文文档
0.1.17发布于 2026/09/22TypeScriptESM + CJS构建来源已验证近 30 天下载 2641

To start building the "Chatbot" project, you're going to need:

原始使用文档
文档目录8 节
  1. Build from source
  2. Available Scripts
  3. npm start
  4. npm run build
  5. npm run test
  6. npm run coverage
  7. Test Chatbot in Local environment
  8. Releasing and publishing

Ansible AI Connect Chatbot UI

Build from source

To start building the "Chatbot" project, you're going to need:

  • node (18.20.0 was used for development)
  • npm (10.5.0 was used for development)

For installing dependencies, make sure that the current directory is the ansible_ai_connect_chatbot sub-directory first:

 cd (your_git_work_directory)/ansible-ai-connect-service/ansible_ai_connect_chatbot

and run

npm install

Available Scripts

npm start

Runs the app in the development mode. In the developing mode, the UI attempts to connect to the local chatbot service http://localhost:8080/v1/query. If you need to connect to a different URL, edit useChatbot.ts.

npm run build

Builds bundled javascript/css files.

The bundled javascript/css files are copied to ../ansible_ai_connect/main/static/chatbot and the index.html file is copied to ../ansible_ai_connect/main/templates/chatbot/.

npm run test

Executes unit tests.

npm run coverage

Executes unit tests with code coverage reports. The text version of the report is shown on the console, while the HTML version and the lcov.info file are saved in the coverage sub-directory.

Test Chatbot in Local environment

Chatbot is enabled when all of the following three parameters are defined:

  1. ModelPipelineChatBot.config.inference_url URL of the chat service to be used.
  2. ModelPipelineChatBot.config.model_id Default AI model. It should be one of models defined in the configuration used by the chat service.
  3. CHATBOT_DEFAULT_PROVIDER Default AI model provider. It should be one of providers defined in the configuration used by the chat service.
CHATBOT_DEFAULT_PROVIDER=wisdom
{
  "ModelPipelineChatBot": {
    "config": {
      "inference_url": "http://127.0.0.1:8080",
      "model_id": "granite-3.3-8b-instruct"
    }
  }
}

Releasing and publishing

Run the following GH workflows, in order:

1.- AAP Chatbot - Release It validates the package by running tests, if successful, creates a new Pull Request with the package information.

2.- AAP Chatbot - Publish Should be run just after releasing. It validates the package by running tests, if successful, it builds, assembles and publishes the new package version into npmjs.

NOTE: Split the whole process into two different workflows so it gives a bit more flexibility on how to release and when to publish. NOTE: Based on the npmjs guideline for publishing new packages.

版本与发布记录

@ansible/ansible-ai-connect-chatbot 共发布 18 个版本,首次发布于 2025/04/03;过去 12 个月发布了 11 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.17latest2026/09/221 个月前
0.1.162026/07/233 个月前
0.1.152026/07/074 个月前
0.1.142026/06/184 个月前
0.1.132026/05/295 个月前
0.1.122026/05/155 个月前

关于 @ansible/ansible-ai-connect-chatbot 的常见问题

@ansible/ansible-ai-connect-chatbot 是什么?

To start building the "Chatbot" project, you're going to need:

如何安装 @ansible/ansible-ai-connect-chatbot?

在项目目录运行 npm install @ansible/ansible-ai-connect-chatbot,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.3.1)、react-dom(^18.3.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@ansible/ansible-ai-connect-chatbot 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@ansible/ansible-ai-connect-chatbot 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@ansible/ansible-ai-connect-chatbot 可以商用吗?

@ansible/ansible-ai-connect-chatbot 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@ansible/ansible-ai-connect-chatbot 的下载量有多少?

根据 npm 官方下载统计,@ansible/ansible-ai-connect-chatbot 在 2026/10/06 – 2026/11/04 这 30 天内被下载 2,641 次,日均约 88 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ansible/ansible-ai-connect-chatbot 还在维护吗?

最新版本 0.1.17 发布于 2026/09/22(1 个月前);至今共发布 18 个版本,其中过去 12 个月发布了 11 个;首次发布于 2025/04/03。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。