ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。

Home Page:https://app.nextchat.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature] Plugin Web Search: 可以增加联网搜索功能吗?

yuntian123456 opened this issue · comments

在这个项目里发现有联网搜索功能,可以实现类似的功能吗?
https://github.com/GaiZhenbiao/ChuanhuChatGPT

目前还不太清楚浏览器里是否能直接获取搜索引擎结果,后续再加吧

https://github.com/circlestarzero/EX-chatGPT
这个实现了联网功能,调用的是谷歌的接口,每天有20次免费的机会,可以参考一下~

https://github.com/circlestarzero/EX-chatGPT 这个实现了联网功能,调用的是谷歌的接口,每天有20次免费的机会,可以参考一下~

写错了,谷歌搜索引擎的api每天应该是100次免费机会

我不懂,问下了chatgpt,给出了这样的答案哈哈
image
image

https://github.com/qunash/chatgpt-advanced 这个插件也是可以参考一下的

commented

这些功能langchain js 都有 连sql 都有 大模型也有

commented

当然在js圈子看不到的 这个库最早来自于py 上面说的功能都是agents里的功能

川虎的实现逻辑,我估计是这样的,gui调搜索引擎搜索关键词,然后以一定规则爬取某些网页,和网页的内容,然后喂给gpt,所以川虎会有以下两种情况。
1、就算不填key,开了联网功能后,gui也会回复内容,就是gui调用搜索引擎搜索出的内容
2、结果不稳定,不知道他的抓取规则是什么,每次问爬的网站都不一样。

commented

我是直接扔给chatgpt对话框google网址,让它帮我搜索

川虎用的是duckduckgo这个库获取的搜索结果

commented

https://chat1.aichatos.com/#/chat/1681292288748
这个网址实现了联网功能,但我不知道它是怎么实现的。比川虎的结果更清晰好用

https://chat1.aichatos.com/#/chat/1681292288748 这个网址实现了联网功能,但我不知道它是怎么实现的。比川虎的结果更清晰好用

看了一下,它后端是在service里的,但这个仓库没有service的提交

commented

https://chat1.aichatos.com/#/chat/1681292288748 这个网址实现了联网功能,但我不知道它是怎么实现的。比川虎的结果更清晰好用

看了一下,它后端是在service里的,但这个仓库没有service的提交

这个作者有个ddg的仓库,大概率应该也是用的ddg的引擎。

https://github.com/circlestarzero/EX-chatGPT
这个实现了联网功能,调用的是谷歌的接口,每天有20次免费的机会,可以参考一下~

这个是真厉害,希望能实现。

commented

https://chat1.aichatos.com/#/chat/1681292288748 这个网址实现了联网功能,但我不知道它是怎么实现的。比川虎的结果更清晰好用

看了一下,它后端是在service里的,但这个仓库没有service的提交

这个作者有个ddg的仓库,大概率应该也是用的ddg的引擎。

我怀疑是 别人在 chatgpt-web 的基础上做了二开吧

commented

https://chat1.aichatos.com/#/chat/1681292288748 这个网址实现了联网功能,但我不知道它是怎么实现的。比川虎的结果更清晰好用

image
我刚才去试了一下,这样

https://github.com/Significant-Gravitas/Auto-GPT
这个是通过Google 的Custom Search API搜索

https://chat1.aichatos.com/#/chat/1681292288748 这个网址实现了联网功能,但我不知道它是怎么实现的。比川虎的结果更清晰好用

看了一下,它后端是在service里的,但这个仓库没有service的提交

这个作者有个ddg的仓库,大概率应该也是用的ddg的引擎。

我怀疑是 别人在 chatgpt-web 的基础上做了二开吧

是做二开的,加上了一些自己的功能,并且把自己的收款码放进去了(狗头)

https://github.com/Hk-Gosuto/ChatGPT-Next-Web
我在自己fork的仓库里试着加了联网搜索功能的代码,感兴趣的老哥可以先用着
prompt用 https://github.com/GaiZhenbiao/ChuanhuChatGPT 项目里改的
先部署个 https://github.com/binjie09/duckduckgo-api
然后加个环境变量 WEB_SEARCH_BASE_URL 指向 duckduckgo-api 的 URL 就行了

开关如图:
image

@Hk-Gosuto 效果如何,能否提供几个问答的截图?

@Hk-Gosuto 效果如何,能否提供几个问答的截图?

效果取决于duckduckgo本身返回的内容,默认只取了3条结果
部分场景返回的数据来源标注的有点问题,如图3,虽然标记了引用但没关联url

image
image
image

效果很不错

效果很不错

Quicker_20230503_214630

应该是搜索接口没配置好,确定下 WEB_SEARCH_BASE_URL 环境变量是否配置有误,可以在问问题的时候看下接口 /api/web-search 是否正常返回,正常的返回内容如下:

