Use crate url for holding url instead using url as text
Reasoning
The ollama can be mounted anywhere using reverse proxy. ex: http://example.com/path/to/ollama. This does not allow user to set such a path. It also allows users accidentally set 'http://localhost/' with leading slash, resulting in bad url 'http://localhost/:11434'. url will handle this and all you need to do is overwrite port with 'Url::set_port' or, better, remove port argument completely from Ollama::new and move into url string.
Brief
url
for holding url instead using url as textReasoning
The ollama can be mounted anywhere using reverse proxy. ex:
http://example.com/path/to/ollama
. This does not allow user to set such a path. It also allows users accidentally set 'http://localhost/' with leading slash, resulting in bad url 'http://localhost/:11434'.url
will handle this and all you need to do is overwrite port with 'Url::set_port' or, better, remove port argument completely fromOllama::new
and move into url string.