This commit is contained in:
archer
2023-08-24 09:06:25 +08:00
parent 34ab66bb69
commit a99ef9e2c0
15 changed files with 81 additions and 37 deletions

View File

@@ -1,7 +1,7 @@
---
title: "联网 GPT"
description: "将 FastGPT 外接搜索引擎"
icon: "search"
title: '联网 GPT'
description: '将 FastGPT 外接搜索引擎'
icon: 'search'
draft: false
toc: true
weight: 441
@@ -11,11 +11,11 @@ weight: 441
![](/imgs/google_search_2.png)
如上图,利用 HTTP 模块,你可以轻松的外接一个搜索引擎。这里以调用 Google Search API 为例。
如上图,利用 HTTP 模块,你可以轻松的外接一个搜索引擎。这里以调用 Google Search API 为例。注意:本文主要是为了介绍 HTTP 模型,具体的搜索效果需要依赖提示词和搜索引擎,这两部分可能需要更多的调试。
## 注册 Google Search API
[参考这篇文章](https://zhuanlan.zhihu.com/p/174666017)
[参考这篇文章](https://zhuanlan.zhihu.com/p/174666017),每天可以免费使用 100 次。
## 写一个 Google Search 接口
@@ -453,4 +453,4 @@ export default async function (ctx: FunctionContext) {
1. 提取模块将用户的问题提取成搜索关键词。
2. 将搜索关键词传入 HTTP 模块。
3. HTTP 模块调用谷歌搜索接口,返回搜索内容。
4. 将搜索内容传入【AI 对话】的提示词,引导模型进行回答。
4. 将搜索内容传入【AI 对话】的提示词,引导模型进行回答。