Genie Flow Invoker Ollama
Project description
Ollama Invokers
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:
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file genie_flow_invoker_ollama-0.8.3-py3-none-any.whl.
File metadata
- Download URL: genie_flow_invoker_ollama-0.8.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6d2d06b5c3157a682a37624572a05e12978409ee63a707c8bfbff9e4b3ca7f5
|
|
| MD5 |
4c03607bc7d92900c34a1fd99bb08227
|
|
| BLAKE2b-256 |
8324958ed3e5e60bcda0ca9caceb3bf9154008d5014308a99ca6f3da06564e2c
|