Détail du package

@lobehub/chat-plugin-sdk

lobehub74.4kMIT1.32.4

Lobe Chat Plugin SDK, help you to build an amazing chat plugin for Lobe Chat

lobehub, sdk, chatgpt, openai

readme

Chat Plugin SDK

SDK for LobeChat funciton calling plugins
Changelog · Report Bug · Request Feature
<summary><kbd>Table of contents</kbd></summary> #### TOC - 🤯 Usage - 📦 Plugin Ecosystem - ⌨️ Local Development - 🤝 Contributing - 🔗 Links ####

🤯 Usage

The LobeChat Plugin SDK assists you in creating exceptional chat plugins for Lobe Chat.

[!Important] 📘 SDK Document - https://chat-plugin-sdk.lobehub.com

📦 Plugin Ecosystem

Plugins provide a means to extend the Function Calling capabilities of LobeChat. They can be used to introduce new function calls and even new ways to render message results. If you are interested in plugin development, please refer to our 📘 Plugin Development Guide in the Wiki.

  • lobe-chat-plugins: This is the plugin index for LobeChat. It accesses index.json from this repository to display a list of available plugins for LobeChat to the user.
  • chat-plugin-template: This is the plugin template for LobeChat plugin development.
  • @lobehub/chat-plugin-sdk: The LobeChat Plugin SDK assists you in creating exceptional chat plugins for Lobe Chat.
  • @lobehub/chat-plugins-gateway: The LobeChat Plugins Gateway is a backend service that provides a gateway for LobeChat plugins. We deploy this service using Vercel. The primary API POST /api/v1/runner is deployed as an Edge Function.

⌨️ Local Development

You can use Github Codespaces for online development:

Or clone it for local development:

$ git clone https://github.com/lobehub/chat-plugin-sdk.git
$ cd chat-plugin-sdk
$ bun install
$ bun dev

🤝 Contributing

Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub Issues to get stuck in to show us what you’re made of.

🔗 Links

  • 🤖 Lobe Chat - An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application.
  • 🧩 / 🏪 Plugin Index - This is the plugin index for LobeChat. It accesses index.json from this repository to display a list of available plugins for Function Calling to the user.

📝 License

Copyright © 2023 LobeHub.
This project is MIT licensed.

changelog

Changelog

Version 1.32.4

Released on 2024-06-30

🐛 Bug Fixes

  • misc: Ensure request body properties are defined.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Ensure request body properties are defined, closes #43 (933b53c)

Version 1.32.3

Released on 2024-01-26

🐛 Bug Fixes

  • misc: Fix setPluginMessage types.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix setPluginMessage types (39b4c9a)

Version 1.32.2

Released on 2024-01-17

🐛 Bug Fixes

  • misc: Fix can not setPluginMessage without trigger ai message.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix can not setPluginMessage without trigger ai message (8598b5f)

Version 1.32.1

Released on 2024-01-10

🐛 Bug Fixes

  • misc: Resolve undefined when plugin is not in LobeChat.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Resolve undefined when plugin is not in LobeChat (53e36c1)

Version 1.32.0

Released on 2023-12-29

✨ Features

  • misc: Support triggerAIMessage and createAssistantMessage.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Support triggerAIMessage and createAssistantMessage (54a14b4)

Version 1.31.0

Released on 2023-12-29

✨ Features

  • misc: Support markdown type plugin.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Support markdown type plugin (ac370aa)

Version 1.30.4

Released on 2023-12-16

🐛 Bug Fixes

  • misc: Improve model systemRole.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Improve model systemRole (67023ce)

Version 1.30.3

Released on 2023-12-16

🐛 Bug Fixes

  • misc: Fix plugin meta schema.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix plugin meta schema (5d0821d)

Version 1.30.2

Released on 2023-12-15

🐛 Bug Fixes

  • misc: Fix schema required.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix schema required (0308c5b)

Version 1.30.1

Released on 2023-12-15

🐛 Bug Fixes

  • misc: Fix openapi export entry, fix openapi export entry, fix openapi export entry, fix openapi request body problem.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix openapi export entry (1bd9d28) - misc: Fix openapi export entry (b383cfc) - misc: Fix openapi export entry (9b9c1f6) - misc: Fix openapi request body problem (4aa19ef)

Version 1.30.0

Released on 2023-12-15

✨ Features

  • misc: Support openapi convertor.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Support openapi convertor (9a8cfcc)

Version 1.29.1

Released on 2023-12-15

🐛 Bug Fixes

  • misc: Improve pluginSchema types.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Improve pluginSchema types (5d74726)

Version 1.29.0

Released on 2023-12-13

✨ Features

  • misc: Support getPluginSettingsFromHeaders.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Support getPluginSettingsFromHeaders (e2b0b55)

Version 1.28.0

Released on 2023-12-13

✨ Features

  • misc: Export error type.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Export error type (6e31c87)

Version 1.27.0

Released on 2023-12-12

✨ Features

  • misc: Support more error type.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Support more error type (bdcffbf)

Version 1.26.0

Released on 2023-12-03

✨ Features

  • misc: Add basic info to plugin manifest types.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Add basic info to plugin manifest types (e795600)

Version 1.25.0

Released on 2023-12-02

✨ Features

  • misc: Add basic info to plugin manifest.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Add basic info to plugin manifest (b50978e)

Version 1.24.0

Released on 2023-11-22

✨ Features

  • misc: Get the plugin state and settings with fetchPluginPayload method.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Get the plugin state and settings with fetchPluginPayload method (77aca82)

Version 1.23.2

Released on 2023-11-21

🐛 Bug Fixes

  • misc: Fix compatible with ssr.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix compatible with ssr (2337060)

Version 1.23.1

Released on 2023-11-20

🐛 Bug Fixes

  • misc: Fix compatible with ssr.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix compatible with ssr (e276fc8)

Version 1.23.0

Released on 2023-11-16

✨ Features

  • misc: Add json schema definition of manifest.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Add json schema definition of manifest, closes #35 (8032ce8)

Version 1.22.0

Released on 2023-11-06

✨ Features

  • misc: Add set methods to lobeChat.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Add set methods to lobeChat (6756f67)

Version 1.21.0

Released on 2023-11-06

✨ Features

  • misc: Support fetch plugin payload and add a lobeChat client class.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Support fetch plugin payload and add a lobeChat client class (6cb8978)

Version 1.20.1

Released on 2023-10-24

🐛 Bug Fixes

  • misc: 修正 standalone 模式下的 manifest 类型问题.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: 修正 standalone 模式下的 manifest 类型问题 (a1979db)

Version 1.20.0

Released on 2023-10-24

✨ Features

  • misc: Support plugin settings.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Support plugin settings (3a9553f)

Version 1.19.0

Released on 2023-10-24

✨ Features

  • misc: Add usePluginState hooks.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Add usePluginState hooks (f7d9460)

Version 1.18.1

Released on 2023-10-24

🐛 Bug Fixes

  • misc: Fix fetchPluginState bug.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix fetchPluginState bug (d2ff3b6)

Version 1.18.0

Released on 2023-10-23

✨ Features

  • misc: Support manifest type, support standalone plugin.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Support manifest type (b0e4f1c) - misc: Support standalone plugin (7b7a4a6)

Version 1.17.8

Released on 2023-10-12

🐛 Bug Fixes

  • misc: Fix a compatible error with nginx header.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix a compatible error with nginx header (09818ef)

Version 1.17.7

Released on 2023-09-09

🐛 Bug Fixes

  • misc: Bump father version.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Bump father version (5b08144)

Version 1.17.7-beta.1

Released on 2023-09-09

🐛 Bug Fixes

  • misc: Bump father version.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Bump father version (5b08144)

Version 1.17.6

Released on 2023-09-09

🐛 Bug Fixes

  • misc: Fix tsconfig.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix tsconfig (ef1fb70)

Version 1.17.5

Released on 2023-09-09

🐛 Bug Fixes

  • misc: Fix father version.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix father version (eadb7b6)

Version 1.17.4

Released on 2023-09-08

🐛 Bug Fixes

  • misc: Fix docs link.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix docs link (ae0bbfb)

Version 1.17.3

Released on 2023-09-06

♻ Code Refactoring

  • misc: Fix with better build flow.


<summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring - misc: Fix with better build flow (a461696)

Version 1.17.2

Released on 2023-09-06

🐛 Bug Fixes

  • misc: 修正 nextjs ssr 的兼容性问题.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: 修正 nextjs ssr 的兼容性问题 (4bb09a0)

Version 1.17.1

Released on 2023-09-06

🐛 Bug Fixes

  • misc: 修正 nextjs ssr 的兼容性问题.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: 修正 nextjs ssr 的兼容性问题 (382a906)

Version 1.17.0

Released on 2023-09-06

✨ Features

  • misc: Refactor the react usage to client exports.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Refactor the react usage to client exports (51e8da9)

Version 1.16.1-alpha.4

Released on 2023-09-06

♻ Code Refactoring

  • misc: Refactor to client mode.


<summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring - misc: Refactor to client mode (035a990)

Version 1.16.1-alpha.3

Released on 2023-09-06

🐛 Bug Fixes

  • misc: Try to fix build.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Try to fix build (0887276)

Version 1.16.1-alpha.2

Released on 2023-09-06

🐛 Bug Fixes

  • misc: Try to fix build.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Try to fix build (abda1a2)

Version 1.16.1-alpha.1

Released on 2023-09-06

🐛 Bug Fixes

  • misc: Fix export.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix export (9834327)

Version 1.16.0

Released on 2023-09-05

✨ Features

  • misc: Rename to getPluginSettingsFromRequest.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Rename to getPluginSettingsFromRequest (3969457)

Version 1.15.2

Released on 2023-09-05

🐛 Bug Fixes

  • misc: FetchPluginMessage 支持定义出参泛型.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: FetchPluginMessage 支持定义出参泛型 (e3059da)

Version 1.15.1

Released on 2023-09-03

🐛 Bug Fixes

  • misc: 修正展示模式.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: 修正展示模式 (70f6866)

Version 1.15.0

Released on 2023-09-03

✨ Features

  • misc: Update manifest schema.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Update manifest schema (8f6a078)

Version 1.14.1

Released on 2023-09-03

🐛 Bug Fixes

  • misc: 精简插件 SDK 提供的方法.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: 精简插件 SDK 提供的方法 (ac10c71)

Version 1.14.0

Released on 2023-09-03

✨ Features

  • misc: 提供 render 相关方法.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: 提供 render 相关方法 (8a73d88)

Version 1.13.1

Released on 2023-08-29

🐛 Bug Fixes

  • misc: Fix manifest type.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix manifest type (c84721f)

Version 1.13.0

Released on 2023-08-29

✨ Features

  • misc: Manifest 新增 gateway 参数.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Manifest 新增 gateway 参数 (d371a4e)

Version 1.12.0

Released on 2023-08-28

✨ Features

  • misc: 新增插件服务端渲染错误.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: 新增插件服务端渲染错误 (ad4f107)

Version 1.11.0

Released on 2023-08-28

✨ Features

  • misc: 新增 manifest 请求校验.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: 新增 manifest 请求校验 (c644a79)

Version 1.10.0

Released on 2023-08-25

✨ Features

  • misc: 细化支持设置、API 等错误类型.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: 细化支持设置、API 等错误类型 (dad7c64)

Version 1.9.2

Released on 2023-08-25

🐛 Bug Fixes

  • misc: 优化错误编码.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: 优化错误编码 (a9902be)

Version 1.9.1

Released on 2023-08-25

🐛 Bug Fixes

  • misc: 修正 IPluginErrorType 类型.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: 修正 IPluginErrorType 类型 (52f1af7)

Version 1.9.0

Released on 2023-08-25

✨ Features

  • misc: 优化 PluginErrorType 实现.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: 优化 PluginErrorType 实现 (fbc5425)

Version 1.8.0

Released on 2023-08-25

✨ Features

  • misc: 新增错误类型.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: 新增错误类型 (fb6deb1)

Version 1.7.2

Released on 2023-08-24

🐛 Bug Fixes

  • misc: Fix types.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix types (a399ee7)

Version 1.7.1

Released on 2023-08-24

🐛 Bug Fixes

  • misc: Fix readme.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix readme (45f2438)

Version 1.7.0

Released on 2023-08-24

✨ Features

  • misc: Add setting config.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Add setting config (180e713)

Version 1.6.2

Released on 2023-08-24

🐛 Bug Fixes

  • misc: Update schema fn.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Update schema fn (48e3429)

Version 1.6.1

Released on 2023-08-24

🐛 Bug Fixes

  • misc: 修正 sdk.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: 修正 sdk (f5bec3b)

Version 1.6.0

Released on 2023-08-24

✨ Features

  • misc: Update schema types.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Update schema types (4cb0e53)

Version 1.5.2

Released on 2023-08-22

🐛 Bug Fixes

  • misc: Add cjs support.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Add cjs support (82001a0)

Version 1.5.1

Released on 2023-08-21

🐛 Bug Fixes

  • misc: 补充 description 字段.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: 补充 description 字段 (9740e66)

Version 1.5.0

Released on 2023-08-20

✨ Features

  • misc: Add plugin client render interface.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Add plugin client render interface (90412d1)

Version 1.4.0

Released on 2023-08-20

✨ Features

  • misc: Add plugin request payload function.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Add plugin request payload function (b1ac976)

Version 1.3.1

Released on 2023-08-19

🐛 Bug Fixes

  • misc: Fix manifest types.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix manifest types (0f32526)

Version 1.3.0

Released on 2023-08-19

✨ Features

  • misc: 增加 manifest schema 、error 校验方法.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: 增加 manifest schema 、error 校验方法 (8888998)

Version 1.2.0

Released on 2023-08-19

✨ Features

  • misc: 增加插件市场索引校验方法.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: 增加插件市场索引校验方法 (37d56e9)

Version 1.1.2

Released on 2023-08-19

🐛 Bug Fixes

  • misc: Export ErrorType.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Export ErrorType (5c5e5c8)

Version 1.1.1

Released on 2023-08-19

🐛 Bug Fixes

  • misc: Export error function.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Export error function (640655c)

Version 1.1.0

Released on 2023-08-19

✨ Features

  • misc: Add error Response func.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Add error Response func (ac3e036)

Version 1.0.2

Released on 2023-08-19

🐛 Bug Fixes

  • misc: Remove createAt of LobeChatPlugin.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Remove createAt of LobeChatPlugin (b90698e)

Version 1.0.1

Released on 2023-08-18

🐛 Bug Fixes

  • misc: Fix market interface.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed - misc: Fix market interface (7afe74f)

Version 1.0.0

Released on 2023-08-18

✨ Features

  • misc: Add basic plugin types, add plugin types.


<summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved - misc: Add basic plugin types (b458dde) - misc: Add plugin types (5cac112)