gitmyhub

feishu-openai

Go ★ 5.6k updated 11mo ago

🎒 飞书 ×(GPT-4 + GPT-4V + DALL·E-3 + Whisper)= 飞一般的工作体验 🚀 语音对话、角色扮演、多话题讨论、图片创作、表格分析、文档导出 🚀

A self-hosted bot that brings OpenAI into the Feishu workplace chat app, letting employees ask questions, transcribe voice messages, analyze images, and generate images without leaving their work chat.

GoDockersetup: moderatecomplexity 3/5

This project connects Feishu (also known as Lark outside China, a workplace messaging app made by ByteDance) to OpenAI's models, turning the platform into a place where employees can chat with an AI assistant without leaving their existing work chat application.

Once deployed, the bot works inside both direct messages and group chats. Users can send text questions and get GPT-4 responses, send voice messages that Whisper transcribes before the AI answers, upload images for GPT-4V to analyze and discuss, or ask the bot to generate images from text descriptions using DALL-E-3. The bot tracks conversation context within a topic thread, so follow-up questions work naturally without restating the background each time.

A built-in set of role and scenario presets lets users switch the AI into different modes, such as a writing assistant or a creative brainstorming partner. There is also a load-balancing feature that rotates across multiple API keys, which is useful for teams with heavier usage.

Deployment is self-hosted. The README walks through several options: running it locally with a reverse proxy, deploying it to Alibaba Cloud serverless functions, using the Railway platform with a one-click template, running on Replit, or building a Docker image. Each method requires supplying a Feishu app ID and secret from the Feishu developer console along with one or more OpenAI API keys as environment variables.

The project is written in Go and has a commercial tier offered by the maintainer's company for teams that want a managed version with an admin panel, usage logs, and access controls. The open-source version here is the self-hosted option for those willing to handle their own infrastructure.

Where it fits