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

Replace host string and port with Url #45

Merged
merged 7 commits into from
Apr 27, 2024
Merged

Conversation

zeozeozeo
Copy link
Contributor

@zeozeozeo zeozeozeo commented Apr 27, 2024

This makes Ollama store URLs instead of URIs (since Ollama can be mounted anywhere with a reverse proxy, ex: http://example.com/path/to/ollama).

I'm not quite sure if .into() will panic, so maybe the # Panics section in docstrings should be removed.

This does not break any old APIs, only adds new ones:

  • Ollama::from_url
  • Ollama::url
  • Ollama::url_str
  • Ollama:new_with_history_from_url
  • Ollama::try_new_with_history
  • Ollama::try_new

Closes #44

This makes `Ollama` store URLs instead of URIs (since Ollama can be
mounted anywhere with a reverse proxy, ex:
`http://example.com/path/to/ollama`).

I'm not quite sure if `.into()` will panic, so maybe the `# Panics`
section in docstrings should be removed.

Also adds functions to create `Ollama` directly from a `Url`.
@zeozeozeo zeozeozeo marked this pull request as draft April 27, 2024 09:10
@zeozeozeo zeozeozeo marked this pull request as ready for review April 27, 2024 09:34
@pepperoni21 pepperoni21 merged commit 0dc8b91 into pepperoni21:master Apr 27, 2024
2 checks passed
@pepperoni21
Copy link
Owner

Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

Use url create for holding url to ollama
2 participants