4 ms·
I find it hard to trust a tutorial that tells me forking curl is an exemplary way to interact with a local restful API in Python.
by dixie_land 3y ago
I find it hard to trust a tutorial that tells me forking curl is an exemplary way to interact with a local restful API in Python.
- deleted 3y ago[deleted]
- minimaxir 3y agocurl is the default method for a lot of simple AI API tutorials, unfortunately, although running a curl command in Python is a new one. It's very easy to port it to Python requests or a similar HTTP library, at the least.
- teaearlgraycold 3y agoYeah. WTF? Have they not heard of urllib2?
- mark_l_watson 3y agoIt is not so bad. I routinely fork processes to integrate useful code with Common Lisp and Racket code. What is a millisecond process startup time between friends :-) I agree that since Ollama provides a nice REST API, why not use that.
- justinsaccount 3y agoIt also manages to have both command injection vulnerabilities (passing untrusted data directly to a shell) as well as json injection vulnerabilities (templating untrusted data directly into json).