You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"SearchApi delivers structured data from search engines like Google Search, Bing Search, Baidu Search, Google News, YouTube, and many more. Free for 100 queries, but then paid. ",
Copy file name to clipboardExpand all lines: server/utils/agents/aibitat/plugins/web-browsing.js
+77Lines changed: 77 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,9 @@ const webBrowsing = {
62
62
case"google-search-engine":
63
63
engine="_googleSearchEngine";
64
64
break;
65
+
case"searchapi":
66
+
engine="_searchApi";
67
+
break;
65
68
case"serper-dot-dev":
66
69
engine="_serperDotDev";
67
70
break;
@@ -130,6 +133,80 @@ const webBrowsing = {
130
133
returnJSON.stringify(data);
131
134
},
132
135
136
+
/**
137
+
* Use SearchApi
138
+
* SearchApi supports multiple search engines like Google Search, Bing Search, Baidu Search, Google News, YouTube, and many more.
139
+
* https://www.searchapi.io/
140
+
*/
141
+
_searchApi: asyncfunction(query){
142
+
if(!process.env.AGENT_SEARCHAPI_API_KEY){
143
+
this.super.introspect(
144
+
`${this.caller}: I can't use SearchApi searching because the user has not defined the required API key.\nVisit: https://www.searchapi.io/ to create the API key for free.`
145
+
);
146
+
return`Search is disabled and no content was found. This functionality is disabled because the user has not set it up yet.`;
147
+
}
148
+
149
+
this.super.introspect(
150
+
`${this.caller}: Using SearchApi to search for "${
0 commit comments