@fastgpt-plugin/sdk-client 0.0.1-alpha.9 → 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +25 -0
- package/README.md +9 -0
- package/dist/index.d.ts +653 -798
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/package.json +9 -2
package/README.en.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# FastGPT-plugin SDK Client
|
|
2
|
+
|
|
3
|
+
Language: [简体中文](./README.md) | [English](./README.en.md)
|
|
4
|
+
|
|
5
|
+
Provides APIs for FastGPT to call FastGPT Plugin.
|
|
6
|
+
|
|
7
|
+
`listPlugins()` now returns a paginated structure:
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
type PluginListType = {
|
|
11
|
+
data: PluginListItemType[];
|
|
12
|
+
offset: number;
|
|
13
|
+
limit: number;
|
|
14
|
+
total: number;
|
|
15
|
+
};
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
`PluginListItemType` and `PluginSourceType` are also exported so callers can handle the new `source` field and paginated responses.
|
|
19
|
+
|
|
20
|
+
`getPluginServiceFeatures()` returns the enabled Plugin service capabilities:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
const features = await client.getPluginServiceFeatures();
|
|
24
|
+
// { remoteDebug: boolean }
|
|
25
|
+
```
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# FastGPT-plugin SDK client
|
|
2
2
|
|
|
3
|
+
语言:[简体中文](./README.md) | [English](./README.en.md)
|
|
4
|
+
|
|
3
5
|
提供接口供 FastGPT 调用。
|
|
4
6
|
|
|
5
7
|
`listPlugins()` 现在返回分页结构:
|
|
@@ -14,3 +16,10 @@ type PluginListType = {
|
|
|
14
16
|
```
|
|
15
17
|
|
|
16
18
|
同时导出了 `PluginListItemType` 和 `PluginSourceType`,方便调用方处理新的 `source` / 分页返回。
|
|
19
|
+
|
|
20
|
+
`getPluginServiceFeatures()` 可查询当前 Plugin 服务已启用的能力:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
const features = await client.getPluginServiceFeatures();
|
|
24
|
+
// { remoteDebug: boolean }
|
|
25
|
+
```
|