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

[Feature Request] 增加两个功能 #313

Open
qingyuan0o0 opened this issue Oct 16, 2024 · 31 comments
Open

[Feature Request] 增加两个功能 #313

qingyuan0o0 opened this issue Oct 16, 2024 · 31 comments
Labels
enhancement New feature or request

Comments

@qingyuan0o0
Copy link

🥰 需求描述

1.以前谷歌搜索是用api,现在是类似ddg,希望可以自行修改url地址
2.希望可以更新模型列表,昨天更新后发现使用自定义后端,到gptweb端看到用的还是3.5模型,测试自定义gpt-4o-mini无效

🧐 解决方案

1.g009le的url使用镜像站,参考项目,后续参数一模一样,在有参数的时候启用

📝 补充信息

No response

@qingyuan0o0 qingyuan0o0 added the enhancement New feature or request label Oct 16, 2024
@Issues-translate-bot
Copy link

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


Title: [Feature Request] Add two functions

🥰 Description of requirements

  1. In the past, Google search used API, but now it is similar to DDG. I hope I can modify the URL address by myself.
  2. I hope that the model list can be updated. After updating yesterday, I found that a custom backend was used. When I went to gptweb, I saw that the 3.5 model was still used. The test of the custom gpt-4o-mini was invalid.

🧐 Solution

  1. The URL of g009le uses the mirror site, [Reference Project] (https://51.ruyo.net/4880.html), the subsequent parameters are exactly the same, and are enabled when there are parameters.

📝 Supplementary information

No response

@Hk-Gosuto
Copy link
Owner

👌 晚一些处理

@Issues-translate-bot
Copy link

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


👌 Process it later

@qingyuan0o0
Copy link
Author

因为其他搜索站点AD太多,我喜欢用这个不能登录的搜索镜像,已经稳定用了挺长时间😀

@Issues-translate-bot
Copy link

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


Because there are too many ADs on other search sites, I like to use this search mirror that cannot be logged in. I have been using it stably for a long time😀

@Hk-Gosuto
Copy link
Owner

google 搜索的插件指的是 GoogleCustomSearch 还是 ChooseSearchEngine 中的 google 选项?
自定义模型可以通过环境变量 CUSTOM_MODELS 来配置,是配置后后端接口调用无效?

@Issues-translate-bot
Copy link

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


Does the google search plug-in refer to GoogleCustomSearch or the google option in ChooseSearchEngine?
Custom models can be configured through the environment variable CUSTOM_MODELS. Is the backend interface call invalid after configuration?

@qingyuan0o0
Copy link
Author

qingyuan0o0 commented Oct 20, 2024

google 搜索的插件指的是 GoogleCustomSearch 还是 ChooseSearchEngine 中的 google 选项?
自定义模型可以通过环境变量 CUSTOM_MODELS 来配置,是配置后后端接口调用无效?

非api模式,是代替vvvvvv.9009Ie.com的网址
其实如果指定了正确api的地址做镜像,一样可以作为api的镜像,api镜像应该用cloudflare实现,非api模式用cf会触发验证

@Issues-translate-bot
Copy link

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


Does the google search plug-in refer to GoogleCustomSearch or the google option in ChooseSearchEngine?
Custom models can be configured through the environment variable CUSTOM_MODELS. Is the backend interface call invalid after configuration?

Non-api mode is the URL that replaces vvvvvv.9009Ie.com

@Hk-Gosuto
Copy link
Owner

没听懂具体需要修改什么

@Issues-translate-bot
Copy link

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


I don’t understand what exactly needs to be modified.

@qingyuan0o0
Copy link
Author

没听懂具体需要修改什么

你访问下iw.mk/google搜索试试?

@Issues-translate-bot
Copy link

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


I don’t understand what exactly needs to be modified.

Can you visit iw.mk/google and try searching?

@Hk-Gosuto
Copy link
Owner

是想给 google 搜索插件增加类似 DDG_API_PROXY_PREFIX 的参数?

@Issues-translate-bot
Copy link

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


Do you want to add parameters like DDG_API_PROXY_PREFIX to the google search plug-in?

@qingyuan0o0
Copy link
Author

是想给 google 搜索插件增加类似 DDG_API_PROXY_PREFIX 的参数?

不是的,直接代替www.google.com

@Issues-translate-bot
Copy link

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


Do you want to add parameters similar to DDG_API_PROXY_PREFIX to the google search plug-in?

No, directly replace www.google.com

@Hk-Gosuto
Copy link
Owner

只是替换的话只能作用在 ChooseSearchEngine 插件的 google 模式下

@Issues-translate-bot
Copy link

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


If you just replace it, it can only be used in the google mode of the ChooseSearchEngine plug-in.

@qingyuan0o0
Copy link
Author

只是替换的话只能作用在 ChooseSearchEngine 插件的 google 模式下
不知道我之前提供的ddg变量方式是否会被谷歌屏蔽,如果不会ddg的方案可用

@Issues-translate-bot
Copy link

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


If it is just a replacement, it can only be used in the google mode of the ChooseSearchEngine plug-in.
I don’t know if the ddg variable method I provided before will be blocked by Google. If not, the ddg solution is available.

Hk-Gosuto added a commit that referenced this issue Oct 28, 2024
@Hk-Gosuto
Copy link
Owner

增加了 GOOGLE_PLUGIN_API_PROXY_PREFIX 环境变量,与 DDG_API_PROXY_PREFIX 使用方法一致,同时作用在 GoogleCustomSearchChooseSearchEngine 两个插件。

@Issues-translate-bot
Copy link

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


Added the GOOGLE_PLUGIN_API_PROXY_PREFIX environment variable, which is consistent with the usage of DDG_API_PROXY_PREFIX and affects both the GoogleCustomSearch and ChooseSearchEngine plug-ins.

@qingyuan0o0
Copy link
Author

qingyuan0o0 commented Oct 28, 2024

增加了 GOOGLE_PLUGIN_API_PROXY_PREFIX 环境变量,与 DDG_API_PROXY_PREFIX 使用方法一致,同时作用在 GoogleCustomSearchChooseSearchEngine 两个插件。

作者你访问下iw.mk/ceshi

@Issues-translate-bot
Copy link

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


Added the GOOGLE_PLUGIN_API_PROXY_PREFIX environment variable, which is consistent with the usage of DDG_API_PROXY_PREFIX and affects both the GoogleCustomSearch and ChooseSearchEngine plug-ins.

Author, please visit iw.mj/ceshi

@Hk-Gosuto
Copy link
Owner

我理解你的意思,你是想反代 www.google.com 是吧。
不过只有 ChooseSearchEngine 是直接请求的 www.google.com,插件 GoogleCustomSearch 请求的地址是 www.googleapis.com,都走同一个反代并不通用。

@Issues-translate-bot
Copy link

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


I understand what you mean, you want to rebel against www.google.com, right?
However, only ChooseSearchEngine directly requests www.google.com, and the plug-in GoogleCustomSearch requests the address www.googleapis.com. It is not universal to use the same reverse generation.

@qingyuan0o0
Copy link
Author

我理解你的意思,你是想反代 www.google.com 是吧。
不过只有 ChooseSearchEngine 是直接请求的 www.google.com,插件 GoogleCustomSearch 请求的地址是 www.googleapis.com,都走同一个反代并不通用。

好的,我明白了,谢谢,我找下解决方案

@Issues-translate-bot
Copy link

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


I understand what you mean, you want to rebel against www.google.com, right?
However, only ChooseSearchEngine directly requests www.google.com, and the plug-in GoogleCustomSearch requests the address www.googleapis.com. It is not universal to use the same reverse generation.

Okay, I understand, thank you, I'll find a solution

@Hk-Gosuto
Copy link
Owner

我理解你的意思,你是想反代 www.google.com 是吧。
不过只有 ChooseSearchEngine 是直接请求的 www.google.com,插件 GoogleCustomSearch 请求的地址是 www.googleapis.com,都走同一个反代并不通用。

好的,我明白了,谢谢,我找下解决方案

两个插件的代码在这里,你直接修改插件替换也可以,或者你可以告诉我你用的是哪个插件,我加个完全替代 URL 的变量:

`${API_PROXY_PREFIX}https://www.google.com/search?nfpr=1&num=${maxResults}&pws=0&q=${encodeURIComponent(

`${API_PROXY_PREFIX}https://www.googleapis.com/customsearch/v1?key=${this.apiKey}&cx=${

@Issues-translate-bot
Copy link

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


I understand what you mean, you want to rebel against www.google.com, right?
But only ChooseSearchEngine is directly requested www.google.com, plug-in The requested address of GoogleCustomSearch is [www.googleapis.com. It is not universal to use the same reverse generation. ](http://www.googleapis.com%EF%BC%8C%E9%83%BD%E8%B5%B0%E5%90%8C%E4%B8%80%E4%B8%AA%E5% 8F%8D%E4%BB%A3%E5%B9%B6%E4%B8%8D%E9%80%9A%E7%94%A8%E3%80%82)

Okay, I understand, thank you, I will find a solution

The codes of the two plug-ins are here. You can directly modify the plug-in and replace it, or you can tell me which plug-in you are using, and I will add a variable that completely replaces the URL:

`${API_PROXY_PREFIX}https://www.google.com/search?nfpr=1&num=${maxResults}&pws=0&q=${encodeURIComponent(

`${API_PROXY_PREFIX}https://www.googleapis.com/customsearch/v1?key=${this.apiKey}&cx=${

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants