PromtEngineer / localGPT

Chat with your documents on your local device using GPT models. No data leaves your device and 100% private.
Apache License 2.0
20.09k stars 2.24k forks source link

run_localGPT_API.py file errors. #381

Open prashant4961 opened 1 year ago

prashant4961 commented 1 year ago

@PromtEngineer Please help!! while running run_localGPT_API.py the ### db automatically disappears and the ### error is of source document is not present even tough it is present however when i am running run_localGPT.py it is working totally fine.

error as follows:

(localgpt_llama2_1) D:\learn\localGPT_llama2_1>python run_localGPT_API.py load INSTRUCTOR_Transformer max_seq_length 512 CompletedProcess(args=['python', 'ingest.py'], returncode=1, stdout=b'', stderr=b'Traceback (most recent call last):\r\n File "D:\learn\localGPT_llama2_1\ingest.py", line 9, in \r\n from langchain.text_splitter import Language, RecursiveCharacterTextSplitter\r\nImportError: cannot import name \'Language\' from \'langchain.text_splitter\' (C:\Users\user_name\AppData\Local\Programs\Python\Python310\lib\site-packages\langchain\text_splitter.py)\r\n')

Traceback (most recent call last): File "D:\learn\localGPT_llama2_1\run_localGPT_API.py", line 56, in raise FileNotFoundError( FileNotFoundError: No files were found inside SOURCE_DOCUMENTS, please put a starter file inside before starting the API!

tunisha-factacy commented 1 year ago

yaa same issue is also faced by me

RajendranDinesh commented 1 year ago

Please refer to my previous response at #377 for the solution to this question. Let me know whether that works for you.

manal-irfan commented 1 year ago

You can your documents or any pdf file in the source document folder and it should work