Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 有很大概率不能成功调用搜索插件,高度可复现 #3882

Closed
TonyBlur opened this issue Sep 10, 2024 · 25 comments
Closed

[Bug] 有很大概率不能成功调用搜索插件,高度可复现 #3882

TonyBlur opened this issue Sep 10, 2024 · 25 comments
Labels
🐛 Bug Something isn't working | 缺陷 Inactive No response in 30 days | 超过 30 天未活跃

Comments

@TonyBlur
Copy link

TonyBlur commented Sep 10, 2024

📦 部署环境

Vercel

📌 软件版本

v1.15.33

💻 系统环境

Windows

🌐 浏览器

Edge

🐛 问题描述

在对话过程中有很大概率无法正常调用搜索插件,提示“启用网络搜索”或提示“正在搜索请稍后”,但是不返回任何信息

📷 复现步骤

在对话中启用搜索插件并已经在环境变量中配置好Serp API Key,并确认当前使用的代理API支持tools-calling
询问需要网络搜索的内容,这时会回复如下内容:
image
或者
image
之后便没有任何响应,即使不启用任何其他插件,并手动填写Serp API Key,或重新安装插件都无法解决该问题
但是偶尔也会正常工作,例如下面这种情况:
image

🚦 期望结果

希望修复保证插件能稳定调用

📝 补充信息

No response

@TonyBlur TonyBlur added the 🐛 Bug Something isn't working | 缺陷 label Sep 10, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Sep 10, 2024
@lobehubbot
Copy link
Member

👀 @TonyBlur

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@TonyBlur
Copy link
Author

补充:
还有一种情况,就是调用了插件但是不返回结果,如下图:
image

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Replenish:
There is another situation where the plug-in is called but no result is returned, as shown below:
image

Copy link

dosubot bot commented Sep 10, 2024

Hey @TonyBlur! I'm here to help with bug fixes, troubleshooting, and more. Let's squash those bugs together! 🤖

I found some similar discussions and issues that might be relevant to your problem:

  1. [Bug] 插件无法正常调用,回复需要等待然后不再回答 - This discussion suggests that the issue might be due to using a service provider that does not support Function Calling. It recommends using an official API service provider [1].
  2. [Q&A] 使用第三方模型,为什么插件没有生效? - This discussion mentions that the plugin's function calling is a feature of the OpenAI model and may not be supported by third-party models [2].
  3. 搜索插件都用不了呢[Bug] - This closed issue was related to the inability to use search plugins and was referenced by another issue indicating that models with poor tool calling capabilities, such as Google Gemini, might be the cause [3].

To troubleshoot and potentially resolve your issue, you can try the following steps:

  1. Verify API Key and Configuration:

    • Ensure that the Serp API Key is correctly configured in your environment variables.
    • Double-check that the API service provider supports Function Calling.
  2. Check Plugin Installation and Enablement:

    • Make sure the search plugin is properly installed and enabled in the Plugin Store.
    • Navigate to "Extension Tools" -> "Plugin Store" in the session toolbar, find the search plugin, and ensure it is enabled under the current assistant.
  3. Test with Official API Service Provider:

    • If you are using a third-party API service provider, consider switching to an official API service provider that supports Function Calling.
  4. Review Plugin Logs:

    • Check the logs for any errors related to the plugin calls. This can provide more insight into what might be going wrong.

If the issue persists, you might want to look into the specific configurations and requirements for enabling the search plugin as detailed in the LobeChat Plugin Development Guide.

These steps should help you identify and resolve the issue with the search plugin not responding as expected.

To continue talking to Dosu, mention @dosu.

@TonyBlur TonyBlur changed the title [Bug] 有很大概率不能成功调用搜素插件,高度可复现 [Bug] 有很大概率不能成功调用搜索插件,高度可复现 Sep 10, 2024
@arvinxx
Copy link
Contributor

arvinxx commented Sep 10, 2024

你用的是openai 官方的key吗

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Are you using the official openai key?

@TonyBlur
Copy link
Author

你用的是openai 官方的key吗

并不是😢,还是是主要因为这个原因嘛,但是偶尔还是能正常调用插件的就很怪,而且同一个endpoint和key之前也是正常没问题的,但是最近就出问题了

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Are you using the official openai key?

It's not 😢, it's mainly because of this reason, but it's strange that the plug-in can still be called normally occasionally, and the same endpoint and key were working normally before, but something went wrong recently.

@TonyBlur
Copy link
Author

TonyBlur commented Sep 10, 2024

你用的是openai 官方的key吗

疑似主要是插件的问题,我刚刚使用另一个搜索插件(通过 Serper 搜索 Google)是完全正常的
Screenshot_2024-09-10-21-26-20-018_com.microsoft.emmx.jpg

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Are you using the official openai key?

It seems to be mainly a plug-in problem. I just used another search plug-in (searching Google through Serper) and it is completely normal.

@arvinxx
Copy link
Contributor

