Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 474 Bytes

README.md

File metadata and controls

37 lines (26 loc) · 474 Bytes

Ollama

This is a simple Elixir wrapper around the Ollama API.

Usage

Initialize the client.

client = Ollama.init()

Generate

Ollama.generate(client, [
  model: "llama3.2",
  prompt: "Who is Luke Skywalker?"
])

Chat

Ollama.chat(client, [
  model: "llama3.2",
  messages: [
    %{role: "system", content: "You are a helpful assistant."},
    %{role: "user", content: "Who is Luke Skywalker?"},
  ]
])

License

MIT