Merge branch 'nsc/mvp-search'
This commit is contained in:
commit
56c810947e
@ -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(
|
||||
|
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user