明天即将飞升,推荐佬们一个开源项目-面向多平台对话场景的opencode适配器,聊天方式使用opencode,目前支持tg,discard,飞书

本帖使用社区开源推广,符合推广要求。我申明并遵循社区要求的以下内容: 我的帖子已经打上 开源推广 标签: 是 我的开源项目完整开源,无未开源部分: 是 我的开源项目已链接认可 LINUX DO 社区: 是 我帖子内的项目介绍,AI生成、润色内容部分已截图发出: 是 以上选择我承诺是永久有效的,接受社...
明天即将飞升,推荐佬们一个开源项目-面向多平台对话场景的opencode适配器,聊天方式使用opencode,目前支持tg,discard,飞书
明天即将飞升,推荐佬们一个开源项目-面向多平台对话场景的opencode适配器,聊天方式使用opencode,目前支持tg,discard,飞书
本帖使用社区开源推广,符合推广要求。我申明并遵循社区要求的以下内容:
  • 我的帖子已经打上 开源推广 标签:
  • 我的开源项目完整开源,无未开源部分:
  • 我的开源项目已链接认可 LINUX DO 社区:
  • 我帖子内的项目介绍,AI生成、润色内容部分已截图发出:
  • 以上选择我承诺是永久有效的,接受社区和佬友监督:

以下为项目介绍正文内容,AI生成、润色内容已使用截图方式发出


项目介绍:

opencode-channel-adapters 是一个面向多平台对话场景的开源适配器项目,目标是把 opencode 的能力无缝连接到 Telegram、Discord 和飞书/Lark 等常见沟通渠道中。它提供统一的运行时、配置体系和会话管理机制,让开发者无需为每个平台重复造轮子,就能快速把 AI 对话能力接入现有群组、机器人或团队协作流程。
相比零散地为单个平台单独开发机器人,这个项目更强调“统一接入、统一配置、统一维护”。你既可以直接通过已发布的 npm 包快速启动某一个适配器,也可以基于 @opencode-channel/core 进行二次开发,扩展出更符合自身业务需求的接入方式。对于想把 AI 能力真正落到实际沟通场景中的开发者和团队来说,它提供了一条更轻量、更清晰、也更易扩展的落地路径。

项目地址:

github.com

GitHub - silent-night-no-trace/opencode-channel-adapters

通过在 GitHub 上创建帐户来为 silent-night-no-trace/opencode-channel-adapters 开发做出贡献。

项目使用:

Telegram quick start

This is the shortest complete path for a new Telegram bot.

1. Start opencode

Run this in terminal 1:

opencode serve --hostname 127.0.0.1 --port 4096

Use an explicit port. opencode serve can otherwise choose a random port, which makes adapter configuration harder.

2. Create a Telegram bot

In Telegram:

  1. Open @BotFather.
  2. Send /newbot.
  3. Copy the bot token. It looks like 123456:bot-token.
  4. Send one message to the new bot so Telegram creates an update for it.

3. Set environment variables

Run this in terminal 2.

macOS/Linux:

export TELEGRAM_BOT_TOKEN=“123456:bot-token” export OPENCODE_BASE_URL=“http://127.0.0.1:4096

PowerShell:

$env:TELEGRAM_BOT_TOKEN = “123456:bot-token” $env:OPENCODE_BASE_URL = “http://127.0.0.1:4096

If your opencode server requires Basic auth, also set OPENCODE_PASSWORD in the same shell.

4. Validate config

opencode-channel-telegram --check-config

5. Clear Telegram webhook mode

Telegram bots cannot use webhook delivery and polling at the same time. This command is safe for a new bot too.

opencode-channel-telegram --delete-webhook

6. Start polling

opencode-channel-telegram

Keep terminal 1 and terminal 2 open. Send a message to your Telegram bot. The adapter forwards that message to opencode and sends the opencode response back to Telegram

新项目逐步完善中,望各位佬多多使用,提出意见 :grin:

1 个帖子 - 1 位参与者

阅读完整话题

来源: LinuxDo 最新话题查看原文