Add debug result console logs for websearch APIs
| @@ -112,6 +112,7 @@ router.post('/serpapi', jsonParser, async (request, response) => { | |||
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | const data = await result.json(); | 114 | const data = await result.json(); |
| 115 | console.debug('SerpApi response', data); | ||
| 115 | return response.json(data); | 116 | return response.json(data); |
| 116 | } catch (error) { | 117 | } catch (error) { |
| 117 | console.error(error); | 118 | console.error(error); |
| @@ -255,6 +256,7 @@ router.post('/tavily', jsonParser, async (request, response) => { | |||
| 255 | } | 256 | } |
| 256 | 257 | ||
| 257 | const data = await result.json(); | 258 | const data = await result.json(); |
| 259 | console.debug('Tavily response', data); | ||
| 258 | return response.json(data); | 260 | return response.json(data); |
| 259 | } catch (error) { | 261 | } catch (error) { |
| 260 | console.error(error); | 262 | console.error(error); |
| @@ -290,6 +292,7 @@ router.post('/koboldcpp', jsonParser, async (request, response) => { | |||
| 290 | } | 292 | } |
| 291 | 293 | ||
| 292 | const data = await result.json(); | 294 | const data = await result.json(); |
| 295 | console.debug('KoboldCpp search response', data); | ||
| 293 | return response.json(data); | 296 | return response.json(data); |
| 294 | } catch (error) { | 297 | } catch (error) { |
| 295 | console.error(error); | 298 | console.error(error); |
| @@ -331,6 +334,7 @@ router.post('/serper', jsonParser, async (request, response) => { | |||
| 331 | } | 334 | } |
| 332 | 335 | ||
| 333 | const data = await result.json(); | 336 | const data = await result.json(); |
| 337 | console.debug('Serper response', data); | ||
| 334 | return response.json(data); | 338 | return response.json(data); |
| 335 | } catch (error) { | 339 | } catch (error) { |
| 336 | console.error(error); | 340 | console.error(error); |