mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2026-07-21 09:35:22 -04:00
add break statements to switch case
This commit is contained in:
@@ -258,6 +258,7 @@ const webBrowsing = {
|
||||
extensions,
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "google_maps":
|
||||
response.local_results?.slice(0, 10).forEach((searchResult) => {
|
||||
const {
|
||||
@@ -279,6 +280,7 @@ const webBrowsing = {
|
||||
extensions,
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "google_images_light":
|
||||
response.images_results
|
||||
?.slice(0, 10)
|
||||
@@ -291,6 +293,7 @@ const webBrowsing = {
|
||||
thumbnail,
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "google_shopping_light":
|
||||
response.shopping_results
|
||||
?.slice(0, 10)
|
||||
@@ -316,6 +319,7 @@ const webBrowsing = {
|
||||
product_link,
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "google_news_light":
|
||||
response.news_results?.slice(0, 10).forEach((searchResult) => {
|
||||
const { title, link, source, thumbnail, snippet, date } =
|
||||
@@ -329,6 +333,7 @@ const webBrowsing = {
|
||||
date,
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "google_jobs":
|
||||
response.jobs_results?.forEach((searchResult) => {
|
||||
const {
|
||||
@@ -348,6 +353,7 @@ const webBrowsing = {
|
||||
extensions,
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "google_patents":
|
||||
response.organic_results?.forEach((searchResult) => {
|
||||
const {
|
||||
@@ -367,6 +373,7 @@ const webBrowsing = {
|
||||
publication_number,
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "google_scholar":
|
||||
response.organic_results?.forEach((searchResult) => {
|
||||
const { title, link, snippet, publication_info } =
|
||||
@@ -378,6 +385,7 @@ const webBrowsing = {
|
||||
publication_info,
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "baidu":
|
||||
if (response.hasOwnProperty("answer_box"))
|
||||
data.push(response.answer_box);
|
||||
@@ -389,6 +397,7 @@ const webBrowsing = {
|
||||
snippet,
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "amazon":
|
||||
response.organic_results
|
||||
?.slice(0, 10)
|
||||
|
||||
Reference in New Issue
Block a user