定制 survos/ai-chat-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

survos/ai-chat-bundle

Composer 安装命令:

composer require survos/ai-chat-bundle

包简介

Expose Symfony AI agents over an OpenAI-compatible /v1/chat/completions endpoint so chat platforms (e.g. Mattermost Agents) can @-mention them. The bundle owns transport/auth/routing; each app supplies a thin ChatAgentResolver. Ships an mm:post demo command over the Symfony Mattermost notifier. MCP

README 文档

README

Expose a Survos app's Symfony AI agents to chat platforms over an OpenAI-compatible endpoint, so a chat client (first: Mattermost via its Agents plugin) can @-mention them — no bot client, no chat UI to build. See PLAN.md.

@Curator …  →  Mattermost Agents plugin  →  POST {app}/v1/chat/completions  →  resolve persona → run agent → reply

The bundle owns the communications (OpenAI transport, auth, persona routing); each app supplies one thin ChatAgentResolverInterface. Comms first — this release ships the Mattermost wiring and an mm:post proof; the completions endpoint + agent wiring come next.

Install

composer require survos/ai-chat-bundle

Extends Survos\Kit\AbstractSurvosBundle; the mm:post command auto-registers.

Demo — prove the chat plumbing (mm:post)

The demo lives in demo/ — a tiny console app that posts to a Mattermost instance through the Symfony Mattermost notifier.

  1. Have a Mattermost over https. The notifier hardcodes https://, so it can't reach a plain-http local docker. Use the deployed server: https://chat.survos.com (the survos-sites/mattermost repo on Dokku).
  2. In Mattermost: create a bot (or personal access token) and grab the target channel id (the 26-char id in the channel URL, or via the API).
  3. Configure the demo:
    cd demo
    cp .env.example .env.local
    # set MATTERMOST_DSN=mattermost://<TOKEN>@chat.survos.com?channel=<CHANNEL_ID>
    composer install
  4. Post:
    bin/console mm:post "Hello, Mattermost!"
    bin/console mm:post "Hi there" <channel_id>     # override the default channel

A cooler demo (later): a TUI that posts and listens, instead of a one-shot post.

Roadmap

  • v1 (next): POST /v1/chat/completions controller + ChatAgentResolverInterface (non-streaming; symfony/ai ^0.10).
  • v2: MCP tools — watch symfony/ai#2237 (#[AsMcpApp] / #[AsMcpAppTool]); relates to survos/mcp-bundle.

See PLAN.md for the full design and decisions.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固