Closed lpchaim closed 1 month ago
Hey, no worries! Always happy to chip in :)
Anyway, I'd love to give the changes a go on my end, if only to practice my real world Rust a little more. If it ends up not to your taste afterwards, I wouldn't mind at all if you took over and added on top of my modifications. Does that work?
Alright, I've implemented the requested changes. These should cover what we've discussed, unless I misunderstood something.
Hey, no worries! Lmk if you'd prefer I squashed the commits together or anything like that and I'll get to that ASAP.
It's perfect like that!
I'm currently experimenting with ollama on a not too powerful laptop, so I stumbled upon #22 pretty quickly. Seeing as I liked the simplicity of smartcat and the fact it's Rust based, I figured I'd try my hand at adding an optional timeout parameter.
I implemented the "timeout" field in ApiConfig, and made it optional. I also made it so the reqwest client is instantiated through its builder so that the timeout can be specified. It could also be passed on the individual request, but since that form doesn't take an Option as a parameter, I figured this would be a bit cleaner.
Right now, the logic works as such: