View Source Instructor.Adapters.Ollama (Instructor v0.1.0)

Ollama adapter for Instructor.

Configuration

config :instructor, adapter: Instructor.Adapters.Ollama, ollama: [
  api_url: "http://localhost:11434" # (Optional) defaults to localhost:11434
]

or at runtime:

Instructor.chat_completion(..., [
  adapter: Instructor.Adapters.Ollama,
  api_url: "http://localhost:11434" # (Optional) defaults to localhost:11434
])

To get an Ollama API key, see Ollama.