[
    {
        "body": "北京天气预报,北京7天天气预报,北京15天天气预报,北京天气查询 北京 城区 今天 7天 8-15天 40天 雷达图 2日(今天) 晴转多云 29 / 16℃ <3级 3日(明天) 多云 27 / 16℃ <3级 4日(后天) 阴转小雨 22 / 14℃ <3级 5日(周五) 多云 26 / 14℃ 3-4级转<3级 6日(周六) 多云转晴 23 / 12℃ <3级 7日(周日) 晴 24 / 12℃ <3级 8日(周一) 晴转多云 26 / 14℃ <3级 分时段预报 生活指数 蓝天预报 天气资讯 湖南今明天雨水在线北部局地有暴雨 4日开始降水增强 **天气网湖南站 2023-05-02 11:25 哈尔滨:满城春色关不住 百花齐放醉游人 **天气网 2023-05-02 09:09",
        "href": "http://www.weather.com.cn/weather/101010100.shtml",
        "title": "北京天气预报,北京7天天气预报,北京15天天气预报,北京天气查询"
    },
    {
        "body": "北京天气预报,北京7天天气预报,北京15天天气预报,北京天气查询 城区 今天 7天 8-15天 40天 雷达图 不限行 1日白天 晴 27°C <3级 日出 05:15 1日夜间 小雨 16°C <3级 日落 19:08 生活指数 少发 感冒指数 无明显降温,感冒机率较低。 适宜 运动指数 天气较好,尽情感受运动的快乐吧。 (粒/千平方毫米) 花粉过敏指数 暂无 舒适 穿衣指数 建议穿长袖衬衫单裤等服装。 不宜 洗车指数 有雨,雨水和泥水会弄脏爱车。 强 紫外线指数 涂擦SPF大于15、PA+防晒护肤品。 天气资讯 假期天气大转折! 华东华中由晴转雨 湖北安徽等地雨量或破5月极值 **天气网 2023-05-01 16:05",
        "href": "http://www.weather.com.cn/weather1d/101010100.shtml",
        "title": "北京天气预报,北京7天天气预报,北京15天天气预报,北京天气查询"
    },
    {
        "body": "每小时本地天气预报、天气情况、降水、露点、湿度、大风 - 尽在 Weather.com 和 The Weather Channel",
        "href": "https://weather.com/zh-CN/weather/hourbyhour/l/71ca347e2948ee9490525aa5433fa91da6973ae51ea0f765fbe8e85b9f16c5df",
        "title": "北京市每小时天气预报 - The Weather Channel | Weather.com"
    }
]

https://github.com/Hk-Gosuto/ChatGPT-Next-Web 我在自己fork的仓库里试着加了联网搜索功能的代码,感兴趣的老哥可以先用着 prompt用 https://github.com/GaiZhenbiao/ChuanhuChatGPT 项目里改的 先部署个 https://github.com/binjie09/duckduckgo-api 然后加个环境变量 WEB_SEARCH_BASE_URL 指向 duckduckgo-api 的 URL 就行了

开关如图: image

我用自己的key在大佬你的网站里试了下,不开联网模式它还是乱回答,而且生成的主题名字也乱七八糟的
image

https://github.com/Hk-Gosuto/ChatGPT-Next-Web 我在自己fork的仓库里试着加了联网搜索功能的代码,感兴趣的老哥可以先用着 prompt用 https://github.com/GaiZhenbiao/ChuanhuChatGPT 项目里改的 先部署个 https://github.com/binjie09/duckduckgo-api 然后加个环境变量 WEB_SEARCH_BASE_URL 指向 duckduckgo-api 的 URL 就行了

开关如图: image

同一个对话,先开搜索问一个“你好”,回答没问题,关搜索问“北京今天天气怎么样”,它还是在搜索,而且回答的是“你好”这个问题
image

https://github.com/Hk-Gosuto/ChatGPT-Next-Web 我在自己fork的仓库里试着加了联网搜索功能的代码,感兴趣的老哥可以先用着 prompt用 https://github.com/GaiZhenbiao/ChuanhuChatGPT 项目里改的 先部署个 https://github.com/binjie09/duckduckgo-api 然后加个环境变量 WEB_SEARCH_BASE_URL 指向 duckduckgo-api 的 URL 就行了
开关如图: image

同一个对话,先开搜索问一个“你好”,回答没问题,关搜索问“北京今天天气怎么样”,它还是在搜索,而且回答的是“你好”这个问题 image

未开启联网模式时消息传递错误的问题我修复了,你这个问题我没能复现。
建议把我的库作为联网功能正式发布前的临时替代方案吧,作为正式功能要考虑更多的问题,比如:连续对话时token超长、temperature参数对结果的影响、prompt优化等问题。

@Hk-Gosuto 我不会直接内置联网模式,联网搜索会作为插件推出

nice!期待,这就是所谓的如虎添翼了

commented

https://github.com/Hk-Gosuto/ChatGPT-Next-Web 我在自己fork的仓库里试着加了联网搜索功能的代码,感兴趣的老哥可以先用着 prompt用 https://github.com/GaiZhenbiao/ChuanhuChatGPT 项目里改的 先部署个 https://github.com/binjie09/duckduckgo-api 然后加个环境变量 WEB_SEARCH_BASE_URL 指向 duckduckgo-api 的 URL 就行了

开关如图: image

直接拉下来用可以吗?需要做其他操作吗?

https://github.com/Hk-Gosuto/ChatGPT-Next-Web 我在自己fork的仓库里试着加了联网搜索功能的代码,感兴趣的老哥可以先用着 prompt用 https://github.com/GaiZhenbiao/ChuanhuChatGPT 项目里改的 先部署个 https://github.com/binjie09/duckduckgo-api 然后加个环境变量 WEB_SEARCH_BASE_URL 指向 duckduckgo-api 的 URL 就行了
开关如图: image

直接拉下来用可以吗?需要做其他操作吗?

  1. vercel 部署 duckduckgo-api,记住生成的网址
  2. vercel 部署 ChatGPT-Next-Web,增加一个环境变量 WEB_SEARCH_BASE_URL 指向步骤 1 产生的地址
    image
  3. 在每次对话中,点击图中的按钮开启联网搜索功能
commented

https://github.com/Hk-Gosuto/ChatGPT-Next-Web 我在自己fork的仓库里试着加了联网搜索功能的代码,感兴趣的老哥可以先用着 prompt用 https://github.com/GaiZhenbiao/ChuanhuChatGPT 项目里改的 先部署个 https://github.com/binjie09/duckduckgo-api 然后加个环境变量 WEB_SEARCH_BASE_URL 指向 duckduckgo-api 的 URL 就行了
开关如图: image

直接拉下来用可以吗?需要做其他操作吗?

  1. vercel 部署 duckduckgo-api,记住生成的网址
  2. vercel 部署 ChatGPT-Next-Web,增加一个环境变量 WEB_SEARCH_BASE_URL 指向步骤 1 产生的地址
    image
  3. 在每次对话中,点击图中的按钮开启联网搜索功能

