diff --git a/docSite/assets/jsconfig.json b/docSite/assets/jsconfig.json index 8f397dcb4..12196fbee 100644 --- a/docSite/assets/jsconfig.json +++ b/docSite/assets/jsconfig.json @@ -3,8 +3,8 @@ "baseUrl": ".", "paths": { "*": [ - "../../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js/*", - "../../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.0+incompatible/js/*" + "../../../../../Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js/*", + "../../../../../Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.0+incompatible/js/*" ] } } diff --git a/docSite/content/docs/workflow/examples/fixingEvidence.md b/docSite/content/docs/workflow/examples/fixingEvidence.md index b2cae442b..5c788f1f0 100644 --- a/docSite/content/docs/workflow/examples/fixingEvidence.md +++ b/docSite/content/docs/workflow/examples/fixingEvidence.md @@ -18,6 +18,8 @@ weight: 500 复制下面配置,点击「高级编排」右上角的导入按键,导入该配置。 +{{% details title="编排配置" closed="true" %}} + ```json [ { @@ -333,3 +335,5 @@ weight: 500 ] ``` +{{% /details %}} + diff --git a/docSite/content/docs/workflow/examples/google_search.md b/docSite/content/docs/workflow/examples/google_search.md index 3f991e512..27b5fc651 100644 --- a/docSite/content/docs/workflow/examples/google_search.md +++ b/docSite/content/docs/workflow/examples/google_search.md @@ -64,6 +64,8 @@ export default async function (ctx: FunctionContext) { 复制下面配置,点击「高级编排」右上角的导入按键,导入该配置,导入后将接口地址复制到「HTTP 模块」。 +{{% details title="编排配置" closed="true" %}} + ```json [ { @@ -448,6 +450,8 @@ export default async function (ctx: FunctionContext) { ] ``` +{{% /details %}} + ## 流程说明 1. 提取模块将用户的问题提取成搜索关键词。 diff --git a/docSite/content/docs/workflow/examples/lab_appointment.md b/docSite/content/docs/workflow/examples/lab_appointment.md index 6d05d7533..d4025e6d2 100644 --- a/docSite/content/docs/workflow/examples/lab_appointment.md +++ b/docSite/content/docs/workflow/examples/lab_appointment.md @@ -17,7 +17,7 @@ weight: 499 # 编排流程解析 -编排 Tips: 从左往右编辑流程;尽量不要使线交叉。 +编排 Tips:**从左往右编辑流程;尽量不要使线交叉**。 ## 1. 问题分类 @@ -26,7 +26,7 @@ weight: 499 如上图,用户问题作为对话的起点,流入【问题分类模块】,根据用户问题的内容,判断用户是询问实验室相关问题、预约实验室或其他问题。如果用户询问的是非实验问题,会直接拒绝回复内容。再根据问题是属于询问实验室相关/预约类问题,执行不同的流程。 {{% alert icon="🤗" context="warning" %}} -**Tips:** 这里需要增加适当的上下文,方便模型更好的判断属于哪个类别。 不过由于是使用了 gpt35 进行判断,有时候会抽风~ +**Tips:** 这里需要增加适当的上下文,方便模型更好的判断属于哪个类别。 不过由于是使用了 GPT-3.5 模型进行判断,有时候会抽风~ {{% /alert %}} ## 2. 知识库搜索 @@ -51,7 +51,7 @@ HTTP 模块允许你调用任意 POST 类型的 HTTP 接口,从而实验一些 ![](/imgs/demo-appointment7.png) -从日志可以看出,提取的内容中包含了 2 个**字符串数组**,注意是字符串,所以需要进行一次额外的 parse 操作才能拿到里面的对象。具体逻辑可以参考附件里的 Laf 代码。 +从日志可以看出,提取的内容中包含了 2 个**字符串数组**,注意是字符串,所以需要进行一次额外的 parse 操作才能拿到里面的对象。具体逻辑可以参考[附件里的 Laf 代码](/docs/workflow/examples/lab_appointment/#laf-云函数代码)。 响应值也很简单,只需要返回一个 **JSON 对象**即可,注意,是对象,不是字符串。 @@ -67,6 +67,8 @@ HTTP 模块允许你调用任意 POST 类型的 HTTP 接口,从而实验一些 可直接复制,导入到 FastGPT 中。 +{{% details title="编排配置" closed="true" %}} + ```json [ { @@ -1057,11 +1059,15 @@ HTTP 模块允许你调用任意 POST 类型的 HTTP 接口,从而实验一些 ] ``` -## Laf 代码 +{{% /details %}} -可以在 [Laf Cloud](https://laf.dev/) 中快速构建 HTTP 接口。 +## Laf 云函数代码 -```ts +可以在 [Laf](https://laf.dev/) 中快速构建 HTTP 接口。 + +{{% details title="函数代码" closed="true" %}} + +```typescript import cloud from '@lafjs/cloud'; const db = cloud.database(); @@ -1236,3 +1242,5 @@ async function createRecord({ name, time, labname }) { }; } ``` + +{{% /details %}} diff --git a/docSite/content/docs/workflow/examples/op_question.md b/docSite/content/docs/workflow/examples/op_question.md index e8d43cc29..8e6d711cc 100644 --- a/docSite/content/docs/workflow/examples/op_question.md +++ b/docSite/content/docs/workflow/examples/op_question.md @@ -19,6 +19,8 @@ weight: 500 复制下面配置,点击「高级编排」右上角的导入按键,导入该配置。 +{{% details title="编排配置" closed="true" %}} + ```json [ { @@ -497,6 +499,8 @@ weight: 500 ] ``` +{{% /details %}} + ## 流程说明 1. 利用内容提取模块,将用户的问题进行优化。 diff --git a/docSite/layouts/shortcodes/details.html b/docSite/layouts/shortcodes/details.html new file mode 100644 index 000000000..1c2b7fcc6 --- /dev/null +++ b/docSite/layouts/shortcodes/details.html @@ -0,0 +1,11 @@ +{{- $title := .Get "title" | default "" -}} +{{- $closed := eq (.Get "closed") "true" | default false -}} + +
+ + {{ $title | markdownify }} + +
+ {{ .InnerDeindent | markdownify }} +
+
\ No newline at end of file