Home

Awesome

<p align='center'> <a href='https://www.connectai-e.com' target="_blank" rel="noopener noreferrer"> <img src='https://github-production-user-asset-6210df.s3.amazonaws.com/50035229/243593939-421327a5-1cf1-46ad-93b1-15c9c9d36490.png' alt='' width='800'/> </a> </p> <details align='center'> <summary> 📷 Click to expand the full function of Connect-AI</summary> <br> <p align='center'> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/50035229/b993c610-1c91-40dd-bdcd-85a992c17b74' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/50035229/149f5fda-3fc4-49fa-8132-4825edfece1f' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/50035229/7dae5661-2d4c-4584-934c-747a8c68d3e9' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/50035229/942ffb30-fb48-4de4-a696-e0903a691665' alt='' width='800'/> </p> </details> <br> <p align='center'> Lark ×(GPT-4 + DALL·E + Whisper) <br> <br> 🚀 Lark OpenAI 🚀 </p> <p align='center'> www.connectai-e.com </p> <strong align="center"> <samp>

English · 简体中文· 繁體中文 · 日本語 · Tiếng Việt

</samp> </strong>

👻 Feature

🗣Voice Communication: Private Direct Says with Robots

💬Multi-topic dialogue: support private and group chat multi-topic discussion, efficient and coherent

🖼Text graph: supports text graph and graph search

🛖Scene preset: built-in rich scene list, one-click switch AI role

🎭Role play: Support scene mode, add fun and creative discussion

🤖AI mode: Built-in 4 AI modes, feel the wisdom and creativity of AI

🔄Context preservation: reply dialog to continue the same topic discussion

⏰Automatic end: timeout automatically end the dialogue, support to clear the discussion history

📝Rich text card: support rich text card reply, more colorful information

👍Interactive Feedback: Instant access to robot processing results

🎰Balance query: obtain token consumption in real time

🔙History Back to File: Easily Back to File History Dialogue and Continue Topic Discussion🚧

🔒Administrator mode: built-in administrator mode, use more secure and reliable🚧

🌐Multi-token load balancing: Optimizing high-frequency call scenarios at the production level

↩️ Support reverse proxy: provide faster and more stable access experience for users in different regions

📚Interact with Flying Book Documents: Become a Super Assistant for Enterprise Employees🚧

🎥Topic Content Seconds to PPT: Make Your Report Simpler from Now on🚧

📊Table Analysis: Easily import flying book tables to improve data analysis efficiency🚧

🍊Private data training: use the company's product information for GPT secondary training to better meet the individual needs of customers.🚧

🌟 Base

🛵 Development

<details> <summary>Run On Replit</summary> <br>

The fastest way to deploy the lark-openai to repl.it is to click the button below.

<a href="https://replit.com/@Leizhenpeng/Lark-OpenAI?v=1"> <img alt="Run on Repl.it" src="https://repl.it/badge/github/alist-org/alist-replit" style="height: 40px; width: 190px;" /> </a>

Remember switch to secrets tab then edit System environment variables.You can also edit raw json:

{
  "BOT_NAME": "Lark-OpenAI",
  "APP_ID": "",
  "APP_SECRET": "",
  "APP_ENCRYPT_KEY": "",
  "APP_VERIFICATION_TOKEN": "",
  "OPENAI_KEY": "sk-xx",
  "OPENAI_MODEL": "gpt-3.5-turbo",
  "APP_LANG": "en"
}

Final callback addresses are

https://YOUR_ADDRESS.repl.co/webhook/event
https://YOUR_ADDRESS.repl.co/webhook/card
<br> </details> <details> <summary>Local Development</summary> <br>
git clone git@github.com:ConnectAI-E/lark-openai.git
cd Lark-OpenAI/code

If your server does not have a public network IP, you can use a reverse proxy.

The server of Flying Book is very slow to access ngrok in China, so it is recommended to use some domestic reverse proxy service providers.

# Configure config.yaml
mv config.example.yaml config.yaml

