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

[BUG] Private GPT has infinite loop of responce #2112

Open
SpkArtZen opened this issue Oct 28, 2024 · 5 comments
Open

[BUG] Private GPT has infinite loop of responce #2112

SpkArtZen opened this issue Oct 28, 2024 · 5 comments
Labels
question Further information is requested

Comments

@SpkArtZen
Copy link

Question

I have an issue with Private GPT:

When I send a prompt or chat completion with a large context (file size > 5 KB or multiple context files), the chat takes a long time to generate a response but never sends it. It just keeps generating a response, and the delay gets worse. Eventually, it sends a timeout error.

I don’t know how to fix this. I need to get its initial response, but in the end, I don’t receive anything

@SpkArtZen SpkArtZen added the question Further information is requested label Oct 28, 2024
@jaluma
Copy link
Collaborator

jaluma commented Oct 30, 2024

Can you give us more details about your environment? Probably, it will related to GPU and vRAM.

@SpkArtZen
Copy link
Author

Yes, i use default model llama 3.1 7B
Знімок екрана 2024-10-30 102834

@SpkArtZen
Copy link
Author

Full logs:
logs.txt
I send single request from python sdk.
It works the same with postman and curl

@jaluma
Copy link
Collaborator

jaluma commented Nov 4, 2024

It should work equally using postman and requests. Can you increate request timeout?

client = PrivateGPTApi(base_url="http://localhost:8001", client=...)

And two mode things to take into account:

  1. When you use all window context, reply will take more time in reply, it's normal.
  2. Probably, use a large context instead of using RAG strategies not be the best way to afford this kind of problems.
  3. Consider increase Ollama timeout if you continue having problems as your log. You can do modifying LLMComponent, ollama statement.

@SpkArtZen
Copy link
Author

The main problem is that when I send a request, even through Postman, the response is generated multiple times and degrades each time.
The same with sdk and Postman.
Also, it itself sends a request:

2024-11-04 15:36:54 13:36:54.133 [INFO ] httpx - HTTP Request: POST http://localhost:11434/api/chat "HTTP/1.1 200 OK"
2024-11-04 15:36:59 [GIN] 2024/11/04 - 13:36:59 | 200 | 5.996617632s | 127.0.0.1 | POST "/api/chat"

After that its generate responce again. I need somehow accept only first responce.

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

No branches or pull requests

2 participants