incognitolm commited on
Commit
173f635
·
1 Parent(s): 4975320

Update chatStream.js

Browse files
Files changed (1) hide show
  1. server/chatStream.js +1 -1
server/chatStream.js CHANGED
@@ -30,7 +30,7 @@ async function gradioSearch(query) {
30
  body: JSON.stringify({ query }),
31
  });
32
  const res = await req.json();
33
- if (!req.ok || !res.result) {
34
  throw new Error(`Search API error: ${res.error || req.statusText}`);
35
  }
36
  return res.results[0];
 
30
  body: JSON.stringify({ query }),
31
  });
32
  const res = await req.json();
33
+ if (!req.ok || !res.results) {
34
  throw new Error(`Search API error: ${res.error || req.statusText}`);
35
  }
36
  return res.results[0];