好的,谢谢,我去试试

https://github.com/Hk-Gosuto/ChatGPT-Next-Web 我在自己fork的仓库里试着加了联网搜索功能的代码,感兴趣的老哥可以先用着 prompt用 https://github.com/GaiZhenbiao/ChuanhuChatGPT 项目里改的 先部署个 https://github.com/binjie09/duckduckgo-api 然后加个环境变量 WEB_SEARCH_BASE_URL 指向 duckduckgo-api 的 URL 就行了
开关如图: image

直接拉下来用可以吗?需要做其他操作吗?

  1. vercel 部署 duckduckgo-api,记住生成的网址
  2. vercel 部署 ChatGPT-Next-Web,增加一个环境变量 WEB_SEARCH_BASE_URL 指向步骤 1 产生的地址
    image
  3. 在每次对话中,点击图中的按钮开启联网搜索功能

很棒!搜索结果也挺靠谱的。
但是,时间怎么不太对。。。
image

我也写了一个,整合了一些插件,就是比较费token
2023-05-09_071734

https://github.com/Hk-Gosuto/ChatGPT-Next-Web 我在自己fork的仓库里试着加了联网搜索功能的代码,感兴趣的老哥可以先用着 prompt用 https://github.com/GaiZhenbiao/ChuanhuChatGPT 项目里改的 先部署个 https://github.com/binjie09/duckduckgo-api 然后加个环境变量 WEB_SEARCH_BASE_URL 指向 duckduckgo-api 的 URL 就行了
开关如图: image

直接拉下来用可以吗?需要做其他操作吗?

  1. vercel 部署 duckduckgo-api,记住生成的网址
  2. vercel 部署 ChatGPT-Next-Web,增加一个环境变量 WEB_SEARCH_BASE_URL 指向步骤 1 产生的地址
    image
  3. 在每次对话中,点击图中的按钮开启联网搜索功能

很棒!搜索结果也挺靠谱的。 但是,时间怎么不太对。。。 image

我试了一下,程序是根据duckduckgo搜索返回回复的,有可能是搜索引擎本身的缓存导致的,也可以修改prompt优化这部分功能。
image

还有后续么,目前chatgpt 开放插件功能了

前面那个时间不准的问题,可以试试搜索引擎设定搜索最近一个月的内容,这样精度会更高一些

https://github.com/Hk-Gosuto/ChatGPT-Next-Web 我在自己fork的仓库里试着加了联网搜索功能的代码,感兴趣的老哥可以先用着 prompt用 https://github.com/GaiZhenbiao/ChuanhuChatGPT 项目里改的 先部署个 https://github.com/binjie09/duckduckgo-api 然后加个环境变量 WEB_SEARCH_BASE_URL 指向 duckduckgo-api 的 URL 就行了

开关如图: image

NB,当时我使用chuanhuGPT他的实施搜索有问题啊,并不像你给的截图那样回答,还有个问题,gpt4能调吗,我是plus用户但使用key和4model会报错

我是直接扔给chatgpt对话框google网址,让它帮我搜索

不行,很抱歉,作为一个AI模型,我无法直接访问或浏览网页。但您可以尝试访问Google搜索页面,输入“流浪地球2上线时间”,然后查看搜索结果以获取相关信息。

同时,您还可以关注电影相关的官方消息来源,如电影制作公司、导演和演员的社交媒体帐户,以了解关于《流浪地球2》的最新发布信息。

https://github.com/Hk-Gosuto/ChatGPT-Next-Web 我在自己fork的仓库里试着加了联网搜索功能的代码,感兴趣的老哥可以先用着 prompt用 https://github.com/GaiZhenbiao/ChuanhuChatGPT 项目里改的 先部署个 https://github.com/binjie09/duckduckgo-api 然后加个环境变量 WEB_SEARCH_BASE_URL 指向 duckduckgo-api 的 URL 就行了

开关如图: image

@Hk-Gosuto  duckduckgoapi用不了了 https://github.com/binjie09/duckduckgo-api/issues/7

https://github.com/Hk-Gosuto/ChatGPT-Next-Web 我在自己fork的仓库里试着加了联网搜索功能的代码,感兴趣的老哥可以先用着 prompt用 https://github.com/GaiZhenbiao/ChuanhuChatGPT 项目里改的 先部署个 https://github.com/binjie09/duckduckgo-api 然后加个环境变量 WEB_SEARCH_BASE_URL 指向 duckduckgo-api 的 URL 就行了
开关如图: image

@Hk-Gosuto  duckduckgoapi用不了了 https://github.com/binjie09/duckduckgo-api/issues/7

我fork了这个仓库并修复了不能搜索的问题,请使用我修改后的项目重新部署一个搜索服务:
https://github.com/Hk-Gosuto/ddg-api

不行,很抱歉,作为一个AI模型,我无法直接访问或浏览网页。但您可以尝试访问Google搜索页面,输入“流浪地球2上线时间”,然后查看搜索结果以获取相关信息。

同时,您还可以关注电影相关的官方消息来源,如电影制作公司、导演和演员的社交媒体帐户,以了解关于《流浪地球2》的最新发布信息。

我修改的版本只是将问题扔到了搜索引擎并返回给AI来进行解析,想实现你想要的效果只能通过插件的形式来实现,让GPT自己选择调用不同的插件来处理不同的问题,关于是否能使用GPT-4,这个项目只是调用了官方的接口,与你账户是否为plus无关,API接口能力和plus是分开的,API的GPT-4能力需要申请加入waitlist,请参考:https://openai.com/waitlist/gpt-4-api

所以,哪位大佬二开了这个的功能?川虎大佬的界面不太喜欢。还是想咱们这边能开发个联网插件

commented

