← Back to list

Integrate LangChain+LangServe App with Slack using PlugBear

This step-by-step guide helps you connect your custom LangChain+LangServe app to Slack using PlugBear.

Liam HwangLiam Hwang

Integrating your LangChain+LangServe app with Slack doesn't have to be complicated. With PlugBear, you can set up your custom LLM in just a few easy steps. Here's how to get started.

Step 1: Prepare LangServe App

First, ensure your LangServe application is up and running. In case you need to setup LangServe for your LangChain application, please refer to Integrate Your Custom LangChain Apps with Slack through PlugBear.

Note the path for your LangServe app. For example, the code below uses /chat as the path.

add_routes(
    app,
    ChatOpenAI(),
    path="/chat",
)

Step 2: Configure Your App in PlugBear

With your LangChain app running, you can now configure your app in PlugBear:

  1. In PlugBear, navigate to the "LLM apps" menu.
  2. Choose 'LangServe' as your app type.
  3. In the 'LangServe endpoint' field, enter your LagnServe URL (e.g. https://your.domain/chat).
  4. (Optional) In case you need to set up a secret header for your LangServe app, you can configure the 'Security Settings' with your secret header name and corresponding value.

Step 3: Connect to Slack and Interact with Your LangChain App

Now that your app is configured in PlugBear with the LangServe app. You can connect your LangChain app to your Slack workspace:

  1. In PlugBear, go to the 'Connections' page.
  2. Click the 'New Connection' button.
  3. Choose your Slack workspace, select the LangServe app you just configured, and click 'Create'. Create Connection
  4. Open your Slack workspace and start interacting with @PlugBear to test its functionality.

Enjoy LangChain+LangServe App in Slack

You're all set! Start having conversation with your LangChain app directly within Slack! 🎉

Slack example