leptonai / search_with_lepton

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

failure in query #44

Open adrianhsm opened 5 months ago

adrianhsm commented 5 months ago

2024-02-03 14:15:48.540 | INFO | main:query_function:570 - Key 4lzfpPBR_pabKHefwv6zf not found, will generate again. 2024-02-03 14:15:50.437 | ERROR | main:query_function:620 - encountered error: module 'openai' has no attribute 'OpenAI' Traceback (most recent call last): File "/Users/smai/workspace/ai/search_with_lepton/search_with_lepton.py", line 365, in local_client return thread_local.client ^^^^^^^^^^^^^^^^^^^ AttributeError: '_thread._local' object has no attribute 'client'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/smai/workspace/ai/search_with_lepton/search_with_lepton.py", line 599, in query_function client = self.local_client() ^^^^^^^^^^^^^^^^^^^ File "/Users/smai/workspace/ai/search_with_lepton/search_with_lepton.py", line 367, in local_client thread_local.client = openai.OpenAI( ^^^^^^^^^^^^^ AttributeError: module 'openai' has no attribute 'OpenAI'

2024-02-03 14:15:50,438 - INFO: 127.0.0.1:64223 - "POST /query HTTP/1.1" 200 OK

adrianhsm commented 5 months ago

Following readme.md seems not able to fix all the problem, could anyone improve the deployment doc?

jcdiv47 commented 5 months ago

I think a reasonable debug starting point could be checking the version of openai package on your end, make sure it is up-to-date with command

pip install -U openai