不行,很抱歉,作为一个AI模型,我无法直接访问或浏览网页。但您可以尝试访问Google搜索页面,输入“流浪地球2上线时间”,然后查看搜索结果以获取相关信息。
同时,您还可以关注电影相关的官方消息来源,如电影制作公司、导演和演员的社交媒体帐户,以了解关于《流浪地球2》的最新发布信息。

我修改的版本只是将问题扔到了搜索引擎并返回给AI来进行解析,想实现你想要的效果只能通过插件的形式来实现,让GPT自己选择调用不同的插件来处理不同的问题,关于是否能使用GPT-4,这个项目只是调用了官方的接口,与你账户是否为plus无关,API接口能力和plus是分开的,API的GPT-4能力需要申请加入waitlist,请参考:https://openai.com/waitlist/gpt-4-api

duckduck go search results always show chinese language please tell me how to change it i want to change it to my country language.

commented

https://openai.com/blog/function-calling-and-other-api-updates
现在chatgpt已经支持通过API的方式调用插件了,可以考虑直接加进插件功能里面。

image

不行,很抱歉,作为一个AI模型,我无法直接访问或浏览网页。但您可以尝试访问Google搜索页面,输入“流浪地球2上线时间”,然后查看搜索结果以获取相关信息。
同时,您还可以关注电影相关的官方消息来源,如电影制作公司、导演和演员的社交媒体帐户,以了解关于《流浪地球2》的最新发布信息。

我修改的版本只是将问题扔到了搜索引擎并返回给AI来进行解析,想实现你想要的效果只能通过插件的形式来实现,让GPT自己选择调用不同的插件来处理不同的问题,关于是否能使用GPT-4,这个项目只是调用了官方的接口,与你账户是否为plus无关,API接口能力和plus是分开的,API的GPT-4能力需要申请加入waitlist,请参考:https://openai.com/waitlist/gpt-4-api

duckduck go search results always show chinese language please tell me how to change it i want to change it to my country language.

please modify this prompt
https://github.com/Hk-Gosuto/ChatGPT-Next-Web/blob/e672b8c7716962968c727ccf1eb92a3ae7205140/app/store/chat.ts#L302

实际上川虎实现ddg搜索的代码非常简单,经过简单的转换就可以实现为TypeScript代码,你可以在浏览器或者边缘函数中使用它
请注意这个get方法是我所编写的通用反代方法,你可以使用原生的fetch替换它
你可以在我的镜像站中查看使用效果: EasyChat

import { get } from "@/app/utils/http";


const reply_language =
    "the same language as the question, such as English, 中文, 日本語, Español, Français, or Deutsch.";
const WEBSEARCH_PTOMPT_TEMPLATE =
    "Web search results:\n" +
    "\n" +
    "{web_results}\n" +
    "Current date: {current_date}\n" +
    "\n" +
    "Instructions: Using the provided web search results, write a comprehensive reply to the given query. Make sure to cite results using [[number](URL)] notation after the reference. If the provided search results refer to multiple subjects with the same name, write separate answers for each subject. Write the results to the next action_input\n" +
    "Query: {query}\n" +
    "Reply in {reply_language} And use the markdown syntax";

export const DdgSearch = async (
    searchQuery: string,
    region: string | undefined,
    headers: Headers,
):Promise<string> => {
    try {
        const response = await get(
            `https://duckduckgo.com/?q=${encodeURIComponent(searchQuery)}`,
            { ...headers },
        );
        const html = await response.text();
        const regex = /vqd=["']([^"']+)["']/;
        const match = regex.exec(html);
        const vqd = match && match[1].replaceAll('"', "").replaceAll("'", "");
        let safesearch_base = { On: 1, Moderate: -1, Off: -2 };
        let PAGINATION_STEP = 25,
            MAX_API_RESULTS = 200,
            page = 1;
        let payload = {
            q: searchQuery,
            l: region,
            p: safesearch_base["On"],
            s: Math.max(PAGINATION_STEP * (page - 1), 0),
            df: new Date().getTime(),
            o: "json",
            vqd: vqd,
        };

        let res = await get(
            "https://links.duckduckgo.com/d.js",
            { ...headers },
            payload,
        );
        let result = await res.json();
        let reference_results: any[] = [];
        if (result["results"]) {
            for (let row of result["results"]) {
                if (!row["n"]) {
                    let body = row["a"];
                    if (body) {
                        let domain_name = row["i"];
                        reference_results.push([body,row["u"]]);
                        if (reference_results.length > 5) {
                            break;
                        }
                    }
                }
            }
        }
        return WEBSEARCH_PTOMPT_TEMPLATE.replace("{query}", searchQuery)
            .replace(
                "{web_results}",
                reference_results.length > 0
                    ? reference_results.join("\n\n")
                    : `no web result`,
            )
            .replace("{reply_language}", reply_language)
            .replace(
                "{current_date}",
                new Date().toLocaleString("zh-CN", {hour12: false}),
            )
    } catch (e) {
        console.log(e)
        return `no web result`;
    }
};

@Hk-Gosuto
您最近更新的这个链接:https://github.com/Hk-Gosuto/ddg-api 似乎还是无法正常部署,请查一下问题所在,谢谢!

@Hk-Gosuto 您最近更新的这个链接:https://github.com/Hk-Gosuto/ddg-api 似乎还是无法正常部署,请查一下问题所在,谢谢!

vercel deploy指向的还是原项目,已经修改了,可以在readme上点击按钮部署,也可以直接访问:https://vercel.com/import/project?template=https://github.com/Hk-Gosuto/ddg-api

@Hk-Gosuto 还是报错。点击部署后,等待1分钟,提示:Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

@Hk-Gosuto 还是报错。点击部署后,等待1分钟,提示:Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

这个服务只作为搜索api使用,这个不是报错,是因为服务就没有index,要想测试服务是否可用请自行拼接/search?q=关键字验证服务

