Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 1.61 KB

README.md

File metadata and controls

41 lines (32 loc) · 1.61 KB

Ollama icon

Charmed Ollama

Charmhub Badge

Ollama enables easy deployment of large language models on your own infrastructure.

See the models available in the Ollama library.

Installation

Get it from the Charmhub

Deploying Ollama on your cloud using Juju

juju deploy ollama --channel=beta

Installing a large language model to use

juju run ollama/0 pull model="llama3.1"

Note: the pull action may take a long time, you can add the --wait parameter (i.e. --wait=5m) to avoid getting a timeout error if your model is too large.

Usage

Generating text using the juju action

juju run ollama/0 generate model="llama3.1" prompt="Why is the sky blue?"

Note: the generate action may take a long time, you can add the --wait parameter (i.e. --wait=5m) to avoid getting a timeout error if your hardware is too slow.

Generating text using the HTTP API

curl http://<unit-ip-address>:11434/api/generate -d '{
  "model": "llama3.1",
  "prompt":"Why is the sky blue?"
}'

Other resources