Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

> python3 search_with_lepton.py #86

Open
New-King opened this issue Jun 19, 2024 · 3 comments
Open

> python3 search_with_lepton.py #86

New-King opened this issue Jun 19, 2024 · 3 comments

Comments

@New-King
Copy link

I know the default is Lepton, but...(All is normal yesterday)
(env) root@iZt4n5462zgbdxz4pnhy3iZ:/home/search_with_lepton# python3 search_with_lepton.py
/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/photon/photon.py:605: RuntimeWarning: This photon expects secret BING_SEARCH_V7_SUBSCRIPTION_KEY, but it's not set. Please set it before running the photon, or you may get unexpected behavior.
warnings.warn(
/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/photon/photon.py:605: RuntimeWarning: This photon expects secret GOOGLE_SEARCH_API_KEY, but it's not set. Please set it before running the photon, or you may get unexpected behavior.
warnings.warn(
/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/photon/photon.py:605: RuntimeWarning: This photon expects secret SERPER_SEARCH_API_KEY, but it's not set. Please set it before running the photon, or you may get unexpected behavior.
warnings.warn(
/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/photon/photon.py:605: RuntimeWarning: This photon expects secret SEARCHAPI_API_KEY, but it's not set. Please set it before running the photon, or you may get unexpected behavior.
warnings.warn(
/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/photon/photon.py:605: RuntimeWarning: This photon expects secret LEPTON_WORKSPACE_TOKEN, but it's not set. Please set it before running the photon, or you may get unexpected behavior.
warnings.warn(
self.backend LEPTON
Traceback (most recent call last):
File "/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/client.py", line 472, in _raise_for_detailed_status
detail = res.json()["error"]
File "/home/search_with_lepton/env/lib/python3.10/site-packages/httpx/_models.py", line 764, in json
return jsonlib.loads(self.content, **kwargs)
File "/home/search_with_lepton/env/lib/python3.10/site-packages/httpx/_models.py", line 570, in content
raise ResponseNotRead()
httpx.ResponseNotRead: Attempted to access streaming response content, without having called read().

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/search_with_lepton/search_with_lepton.py", line 651, in
rag.launch()
File "/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/photon/photon.py", line 909, in launch
self._call_init_once()
File "/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/photon/photon.py", line 626, in _call_init_once
self._init_res = self.init()
File "/home/search_with_lepton/search_with_lepton.py", line 389, in init
self.leptonsearch_client = Client(
File "/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/client.py", line 334, in init
if not self.healthz():
File "/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/client.py", line 578, in healthz
self._get_proper_res_content(res)
File "/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/client.py", line 500, in _get_proper_res_content
is_stream, non_stream_content = next(content)
File "/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/client.py", line 486, in _generator
self._raise_for_detailed_status(res)
File "/home/search_with_lepton/env/lib/python3.10/site-packages/leptonai/client.py", line 474, in _raise_for_detailed_status
detail = res.text
File "/home/search_with_lepton/env/lib/python3.10/site-packages/httpx/_models.py", line 576, in text
content = self.content
File "/home/search_with_lepton/env/lib/python3.10/site-packages/httpx/_models.py", line 570, in content
raise ResponseNotRead()
httpx.ResponseNotRead: Attempted to access streaming response content, without having called read().

@neitui-coder
Copy link

neitui-coder commented Jun 24, 2024

@Yangqing @vthinkxie please take a look :D

The current demo still fails...

@New-King
Copy link
Author

New-King commented Jul 1, 2024

have solved

@SangNguyen2810
Copy link

how did you solve it @New-King, could you share a bit about this case please? Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants