JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 26521
  • Score
    100M100P100Q159973F

Lobe Chat Plugin Market

Package Exports

  • @lobehub/chat-plugins-gateway
  • @lobehub/chat-plugins-gateway/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@lobehub/chat-plugins-gateway) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

LobeChat Plugins Gateway

English | 简体中文

Plugin Gateway Service for Lobe Chat and Lobe Web

Changelog · Report Bug · Request Feature

plugin release releaseDate ciTest ciRelease
contributors forks stargazers issues

Table of contents

TOC

👋 Intro

LobeChat Plugins Gateway is a backend service that provides a gateway for LobeChat plugins. We use vercel to deploy this service. The main API POST /api/v1/runner is deployed as an Edge Function.

The gateway service fetches lobe plugins index from the LobeChat Plugins, if you want to add your plugin to the index, please submit a PR to the LobeChat Plugins repository.

🤯 Usage

Base URLs:

Environment URL
PROD https://chat-plugins.lobehub.com
DEV https://chat-plugins-dev.lobehub.com

POST Plugin Gateway

POST /api/v1/runner

Interface to communicate with the LobeChat plugin. This interface describes how to use the LobeChat plugin gateway API to send requests and get responses

Body Request Parameters

{
  "arguments": "{\n  \"city\": \"杭州\"\n}",
  "name": "realtimeWeather"
}

Response

[
  {
    "city": "杭州市",
    "adcode": "330100",
    "province": "浙江",
    "reporttime": "2023-08-17 23:32:22",
    "casts": [
      {
        "date": "2023-08-17",
        "week": "4",
        "dayweather": "小雨",
        "nightweather": "小雨",
        "daytemp": "33",
        "nighttemp": "24",
        "daywind": "东",
        "nightwind": "东",
        "daypower": "≤3",
        "nightpower": "≤3",
        "daytemp_float": "33.0",
        "nighttemp_float": "24.0"
      },
      {
        "date": "2023-08-18",
        "week": "5",
        "dayweather": "小雨",
        "nightweather": "小雨",
        "daytemp": "32",
        "nighttemp": "23",
        "daywind": "东北",
        "nightwind": "东北",
        "daypower": "4",
        "nightpower": "4",
        "daytemp_float": "32.0",
        "nighttemp_float": "23.0"
      },
      {
        "date": "2023-08-19",
        "week": "6",
        "dayweather": "小雨",
        "nightweather": "雷阵雨",
        "daytemp": "32",
        "nighttemp": "24",
        "daywind": "东",
        "nightwind": "东",
        "daypower": "4",
        "nightpower": "4",
        "daytemp_float": "32.0",
        "nighttemp_float": "24.0"
      },
      {
        "date": "2023-08-20",
        "week": "7",
        "dayweather": "雷阵雨",
        "nightweather": "多云",
        "daytemp": "33",
        "nighttemp": "25",
        "daywind": "东",
        "nightwind": "东",
        "daypower": "≤3",
        "nightpower": "≤3",
        "daytemp_float": "33.0",
        "nighttemp_float": "25.0"
      }
    ]
  }
]

See API Document for more information.

🛳 Self Hosting

If you want to deploy this service by yourself, you can follow the steps below.

Deploy to Vercel

Click button below to deploy your private plugins' gateway.

Deploy with Vercel

If you want to make some customization, you can add environment variable:

  • PLUGINS_INDEX_URL: You can change the default plugins index url as your need.

⌨️ Local Development

You can use Gitpod for online development:

Open in Gitpod

Or clone it for local development:

$ git clone https://github.com/lobehub/chat-plugins-gateway.git
$ pnpm install
$ pnpm start

🤝 Contributing

📊 Total: 2


📝 License

Copyright © 2023 LobeHub.
This project is MIT licensed.