You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chainlit run main.py -w
Traceback (most recent call last):
File "/usr/local/bin/chainlit", line 8, in
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/chainlit/cli/init.py", line 152, in chainlit_run
run_chainlit(target)
File "/usr/local/lib/python3.11/site-packages/chainlit/cli/init.py", line 45, in run_chainlit
load_module(config.run.module_name)
File "/usr/local/lib/python3.11/site-packages/chainlit/config.py", line 244, in load_module
spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/PrivateDocBot/main.py", line 11, in
init_vector_db()
File "/opt/PrivateDocBot/src/loader.py", line 50, in init_vector_db
files = [file for file in os.listdir(cfg.DB_FAISS_PATH) if file != 'readme.md']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'vectorstore\db_faiss'
Any idea?
Thanks
The text was updated successfully, but these errors were encountered:
Hey @mehrdad2000 :)
you can replace the init_vector_db function in src/loader.py
to this function:
def init_vector_db():
if not os.path.exists(cfg.DB_FAISS_PATH):
os.makedirs(cfg.DB_FAISS_PATH)
print(colored(f"{cfg.DB_FAISS_PATH} directory created.", 'blue'))
files = [file for file in os.listdir(cfg.DB_FAISS_PATH) if file != 'readme.md']
if not files:
print(
colored(f"{cfg.DB_FAISS_PATH} is empty. Build vector DB on first run", 'red')
)
resp = load_data()
print(resp)
else:
print(
colored(f"{cfg.DB_FAISS_PATH} is not empty. No need to build vector DB on first run", 'green')
)
Hi
after run got this error:
chainlit run main.py -w
Traceback (most recent call last):
File "/usr/local/bin/chainlit", line 8, in
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/chainlit/cli/init.py", line 152, in chainlit_run
run_chainlit(target)
File "/usr/local/lib/python3.11/site-packages/chainlit/cli/init.py", line 45, in run_chainlit
load_module(config.run.module_name)
File "/usr/local/lib/python3.11/site-packages/chainlit/config.py", line 244, in load_module
spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/PrivateDocBot/main.py", line 11, in
init_vector_db()
File "/opt/PrivateDocBot/src/loader.py", line 50, in init_vector_db
files = [file for file in os.listdir(cfg.DB_FAISS_PATH) if file != 'readme.md']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'vectorstore\db_faiss'
Any idea?
Thanks
The text was updated successfully, but these errors were encountered: