leptonai / search_with_lepton

Building a quick conversation-based search demo with Lepton AI.
https://search.lepton.run
Apache License 2.0
7.73k stars 980 forks source link

"Application error: a client-side exception has occurred" when rendering the answer #51

Closed aspirinj closed 7 months ago

aspirinj commented 7 months ago

Failed to render the answer. The browser displayed Application error: a client-side exception has occurred (see the browser console for more information). error.

In the chrome console:

938-fe6b19e2b7ce9569.js:1 TypeError: Failed to construct 'URL': Invalid URL
    at v (page-aa42ac90a70baa43.js:1:5723)
    at rb (fd9d1056-7fda3e9b28bca7f7.js:1:40329)
    at iU (fd9d1056-7fda3e9b28bca7f7.js:1:116116)
    at o2 (fd9d1056-7fda3e9b28bca7f7.js:1:94369)
    at fd9d1056-7fda3e9b28bca7f7.js:1:94191
    at o1 (fd9d1056-7fda3e9b28bca7f7.js:1:94198)
    at oV (fd9d1056-7fda3e9b28bca7f7.js:1:91685)
    at oB (fd9d1056-7fda3e9b28bca7f7.js:1:91110)
    at MessagePort.w (938-fe6b19e2b7ce9569.js:1:99426)

I checked the result variable in stream_and_upload_to_kv() method, it contains a valid string "'[{"kind": "customsearch#result", "title": "This is Why We \'Live Long and Prosper\' | Star Trek", "ht......"

My setup: OS: windows 11 node: v18.19.0 python: 3.11.41 leptonai 0.16.0 openai 1.10.0

image

seanxuu commented 7 months ago

same here

seanxuu commented 7 months ago

same here

I try to use the google api and I deploy the service at the lepton.run

chinern commented 7 months ago

?

On Wed, 7 Feb 2024 at 6:19 PM, Sean @.***> wrote:

same here

I try to use the google api and I deploy the service at the lepton.run

— Reply to this email directly, view it on GitHub https://github.com/leptonai/search_with_lepton/issues/51#issuecomment-1931722175, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRA5EGRK65F2JMGLTJKDK3YSNILXAVCNFSM6AAAAABC2SGTRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZRG4ZDEMJXGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Szmbbq commented 7 months ago

Same here. BACKEND=GOOGLE won't work.

seanxuu commented 7 months ago

Same here. BACKEND=GOOGLE won't work.

I think it is because the format of google's results does not match the front-end codes(BING works fine). But I can not find the solution....

seanxuu commented 7 months ago

Same here. BACKEND=GOOGLE won't work.

I just find the https://github.com/leptonai/search_with_lepton/pull/49 solves the problem!

Maybe you can have a try.

Szmbbq commented 7 months ago

Same here. BACKEND=GOOGLE won't work.

I just find the #49 solves the problem!

Maybe you can have a try.

Thanks for sharing. Just confirmed it worked.

aspirinj commented 7 months ago

Same here. BACKEND=GOOGLE won't work.

I just find the #49 solves the problem!

Maybe you can have a try.

Thanks! It works with this fix. Hopefully the PR will be merged soon. Close for now.