// Testing deployment.
go run ./
cpolar http 9000

//Production deployment
nohup cpolar http 9000 -log=stdout &

//Check server status
https://dashboard.cpolar.com/status

// Take down the service
ps -ef | grep cpolar
kill -9 PID
<br> </details> <details> <summary>Serverless Development</summary> <br>
git clone git@github.com:ConnectAI/lark-openai.git
cd Lark-OpenAI/code

install severlesstool

# Configure config.yaml
mv config.example.yaml config.yaml
# install severless cli
npm install @serverless-devs/s -g

After the installation is complete, please deploy according to your local environment and the following tutorialseverless

  1. Modify the Deployment Region and Deployment Key in 's.yaml'
edition: 1.0.0
name: lark-openai
access: "aliyun" #  Modify the custom key name.

vars: # Global variables
region: "cn-hongkong" # Modify the region where the cloud function wants to be deployed.

  1. One-click deployment
cd ..
s deploy
  1. First open the local cmd command prompt tool, run go env to check the go environment variable settings on your computer, confirm the following variables and values
set GO111MODULE=on
set GOARCH=amd64
set GOOS=linux
set CGO_ENABLED=0

If the value is incorrect, such as set GOOS=windows on your computer, please run the following command to set the GOOS variable value

go env -w GOOS=linux
  1. Modify the deployment region and deployment key in s.yaml
edition: 1.0.0
name: lark-openai
access: "aliyun" #  Modify the custom key alias

vars: # Global variables
  region: "ap-southeast-1" # Modify the desired deployment region for the cloud functions

  1. Modify pre-deploy in s.yaml, remove the ring variable change part before the second step run
  pre-deploy:
        - run: go mod tidy
          path: ./code
        - run: go build -o
            target/main main.go  # del GO111MODULE=on GOOS=linux GOARCH=amd64 CGO_ENABLED=0
          path: ./code

  1. One-click deployment
cd ..
s deploy
<br> </details> <details> <summary>Railway Deployment </summary>

Just configure environment variables on the platform. The process of deploying this project is as follows:

1. Generate the Railway project

Click the button below to create a corresponding Railway project, which will automatically fork this project to your GitHub account.

Deploy on Railway

2. Generate the Railway project

In the opened page, configure the environment variables. The description of each variable is shown in the figure below:

<img src='https://user-images.githubusercontent.com/50035229/225005602-88d8678f-9d17-4dc5-8d1e-4abf64fb84fd.png' alt='Railway 环境变量' width='500px'/>

3. deployment project

After filling in the environment variables, click Deploy to complete the deployment of the project. After the deployment is complete, you need to obtain the corresponding domain name for the Feishu robot to access, as shown in the following figure:

<img src='https://user-images.githubusercontent.com/50035229/225006236-57cb3c8a-1b7d-4bfe-9c9b-099cb9179027.png' alt='Railway 域名' width='500px'/>

