smartcat icon indicating copy to clipboard operation
smartcat copied to clipboard

Failed to make API request if ollama generation takes too long

Open vavakado opened this issue 1 year ago • 3 comments

This problem occurs if ollama does not generate full answer before timeout.

> sc "hello, can you write a cli util in python that tells if it's night or day"
Failed to make API request: reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("localhost")), port: Some(11434), path: "/api/chat", query: None, fragment: None }, source: TimedOut }

For context, everything if working if i use a simpler prompt.

vavakado avatar May 25 '24 11:05 vavakado

Interesting thanks for reporting! What would be you preferred solution for this? Being able to config a specific timeout value? I can do that.

efugier avatar May 26 '24 22:05 efugier

I think that an option in configs would be more usable for someone with slow hardware, so that they don't have to type additional option every time.

vavakado avatar May 28 '24 22:05 vavakado

That's actually what I meant :slightly_smiling_face:

I'll get to it as soon as I get some time on my hands!

efugier avatar May 31 '24 14:05 efugier

I probably should close this as the PR #24 was merged

vavakado avatar Aug 21 '24 22:08 vavakado

Good call, thanks @vavakado!

efugier avatar Aug 22 '24 08:08 efugier