mirror of
https://github.com/alibaba/higress.git
synced 2026-05-28 22:57:31 +08:00
fix(typo): use the correct bing name for ai-search. (#1807)
Signed-off-by: maratrixx <maratrix@163.com>
This commit is contained in:
@@ -127,7 +127,7 @@ searchFrom:
|
|||||||
cx: "news-search-id" # 专门搜索Google News内容的搜索引擎ID
|
cx: "news-search-id" # 专门搜索Google News内容的搜索引擎ID
|
||||||
serviceName: "google-svc.dns"
|
serviceName: "google-svc.dns"
|
||||||
servicePort: 443
|
servicePort: 443
|
||||||
- type: being
|
- type: bing
|
||||||
apiKey: "bing-key"
|
apiKey: "bing-key"
|
||||||
serviceName: "bing-svc.dns"
|
serviceName: "bing-svc.dns"
|
||||||
servicePort: 443
|
servicePort: 443
|
||||||
@@ -191,7 +191,7 @@ searchFrom:
|
|||||||
needReference: true
|
needReference: true
|
||||||
referenceFormat: "### 数据来源\n%s"
|
referenceFormat: "### 数据来源\n%s"
|
||||||
searchFrom:
|
searchFrom:
|
||||||
- type: being
|
- type: bing
|
||||||
apiKey: "your-bing-key"
|
apiKey: "your-bing-key"
|
||||||
serviceName: "search-service.dns"
|
serviceName: "search-service.dns"
|
||||||
servicePort: 8080
|
servicePort: 8080
|
||||||
|
|||||||
@@ -138,10 +138,10 @@ func parseConfig(json gjson.Result, config *Config, log wrapper.Log) error {
|
|||||||
var internetExists, privateExists, arxivExists bool
|
var internetExists, privateExists, arxivExists bool
|
||||||
for _, e := range json.Get("searchFrom").Array() {
|
for _, e := range json.Get("searchFrom").Array() {
|
||||||
switch e.Get("type").String() {
|
switch e.Get("type").String() {
|
||||||
case "being":
|
case "bing":
|
||||||
searchEngine, err := bing.NewBingSearch(&e)
|
searchEngine, err := bing.NewBingSearch(&e)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("being search engine init failed:%s", err)
|
return fmt.Errorf("bing search engine init failed:%s", err)
|
||||||
}
|
}
|
||||||
config.engine = append(config.engine, searchEngine)
|
config.engine = append(config.engine, searchEngine)
|
||||||
internetExists = true
|
internetExists = true
|
||||||
|
|||||||
Reference in New Issue
Block a user