Skip to main content

Genie Flow Invoker Ollama

Project description

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 }}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genie_flow_invoker_ollama-0.8.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genie_flow_invoker_ollama-0.8.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file genie_flow_invoker_ollama-0.8.0.tar.gz.

File metadata

File hashes

Hashes for genie_flow_invoker_ollama-0.8.0.tar.gz
Algorithm Hash digest
SHA256 db79ee0726a19af545b00e6da58e3093daf3480d007f2454ac52faba4beef243
MD5 32a6248b437ae4e9bc9868a7bbda7785
BLAKE2b-256 e96aeab12df1bc711c66b8c5e9913b48bb03b5f575dfa40ff21879c8ba960d5c

See more details on using hashes here.

File details

Details for the file genie_flow_invoker_ollama-0.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for genie_flow_invoker_ollama-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97726fbbbde9b6a8d8263b9af22caf1ec986f3241b3011071ca674e2f94197fe
MD5 a24f5daafd193423123f8ca259691bea
BLAKE2b-256 6be22ed58f4a8ec6c60ab30541a8f70c49cc99241cc29a1168d0b261462df370

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page