arvinxx commented Sep 10, 2024

@TonyBlur
image

这种 case 是有可能的

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@TonyBlur
image

This case is possible

@TonyBlur
Copy link
Author

大佬,因为我测试的时候反复尝试删除和填写插件的key,是否有可能是由于环境变量配置的key没有生效导致 有调用但无回应 这种情况
因为我刚才又换了一个设备测试,发现如果我手动填进去搜索的key,还是很大概率能正常调用搜索并回复的

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Sir, because I repeatedly tried to delete and fill in the plug-in key during the test, is it possible that the key configured in the environment variable did not take effect, causing there is a call but no response in this situation?
Because I just changed another device to test, and found that if I manually fill in the search key, there is still a high probability that I can call the search and reply normally.

@TonyBlur
Copy link
Author

大佬,因为我测试的时候反复尝试删除和填写插件的key,是否有可能是由于环境变量配置的key没有生效导致 有调用但无回应 这种情况
因为我刚才又换了一个设备测试,发现如果我手动填进去搜索的key,还是很大概率能正常调用搜索并回复的

我测试以后发现可以稳定复现:即使在环境变量配置好key的前提下,还是需要在插件设置内填写key才能正常使用搜索插件
也就是说可能环境变量没有生效,我确认我是参考doc中的格式进行填写无误了,所以大概这是个bug?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Boss, because I repeatedly tried to delete and fill in the plug-in key during the test, is it possible that the key configured in the environment variable did not take effect, causing there is a call but no response in this situation?
Because I just changed another device to test, and found that if I manually fill in the search key, there is a high probability that I can call the search and reply normally.

After testing, I found that it can be reproduced stably: Even if the key is configured in the environment variable, you still need to fill in the key in the plug-in settings to use the search plug-in normally.
In other words, the environment variables may not have taken effect. I confirmed that I filled in the format correctly according to the format in the doc, so maybe this is a bug?

@arvinxx
Copy link
Contributor

arvinxx commented Sep 10, 2024

我测试以后发现可以稳定复现:即使在环境变量配置好key的前提下,还是需要在插件设置内填写key才能正常使用搜索插件
也就是说可能环境变量没有生效,我确认我是参考doc中的格式进行填写无误了,所以大概这是个bug?

我晚点看看吧

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


After testing, I found that it can be reproduced stably: Even if the key is configured in the environment variable, you still need to fill in the key in the plug-in settings to use the search plug-in normally.
In other words, the environment variables may not have taken effect. I confirmed that I filled in the format correctly according to the format in the doc, so maybe this is a bug?

I'll check it out later

@TonyBlur
Copy link
Author

我测试以后发现可以稳定复现:即使在环境变量配置好key的前提下,还是需要在插件设置内填写key才能正常使用搜索插件
也就是说可能环境变量没有生效,我确认我是参考doc中的格式进行填写无误了,所以大概这是个bug?

我晚点看看吧

辛苦大佬❤️

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


After testing, I found that it can be reproduced stably: Even if the key is configured in the environment variable, you still need to fill in the key in the plug-in settings to use the search plug-in normally.
In other words, the environment variables may not have taken effect. I confirmed that I filled in the format correctly according to the format in the doc, so maybe this is a bug?

I'll check it out later

Thank you for your hard work❤️

@lobehubbot lobehubbot added the Inactive No response in 30 days | 超过 30 天未活跃 label Nov 10, 2024
@m0eak
Copy link

m0eak commented Dec 15, 2024

我测试以后发现可以稳定复现:即使在环境变量配置好key的前提下,还是需要在插件设置内填写key才能正常使用搜索插件
也就是说可能环境变量没有生效,我确认我是参考doc中的格式进行填写无误了,所以大概这是个bug?

我晚点看看吧

我也是这样,昨天通过 Serper 搜索 Google是完全正常的,今天突然就不行了

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


After testing, I found that it can be reproduced stably: Even if the key is configured in the environment variable, you still need to fill in the key in the plug-in settings to use the search plug-in normally.
In other words, the environment variables may not have taken effect. I confirmed that I filled in the format correctly according to the format in the doc, so maybe this is a bug?

I'll check it out later

It's the same for me. Yesterday it was completely normal to search Google through Serper, but today it suddenly doesn't work.

@jeasion
Copy link

jeasion commented Jan 22, 2025

same for me

@arvinxx arvinxx added this to the Plugin Message Refactor milestone Feb 13, 2025
@arvinxx
Copy link
Contributor

arvinxx commented Feb 24, 2025

it should be fixed in #6446

@arvinxx arvinxx closed this as completed Feb 24, 2025
@github-project-automation github-project-automation bot moved this from Roadmap - Chat 1.x to Done in Lobe Chat Routine Feb 24, 2025
@lobehubbot
Copy link
Member

@TonyBlur

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 Inactive No response in 30 days | 超过 30 天未活跃
Projects
Status: Done
Development

No branches or pull requests

5 participants