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
19.8k stars 2.2k forks source link

I ran the code successfully but can't receive the answer #518

Open Jane1702 opened 12 months ago

Jane1702 commented 12 months ago

Screenshot 2023-09-22 162841

RobertoDonPedro commented 12 months ago

I experience the same issue - No response, My setup:

image
faiconda commented 12 months ago

I have the same problem

PromtEngineer commented 12 months ago

@Jane1702 @RobertoDonPedro @faiconda are you using the default model?

RobertoDonPedro commented 11 months ago

@Jane1702 @RobertoDonPedro @faiconda are you using the default model?

Yes, but I tried it with several other models as well, including the GPTQ models since I have 2 GPUs. But it just does not answer.

Jane1702 commented 11 months ago

@Jane1702 @RobertoDonPedro @faiconda are you using the default model?

Yes , I used the default model

RobertoDonPedro commented 11 months ago

I just found the issue in my case. It was not the model, but this line in the run_localGPT.py file: query = input("\nEnter a query: ") It does not read the provided input and waits forever. If I replace this line manually in the code with e.g. query = "Summarize your content" (and add a breakat the end of the while loop) everything works as expected. I think this is caused by running localGPT with VSCode on a remote VM. However, still wondering what's the issue with VSCode in this regard.

Jane1702 commented 11 months ago

Excuse-me , when I changed the code as you said , it finished the code but it didn't return the answer Screenshot 2023-09-25 170015

RobertoDonPedro commented 11 months ago

Excuse-me , when I changed the code as you said , it finished the code but it didn't return the answer Screenshot 2023-09-25 170015

..then the root of your issue is something else than in my case. You did ingest the data, right?

Jane1702 commented 11 months ago

I have just run it successfully. I ran again with command prompt and it worked . Thank you very much for your help ^^ However , I don't know why it can't read some .txt files ? Screenshot 2023-09-25 172450

RobertoDonPedro commented 11 months ago

Just solved my issue. It wasn't related to VS Code but to the fact that I called it from a nodejs app via shelljs and shelljs does not accept input. Now I call it natively via child_process.execFileSync with the stdio: 'inherit' parameter and now it works as expected. So in summary my issue was neither related to localGPT nor to VS Code but to they way I called localGPT. Potentially @Jane1702 you could also doublecheck the way you call it.

Jane1702 commented 11 months ago

Screenshot 2023-09-26 143337 I don't know why but today I tried again and it worked normally . But it takes so long to have 1 answer (more than 20mins)

KansaiTraining commented 1 month ago

It took 20 minutes?!

(I am having the same problem)