如果工作流中包含交互节点,依然是调用该 API 接口,需要设置`detail=true`,并可以从`event=interactive`的数据中获取交互节点的配置信息。如果是`stream=false`,则可以从 choice 中获取`type=interactive`的元素,获取交互节点的选择信息。
如果工作流中包含交互节点,依然是调用该 API 接口,需要设置`detail=true`,并可以从`event=interactive`的数据中获取交互节点的配置信息。如果是`stream=false`,则可以从 choice 中获取`type=interactive`的元素,获取交互节点的选择信息。
...
@@ -577,6 +320,7 @@ event取值:
...
@@ -577,6 +320,7 @@ event取值:
}
}
}
}
```
```
</Tab>
</Tab>
<Tab value="表单输入">
<Tab value="表单输入">
...
@@ -679,17 +423,15 @@ curl --location --request POST 'https://api.fastgpt.in/api/v1/chat/completions'
...
@@ -679,17 +423,15 @@ curl --location --request POST 'https://api.fastgpt.in/api/v1/chat/completions'
</Tab>
</Tab>
</Tabs>
</Tabs>
## 请求插件
## 请求插件
插件的接口与对话接口一致,仅请求参数略有区别,有以下规定:
插件的接口与对话接口一致,仅请求参数略有区别,有以下规定:
* 调用插件类型的应用时,接口默认为`detail`模式。
- 调用插件类型的应用时,接口默认为`detail`模式。
* 无需传入 `chatId`,因为插件只能运行一轮。
- 无需传入 `chatId`,因为插件只能运行一轮。
* 无需传入`messages`。
- 无需传入`messages`。
* 通过传递`variables`来代表插件的输入。
- 通过传递`variables`来代表插件的输入。
* 通过获取`pluginData`来获取插件输出。
- 通过获取`pluginData`来获取插件输出。
### 请求示例
### 请求示例
...
@@ -711,8 +453,8 @@ curl --location --request POST 'http://localhost:3000/api/v1/chat/completions' \
...
@@ -711,8 +453,8 @@ curl --location --request POST 'http://localhost:3000/api/v1/chat/completions' \
@@ -7,7 +7,7 @@ The FastGPT project is open-sourced under the Apache License 2.0, but includes t
...
@@ -7,7 +7,7 @@ The FastGPT project is open-sourced under the Apache License 2.0, but includes t
- FastGPT may be used for commercial purposes, such as operating it as "backend-as-a-service" for other applications or providing it as an enterprise development platform. However, you must contact us to obtain a commercial license under the following circumstances:
- FastGPT may be used for commercial purposes, such as operating it as "backend-as-a-service" for other applications or providing it as an enterprise development platform. However, you must contact us to obtain a commercial license under the following circumstances:
- Multi-tenant SaaS Service: Unless explicit written authorization from FastGPT is obtained, you may not use the source code of tryfastgpt.ai to operate a multi-tenant SaaS service similar to tryfastgpt.ai.
- Multi-tenant SaaS Service: Unless explicit written authorization from FastGPT is obtained, you may not use the source code of fastgpt.io to operate a multi-tenant SaaS service similar to fastgpt.io.
- Logo and Copyright Information: You may not remove or modify the FastGPT logo or copyright information within the FastGPT console.
- Logo and Copyright Information: You may not remove or modify the FastGPT logo or copyright information within the FastGPT console.
For commercial licensing inquiries, please contact us via email at dennis@sealos.io.
For commercial licensing inquiries, please contact us via email at dennis@sealos.io.