explaingit

connectai-e/feishu-openai

5,645GoAudience · ops devopsComplexity · 3/5Setup · moderate

TLDR

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.

Mindmap

mindmap
  root((repo))
    Capabilities
      Text chat
      Voice transcription
      Image analysis
      Image generation
    Deployment options
      Docker
      Railway
      Alibaba Cloud
      Replit
    Configuration
      Feishu app credentials
      OpenAI API keys
      Multi-key load balancing
    Audience
      DevOps teams
      Company admins
      Self-hosters
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Deploy an AI assistant inside your company's Feishu workspace so employees can ask questions in direct messages or group chats.

USE CASE 2

Let team members send voice messages to the bot and get GPT-powered answers after automatic transcription.

USE CASE 3

Enable image generation so users can type a description and receive a DALL-E-3 image in the chat.

USE CASE 4

Rotate across multiple OpenAI API keys automatically to stay under rate limits for a team with heavy usage.

Tech stack

GoDocker

Getting it running

Difficulty · moderate Time to first run · 1h+

Requires creating a Feishu developer app with correct permissions and supplying one or more OpenAI API keys as environment variables.

License terms not specified in the explanation.

In plain English

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.

Copy-paste prompts

Prompt 1
Walk me through deploying the feishu-openai bot to a Docker container. What environment variables do I need to set for the Feishu app credentials and OpenAI API key?
Prompt 2
How do I configure feishu-openai to use multiple OpenAI API keys so the bot load-balances requests across them?
Prompt 3
I want to deploy feishu-openai to Railway using the one-click template. What do I need to prepare in the Feishu developer console before I start?
Prompt 4
How does the conversation context work in feishu-openai? Does it maintain history per thread, per user, or per group chat?
Open on GitHub → Explain another repo

← connectai-e on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.