Files
FastGPT/docSite/content/docs/course/custom_link.md
heheer e35ce2caa0 feat: question guide (#1508)
* feat: question guide

* fix

* fix

* fix

* change interface

* fix
2024-05-19 17:34:16 +08:00

44 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "自定义词库地址"
description: "FastGPT 自定义输入提示的接口地址"
icon: "code"
draft: false
toc: true
weight: 350
---
![](/imgs/questionGuide.png)
## 什么是输入提示
可自定义开启或关闭,当输入提示开启,并且词库中存在数据时,用户在输入问题时如果输入命中词库,那么会在输入框上方展示对应的智能推荐数据
用户可配置词库,选择存储在 FastGPT 数据库中,或者提供自定义接口获取词库
## 数据格式
词库的形式为一个字符串数组,定义的词库接口应该有两种方法 —— GET & POST
### GET
对于 GET 方法用于获取词库数据FastGPT 会给接口发送数据 query 为
```
{
appId: 'xxxx'
}
```
返回数据格式应当为
```
{
data: ['xxx', 'xxxx']
}
```
### POST
对于 POST 方法用于更新词库数据FastGPT 会给接口发送数据 body 为
```
{
appId: 'xxxx',
text: ['xxx', 'xxxx']
}
```
接口应当按照获取的数据格式存储相对应的词库数组