那么,后续保存的链接,具体应该是什么呢?您能否说清楚一些,谢谢。 | | @.*** | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年06月16日 12:24 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [Yidadaa/ChatGPT-Next-Web] 可以增加联网搜索功能吗? (Issue #165) | @Hk-Gosuto 还是报错。点击部署后,等待1分钟,提示:Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. 这个服务只作为搜索api使用,这个不是报错,是因为服务就没有index,要想测试服务是否可用请自行拼接/search?q=关键字验证服务 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

请参考该回复进行配置 #165 (comment)

那么,后续保存的链接,具体应该是什么呢?您能否说清楚一些,谢谢。 | | @.*** | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年06月16日 12:24 | | 收件人 | _@**._> | | 抄送至 | _@.>@._> | | 主题 | Re: [Yidadaa/ChatGPT-Next-Web] 可以增加联网搜索功能吗? (Issue #165) | @Hk-Gosuto 还是报错。点击部署后,等待1分钟,提示:Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. 这个服务只作为搜索api使用,这个不是报错,是因为服务就没有index,要想测试服务是否可用请自行拼接/search?q=关键字验证服务 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: _@_.*>

请参考该回复进行配置 #165 (comment)

@Hk-Gosuto 根据您的提示,我完成了第一步,通过vercel部署。在浏览器中,拷贝复制了我自己的那个链接,具体为:
https://ddg-api-xxxxxx.vercel.app/ (我的实际用户名用xxxxxx替代)

然后执行第二步,在vercel的setting - 环境变量中,在key中填入了:WEB_SEARCH_BASE_URL,在value中填入了:https://ddg-api-xxxxxx.vercel.app/ 然后点击重新部署。

很遗憾的是,在刷新的软件搜索栏中,没有出现联网的那个地球图标。不太清楚问题所在。

(只有一处,我的软件设定了需要登录,并输入密码才能访问,不清楚是否与这个设置有关)

那么,后续保存的链接,具体应该是什么呢?您能否说清楚一些,谢谢。 | | @.*** | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年06月16日 12:24 | | 收件人 | _@**._> | | 抄送至 | _@.>@._> | | 主题 | Re: [Yidadaa/ChatGPT-Next-Web] 可以增加联网搜索功能吗? (Issue #165) | @Hk-Gosuto 还是报错。点击部署后,等待1分钟,提示:Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. 这个服务只作为搜索api使用,这个不是报错,是因为服务就没有index,要想测试服务是否可用请自行拼接/search?q=关键字验证服务 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: _@_.*>

请参考该回复进行配置 #165 (comment)

@Hk-Gosuto 根据您的提示,我完成了第一步,通过vercel部署。在浏览器中,拷贝复制了我自己的那个链接,具体为: https://ddg-api-xxxxxx.vercel.app/ (我的实际用户名用xxxxxx替代)

然后执行第二步,在vercel的setting - 环境变量中,在key中填入了:WEB_SEARCH_BASE_URL,在value中填入了:https://ddg-api-xxxxxx.vercel.app/ 然后点击重新部署。

很遗憾的是,在刷新的软件搜索栏中,没有出现联网的那个地球图标。不太清楚问题所在。

(只有一处,我的软件设定了需要登录,并输入密码才能访问,不清楚是否与这个设置有关)

请部署我修改的版本 https://github.com/Hk-Gosuto/ChatGPT-Next-Web

那么,后续保存的链接,具体应该是什么呢?您能否说清楚一些,谢谢。 | | @.*** | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年06月16日 12:24 | | 收件人 | _@**._> | | 抄送至 | _@.>@._> | | 主题 | Re: [Yidadaa/ChatGPT-Next-Web] 可以增加联网搜索功能吗? (Issue #165) | @Hk-Gosuto 还是报错。点击部署后,等待1分钟,提示:Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. 这个服务只作为搜索api使用,这个不是报错,是因为服务就没有index,要想测试服务是否可用请自行拼接/search?q=关键字验证服务 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: _@_.*>

请参考该回复进行配置 #165 (comment)

@Hk-Gosuto 根据您的提示,我完成了第一步,通过vercel部署。在浏览器中,拷贝复制了我自己的那个链接,具体为: https://ddg-api-xxxxxx.vercel.app/ (我的实际用户名用xxxxxx替代)
然后执行第二步,在vercel的setting - 环境变量中,在key中填入了:WEB_SEARCH_BASE_URL,在value中填入了:https://ddg-api-xxxxxx.vercel.app/ 然后点击重新部署。
很遗憾的是,在刷新的软件搜索栏中,没有出现联网的那个地球图标。不太清楚问题所在。
(只有一处,我的软件设定了需要登录,并输入密码才能访问,不清楚是否与这个设置有关)

请部署我修改的版本 https://github.com/Hk-Gosuto/ChatGPT-Next-Web

可以了,谢谢。提醒各位,正确的顺序如下:

  1. 先部署https://github.com/Hk-Gosuto/ddg-api,然后复制浏览器里面的那个地址链接(不考虑无法显示具体html的提示);
  2. 然后部署https://github.com/Hk-Gosuto/ChatGPT-Next-Web,通过vercel在变量中填写第1步的地址链接。
  3. 等待部署成功后,就可以看到星球的支持搜索的图标了。

https://openai.com/blog/function-calling-and-other-api-updates 现在chatgpt已经支持通过API的方式调用插件了,可以考虑直接加进插件功能里面。

image

期待这种方式,函数调用相当于是把插件进行api封装,根据需要选择去调用哪个插件,然后再把结果一起给llm。

commented

那么,后续保存的链接,具体应该是什么呢?您能否说清楚一些,谢谢。 | | @.*** | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年06月16日 12:24 | | 收件人 | _@**._> | | 抄送至 | _@.>@._> | | 主题 | Re: [Yidadaa/ChatGPT-Next-Web] 可以增加联网搜索功能吗? (Issue #165) | @Hk-Gosuto 还是报错。点击部署后,等待1分钟,提示:Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. 这个服务只作为搜索api使用,这个不是报错,是因为服务就没有index,要想测试服务是否可用请自行拼接/search?q=关键字验证服务 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: _@_.*>

请参考该回复进行配置 #165 (comment)

@Hk-Gosuto 根据您的提示,我完成了第一步,通过vercel部署。在浏览器中,拷贝复制了我自己的那个链接,具体为: https://ddg-api-xxxxxx.vercel.app/ (我的实际用户名用xxxxxx替代)
然后执行第二步,在vercel的setting - 环境变量中,在key中填入了:WEB_SEARCH_BASE_URL,在value中填入了:https://ddg-api-xxxxxx.vercel.app/ 然后点击重新部署。
很遗憾的是,在刷新的软件搜索栏中,没有出现联网的那个地球图标。不太清楚问题所在。
(只有一处,我的软件设定了需要登录,并输入密码才能访问,不清楚是否与这个设置有关)

请部署我修改的版本 https://github.com/Hk-Gosuto/ChatGPT-Next-Web

大佬,在同一个对话里,我把联网关了,它还是会搜索再回答,请问这个有办法解决吗?

commented

想问下这个为啥用的是duckduckgo,而不是google等搜索啊?

Bot detected the issue body's language is not English, translate it automatically.


I would like to ask why you use duckduckgo instead of Google and other searches?

想问下这个为啥用的是duckduckgo,而不是google等搜索啊?

google搜索api要单独申请,而且一个月只能访问100次免费额度

Bot detected the issue body's language is not English, translate it automatically.


I would like to ask why duckduckgo is used instead of google and other searches?

The google search api needs to be applied separately, and the free quota can only be accessed 100 times a month

Bot detected the issue body's language is not English, translate it automatically.


Chuanhu used it for a while. It has many functions, but it is more like a self-developed toy. The interface design is not good-looking and unreasonable. This version is better to use, after all, I have been used to it for a long time. Now that you have the API permission of GPT-4, you no longer need to buy a $20 plus per month.

您是如何做到的,跳过plus直接获取api 4.0的权限的? | | @.*** | | @.*** |

就是申请了GPT 4的API权限,后来大概两个星期后收到邮件说可以用了,所以我就退订plus了,现在就是直接用这个软件来使用GPT-4,用多少付多少美刀,比plus便宜多了

Bot detected the issue body's language is not English, translate it automatically.


How did you do it, skip the plus and directly obtain the permission of api 4.0? | | @.*** | | @.*** |

I just applied for the API permission of GPT 4, and then I received an email about two weeks later saying that it can be used, so I unsubscribed plus, and now I use this software directly to use GPT-4, and I pay as much as I want. much cheaper than plus

Bot detected the issue body's language is not English, translate it automatically.


I hope you guys can come up with one.

可以在后台先要求GPT判断问题是否超出知识范围,返回0或者1供代码进行条件分支。然后要求GPT推断最可能包含答案的网页会包含的seo关键词,用空格隔开。然后用这些关键词去调搜索api。

Bot detected the issue body's language is not English, translate it automatically.


In the background, you can first ask GPT to judge whether the problem exceeds the scope of knowledge, and return 0 or 1 for the code to perform conditional branching. Then ask GPT to infer the seo keywords that the webpage most likely to contain the answer will contain, separated by spaces. Then use these keywords to tune the search api.

那么,后续保存的链接,具体应该是什么呢?您能否说清楚一些,谢谢。 | | @.*** | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年06月16日 12:24 | | 收件人 | _@**._> | | 抄送至 | _@.>@._> | | 主题 | Re: [Yidadaa/ChatGPT-Next-Web] 可以增加联网搜索功能吗? (Issue #165) | @Hk-Gosuto 还是报错。点击部署后,等待1分钟,提示:Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. 这个服务只作为搜索api使用,这个不是报错,是因为服务就没有index,要想测试服务是否可用请自行拼接/search?q=关键字验证服务 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: _@_.*>

请参考该回复进行配置 #165 (comment)

@Hk-Gosuto 根据您的提示,我完成了第一步,通过vercel部署。在浏览器中,拷贝复制了我自己的那个链接,具体为: https://ddg-api-xxxxxx.vercel.app/ (我的实际用户名用xxxxxx替代)
然后执行第二步,在vercel的setting - 环境变量中,在key中填入了:WEB_SEARCH_BASE_URL,在value中填入了:https://ddg-api-xxxxxx.vercel.app/ 然后点击重新部署。
很遗憾的是,在刷新的软件搜索栏中,没有出现联网的那个地球图标。不太清楚问题所在。
(只有一处,我的软件设定了需要登录,并输入密码才能访问,不清楚是否与这个设置有关)

请部署我修改的版本 https://github.com/Hk-Gosuto/ChatGPT-Next-Web

Can you synchronize the latest version of Yidadaa? If you can, I would greatly appreciate it. Web search is very useful, but I need to use the new features in order to switch models for each conversation

那么,后续保存的链接,具体应该是什么呢?您能否说清楚一些,谢谢。 | | @.*** | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年06月16日 12:24 | | 收件人 | _@**._> | | 抄送至 | _@.>@._> | | 主题 | Re: [Yidadaa/ChatGPT-Next-Web] 可以增加联网搜索功能吗? (Issue #165) | @Hk-Gosuto 还是报错。点击部署后,等待1分钟,提示:Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. 这个服务只作为搜索api使用,这个不是报错,是因为服务就没有index,要想测试服务是否可用请自行拼接/search?q=关键字验证服务 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: _@_.*>

请参考该回复进行配置 #165 (comment)

@Hk-Gosuto 根据您的提示,我完成了第一步,通过vercel部署。在浏览器中,拷贝复制了我自己的那个链接,具体为: https://ddg-api-xxxxxx.vercel.app/ (我的实际用户名用xxxxxx替代)
然后执行第二步,在vercel的setting - 环境变量中,在key中填入了:WEB_SEARCH_BASE_URL,在value中填入了:https://ddg-api-xxxxxx.vercel.app/ 然后点击重新部署。
很遗憾的是,在刷新的软件搜索栏中,没有出现联网的那个地球图标。不太清楚问题所在。
(只有一处,我的软件设定了需要登录,并输入密码才能访问,不清楚是否与这个设置有关)

请部署我修改的版本 https://github.com/Hk-Gosuto/ChatGPT-Next-Web

Can you synchronize the latest version of Yidadaa? If you can, I would greatly appreciate it. Web search is very useful, but I need to use the new features in order to switch models for each conversation

It's been a bit busy lately, and I'm expected to be busy this weekend.

那么,后续保存的链接,具体应该是什么呢?您能否说清楚一些,谢谢。 | | @.*** | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年06月16日 12:24 | | 收件人 | _@**._> | | 抄送至 | _@.>@._> | | 主题 | Re: [Yidadaa/ChatGPT-Next-Web] 可以增加联网搜索功能吗? (Issue #165) | @Hk-Gosuto 还是报错。点击部署后,等待1分钟,提示:Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. 这个服务只作为搜索api使用,这个不是报错,是因为服务就没有index,要想测试服务是否可用请自行拼接/search?q=关键字验证服务 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: _@_.*>

请参考该回复进行配置 #165 (comment)

@Hk-Gosuto 根据您的提示,我完成了第一步,通过vercel部署。在浏览器中,拷贝复制了我自己的那个链接,具体为: https://ddg-api-xxxxxx.vercel.app/ (我的实际用户名用xxxxxx替代)
然后执行第二步,在vercel的setting - 环境变量中,在key中填入了:WEB_SEARCH_BASE_URL,在value中填入了:https://ddg-api-xxxxxx.vercel.app/ 然后点击重新部署。
很遗憾的是,在刷新的软件搜索栏中,没有出现联网的那个地球图标。不太清楚问题所在。
(只有一处,我的软件设定了需要登录,并输入密码才能访问,不清楚是否与这个设置有关)

请部署我修改的版本 https://github.com/Hk-Gosuto/ChatGPT-Next-Web

Can you synchronize the latest version of Yidadaa? If you can, I would greatly appreciate it. Web search is very useful, but I need to use the new features in order to switch models for each conversation

It's been a bit busy lately, and I'm expected to be busy this weekend.

it's ok just let me know you will sync it regularly.

https://github.com/jarvis2f/ais-ninja

支持联网插件的仓库.

目前看 使用 google,baidu 都需要 自己 填写key, cookie

Bot detected the issue body's language is not English, translate it automatically.


https://github.com/jarvis2f/ais-ninja

A repository that supports networking plugins.

At present, you need to fill in the key and cookie when using google and baidu

那么,后续保存的链接,具体应该是什么呢?您能否说清楚一些,谢谢。 | | @.*** | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年06月16日 12:24 | | 收件人 | _@**._> | | 抄送至 | _@.>@._> | | 主题 | Re: [Yidadaa/ChatGPT-Next-Web] 可以增加联网搜索功能吗? (Issue #165) | @Hk-Gosuto 还是报错。点击部署后,等待1分钟,提示:Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. 这个服务只作为搜索api使用,这个不是报错,是因为服务就没有index,要想测试服务是否可用请自行拼接/search?q=关键字验证服务 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: _@_.*>

请参考该回复进行配置 #165 (comment)

@Hk-Gosuto 根据您的提示,我完成了第一步,通过vercel部署。在浏览器中,拷贝复制了我自己的那个链接,具体为: https://ddg-api-xxxxxx.vercel.app/ (我的实际用户名用xxxxxx替代)
然后执行第二步,在vercel的setting - 环境变量中,在key中填入了:WEB_SEARCH_BASE_URL,在value中填入了:https://ddg-api-xxxxxx.vercel.app/ 然后点击重新部署。
很遗憾的是,在刷新的软件搜索栏中,没有出现联网的那个地球图标。不太清楚问题所在。
(只有一处,我的软件设定了需要登录,并输入密码才能访问,不清楚是否与这个设置有关)

请部署我修改的版本 https://github.com/Hk-Gosuto/ChatGPT-Next-Web

Can you synchronize the latest version of Yidadaa? If you can, I would greatly appreciate it. Web search is very useful, but I need to use the new features in order to switch models for each conversation

It's been a bit busy lately, and I'm expected to be busy this weekend.

it's ok just let me know you will sync it regularly.

I took some time to synchronize the code and refactor it. This update utilizes https://github.com/Snazzah/duck-duck-scrape to implement the web search function, which means there is no need to deploy any additional projects. I hope this update will make your experience even better. Have fun using it.

我是直接使用了openai的库,调用了MixerBox WebSearchG和scholarAI,下面是代码参考例子。
感觉可以加上一些插件,蛮实用的

import openai
import threading

# 设置你的API密钥
openai.api_key = 'key'

def chat_with_gpt_and_plugins(prompt, max_tokens=1000):
    response = openai.ChatCompletion.create(
        model="gpt-4",
        messages=[
            {"role": "system", "content": "你是一个可以使用MixerBox WebSearchG和scholarAI插件的助手。"},
            {"role": "user", "content": prompt}
        ],
        max_tokens=max_tokens
    )
    return response['choices'][0]['message']['content']

def generate_paper_content(title, resources):
    # 首先生成大纲
    outline_prompt = f"为'{title}'生成一个大纲,使用以下资源:{resources}"
    outline = chat_with_gpt_and_plugins(outline_prompt, max_tokens=500).split('\n')
    
    paper_content = ""
    for section in outline:
        # 为每个部分生成详细内容
        section_content = chat_with_gpt_and_plugins(f"为'{section}'写详细内容,使用以下资源:{resources}", max_tokens=1500)
        paper_content += section + "\n" + section_content + "\n"
    
    return paper_content[:10000]

if __name__ == "__main__":
    paper_title = input("请输入您想要的论文标题:")
    web_search_result = chat_with_gpt_and_plugins(f"使用MixerBox WebSearchG搜索'{paper_title}'")
    scholar_search_result = chat_with_gpt_and_plugins(f"使用scholarAI搜索与'{paper_title}'相关的论文")
    resources = f"{web_search_result} 和 {scholar_search_result}"
    paper_content = generate_paper_content(paper_title, resources)
    print(paper_content)

您是如何做到的,跳过plus直接获取api 4.0的权限的? | | @.*** | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年06月24日 19:52 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [Yidadaa/ChatGPT-Next-Web] 可以增加联网搜索功能吗? (Issue #165) | 川虎用了一下,功能挺多的,但是更像是一个自研玩具,界面设计不好看也不合理,还是这个版本比较好用,毕竟用了很久已经习惯。现在有GPT-4的API权限,已经不再每月买20美刀的plus了。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

绑卡充值五刀就解锁了,费钱的

可以对接自建的SearXNG吗,加上format=json的参数就可以返回json格式的搜索结果。

Bot detected the issue body's language is not English, translate it automatically.


Can it be connected to the self-built SearXNG, https://docs.searxng.org/dev/search_api.html, and adding the format=json parameter can return search results in json format.

大家好,想请教一下大家对ChatGPT-Next-Web集成Code Interpreter感兴趣吗?我可以把现在我开发的代码解释器, 集成到ChatGPT-Next-Web里面,贡献到社区. 以下是octogen现在版本的视频

octogen_demo.mp4

欢迎大家一起讨论和交流

Bot detected the issue body's language is not English, translate it automatically.


Hello everyone, I would like to ask if you are interested in ChatGPT-Next-Web integration? I can integrate the [code interpreter] (https://github.com/dbpunk-labs/octogen) I have developed into ChatGPT-Next-Web and contribute it to the community. The following is a video of the current version of octogen

octogen_demo.mp4

Everyone is welcome to discuss and communicate together

我开发的chatgpt客户端支持联网搜索,获取网页内容和执行js代码,虽然相比ChatGPT-Next-Web功能不够齐全,有兴趣的可以看下
https://github.com/SchneeHertz/chat-xiuliu

Bot detected the issue body's language is not English, translate it automatically.


The chatgpt client I developed supports online search, obtaining web content and executing js code. Although it is not fully functional compared to ChatGPT-Next-Web, those who are interested can take a look.
https://github.com/SchneeHertz/chat-xiuliu

希望尽快开发联网插件功能!能联网就更完美了!

Bot detected the issue body's language is not English, translate it automatically.


We hope to develop the networking plug-in function as soon as possible! It would be even better if it can be connected to the Internet!

Is anyone actively working on a plugin feature? I see sporadic talk but no movement.

Is anyone actively working on a plugin feature? I see sporadic talk but no movement.

You can now try Google's bard, which has networking features and is better than gpt 3.5

Is anyone actively working on a plugin feature? I see sporadic talk but no movement.

You can check this. It has one of the best implementation of plugins and I would love to see a Code Interpreter added to it as one of the plugin.

commented

川虎的实现逻辑,我估计是这样的,gui调搜索引擎搜索关键词,然后以一定规则爬取某些网页,和网页的内容,然后喂给gpt,所以川虎会有以下两种情况。 1、就算不填key,开了联网功能后,gui也会回复内容,就是gui调用搜索引擎搜索出的内容 2、结果不稳定,不知道他的抓取规则是什么,每次问爬的网站都不一样。

看过代码了,用了langchain封装好的googlesearch api。

Bot detected the issue body's language is not English, translate it automatically.


The implementation logic of Sichuan Tiger, I estimate, is like this. The GUI adjusts the search engine to search for keywords, and then crawls certain web pages and the content of the web pages according to certain rules, and then feeds them to gpt. Therefore, Sichuan Tiger will have the following two situations. . 1. Even if you don’t fill in the key, after turning on the networking function, the gui will reply with the content, which is the content that the gui calls the search engine to search for. 2. The results are unstable. I don’t know what his crawling rules are. Every time I ask what website to crawl. They are all different.

I have seen the code and used the googlesearch api encapsulated by langchain.

commented

现在的联网搜索功能如果用第三方API那成本太高了。
如果自己集成一个阅读器把返回的结果录入到GPT里也不是不行。
或手工自己录入(可配合泄露的提示词):
1、输入网址,进入阅读器模式(阅读器模式可用浏览器自带或插件SimpRead)
2、CTRL+A复制内容
3、把AI回复的内容修改掉
4、让其总结或者做你需要的事情

Bot detected the issue body's language is not English, translate it automatically.


If the current Internet search function uses a third-party API, the cost will be too high.
It is not impossible if you integrate a reader yourself and enter the returned results into GPT.
Or enter it manually (can be combined with leaked prompt words)

强烈建议优先加入DALL·E 3插件功能。

Bot detected the issue body's language is not English, translate it automatically.


It is strongly recommended to add the DALL·E 3 plug-in function first.

Interesting about this Issue

By the way, the function calling allows AI for visiting websites, but not all websites can be accessed. It's most likely that only trusted sites are permitted.

image

image

code :

{
  "name": "visit_website",
  "parameters": {
    "type": "object",
    "properties": {
      "url": {
        "type": "string",
        "description": "The URL of the website to visit"
      }
    },
    "required": [
      "https://teapot-cat.pages.dev/teapot.png"
    ]
  },
  "description": "Visit a website"
}

强烈建议优先加入DALL·E 3插件功能。

这个我支持。DALL·E 3效果比2好多了。