Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Nick:

Nicolas479fa2f7f886
diff --git a/apps/api/src/search/index.ts b/apps/api/src/search/index.ts
index 0f3a59673..ae624516d 100644
--- a/apps/api/src/search/index.ts
+++ b/apps/api/src/search/index.ts
@@ -23,7 +23,7 @@ export async function search({
timeout?: number;
}) {
try {
- if (process.env.SERPER_API_KEY) {
+ if (process.env.SERPER_API_KEY && !tbs) {
return await serper_search(query, num_results);
}
return await google_search(
diff --git a/apps/api/src/search/serper.ts b/apps/api/src/search/serper.ts
index f92f2fc53..2b4ba02e7 100644
--- a/apps/api/src/search/serper.ts
+++ b/apps/api/src/search/serper.ts
@@ -6,7 +6,8 @@ dotenv.config();
export async function serper_search(q, num_results) : Promise<string[]> {
let data = JSON.stringify({
q: q,
- "num": num_results
+ "num": num_results,
+
});
let config = {