Uncertainty about success or failure of self-determination,can be passed through the above mentioned area name (https://xxxxxxxx.railway.app/ping)

,The result returned pong,The description department succeeded.。

</details> <details> <summary>Docker Development</summary> <br>
docker build -t lark-openai:latest .
docker run -d --name lark-openai -p 9000:9000 \
--env APP_LANG=en \
--env APP_ID=xxx \
--env APP_SECRET=xxx \
--env APP_ENCRYPT_KEY=xxx \
--env APP_VERIFICATION_TOKEN=xxx \
--env BOT_NAME=chatGpt \
--env OPENAI_KEY="sk-xxx1,sk-xxx2,sk-xxx3" \
--env API_URL="https://api.openai.com" \
--env HTTP_PROXY="" \
feishu-chatgpt:latest

Attention:


To deploy the Azure version

docker build -t lark-openai:latest .
docker run -d --name lark-openai -p 9000:9000 \
--env APP_LANG=en \
--env APP_ID=xxx \
--env APP_SECRET=xxx \
--env APP_ENCRYPT_KEY=xxx \
--env APP_VERIFICATION_TOKEN=xxx \
--env BOT_NAME=chatGpt \
--env AZURE_ON=true \
--env AZURE_API_VERSION=xxx \
--env AZURE_RESOURCE_NAME=xxx \
--env AZURE_DEPLOYMENT_NAME=xxx \
--env AZURE_OPENAI_TOKEN=xxx \
feishu-chatgpt:latest

Attention:

</details> <details> <summary>Docker-Compose Development</summary> <br>

Edit docker-compose.yaml, configure the corresponding environment variable through environment (or mount the corresponding configuration file through volumes), and then run the following command

# Build the image
docker compose build

# Start the service
docker compose up -d

# Stop the service
docker compose down

Event callback address: http://IP:9000/webhook/event

Card callback address: http://IP:9000/webhook/card

</details>

Detailed configuration steps

<details align='left'> <summary> 📸 Click to expand the step-by-step screenshot guide for lark robot configuration</summary> <br> <p align='center'> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/a2bf0588-0fff-48a7-a253-25d237c37f0e' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/60b9dc76-3117-42c0-8086-6d5938161127' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/1f46d819-a063-42fd-bf28-6d31086e1912' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/47057139-1e09-48da-97ff-86f9021182f0' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/91dc1b09-664e-4dea-b6b8-ca7a656d1ac4' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/272bb80c-b9aa-49e2-9411-c0357ca03fe8' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/aed03155-22cd-446a-96d8-54cfd95e04fb' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/8f306e96-8767-480f-858f-41623038dbd2' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/b9a6d27f-f225-4d02-8b05-b8ab4dd55fa5' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/b2fbe22f-4920-4628-b673-011d036ae4fb' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/607db6b7-07d2-4307-9ded-9e959bd15fcf' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/fd8eded1-d248-4552-94d2-21e983d24dcd' alt='' width='800'/> <img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/4d7b0a16-2871-4472-bd78-78d3989c050d' alt='' width='800'/> </p> </details>
  1. Publish the version and wait for the approval of the enterprise administrator

Community

If you encounter problems, you can join the Lark group to communicate~

<img src='https://github.com/ConnectAI-E/Lark-OpenAI/assets/110169811/060947ba-f6a2-4425-9075-98b10abdc10e' alt='' width='300'/>

Connect-AI More

<div style="width:200px">AI</div><img width=120> SDK <img width=120>Application
🎒OpenAIGo-OpenAI🏅Feishu-OpenAI, 🎖Lark-OpenAI, Feishu-EX-ChatGPT, 🎖Feishu-OpenAI-Stream-Chatbot, Feishu-TLDR,Feishu-OpenAI-Amazing, Feishu-Oral-Friend, Feishu-OpenAI-Base-Helper, Feishu-Vector-Knowledge-Management, Feishu-OpenAI-PDF-Helper, 🏅Dingtalk-OpenAI, Wework-OpenAI, WeWork-OpenAI-Node, llmplugin
🤖 AutoGPT------🏅AutoGPT-Next-Web
🎭 Stablediffusion------🎖Feishu-Stablediffusion
🍎 MidjourneyGo-Midjourney🏅Feishu-Midjourney, 🔥MidJourney-Web, Dingtalk-Midjourney
🍍 文心一言Go-WenxinFeishu-Wenxin, Dingtalk-Wenxin, Wework-Wenxin
💸 MinimaxGo-MinimaxFeishu-Minimax, Dingtalk-Minimax, Wework-Minimax
⛳️ CLAUDEGo-ClaudeFeishu-Claude, DingTalk-Claude, Wework-Claude
🥁 PaLMGo-PaLMFeishu-PaLM,DingTalk-PaLM,Wework-PaLM
🎡 Prompt------📖 Prompt-Engineering-Tutior
🍋 ChatGLM------Feishu-ChatGLM
⛓ LangChain------📖 LangChain-Tutior
🪄 One-click------🎖Awesome-One-Click-Deployment