Skip to main content

Ollama Invokers

PyPI version PyPI - Downloads

This package contains Genie Flow invokers for different Ollama invocations.

Installing the ollama invoker

pip install genie-flow-invoker-ollama

Installing Ollama

To run models locally, you'll need to install Ollama. We recommend using the official native installer for your platform:

Install Ollama

This will set up the Ollama runtime and make the ollama command available in your terminal.

Once installed, you can start a model like:

ollama run llama3

For advanced users, Ollama also provides a Docker image: Ollama for Docker which you can use in containerized environments.

Select model and query

List all available ollama models run:

ollama list

To start using the selected model, create a meta.yaml and a prompt like described here: Create LLM templates

There are three different types of invokers available:

  • OllamaChatInvoker, includes dialogue history in your prompt
  • OllamaGenerateInvoker, includes base64-encoded images in your prompt, using the model defined in meta.yaml
  • OllamaEmbedInvoker, vectorizes text using the embedding model specified in meta.yaml

Include base64 encoded images in prompt

For images to be included, the prompt template must be structured as follows, or else, the query will only contain plain text.

prompt: |
    Some prompt text
images:
    - {{ image_as_base64 }}

Metadata

Release files for genie-flow-invoker-ollama 0.8.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for genie-flow-invoker-ollama 0.8.4
File Interpreter ABI Platform
genie_flow_invoker_ollama-0.8.4-py3-none-any.whl Python 3 none any Details

Release files / genie_flow_invoker_ollama-0.8.4-py3-none-any.whl

Download URL genie_flow_invoker_ollama-0.8.4-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bad1b374e36ab6a28599157f4edb5e760bdfb0f6b06155feda482cfb5a3cf454
BLAKE2b-256 checksum
How to use checksums
3bf7f55a4614dadacb243fd555f4702ec4b86fbe6366a5fda0ff1ca1e0493ccc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page