-
Notifications
You must be signed in to change notification settings - Fork 611
Description
Describe the bug
Installing genkit-plugin-ollama (version 0.4.0) as instructed by the official documentation leads to ImportError when attempting to use EmbeddingModelDefinition or ModelDefinition from the plugin.
To Reproduce
Steps to reproduce the behavior:
- Follow the official instructions from [Genkit documentation](https://genkit.dev/docs/integrations/ollama/?lang=python).
- Install
genkit-plugin-ollamausingpip3 install genkit-plugin-ollama. - Attempt to import
EmbeddingModelDefinitionorModelDefinitionfromgenkit.plugins.ollamain a Python script.
Code samples:
from genkit.plugins.ollama import EmbeddingModelDefinition, ModelDefinitionError message:
ImportError: cannot import name 'EmbeddingModelDefinition' (or 'ModelDefinition') from 'genkit.plugins.ollama'
(/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/genkit/plugins/ollama/__init__.py)
Expected behavior
EmbeddingModelDefinition and ModelDefinition should be importable from genkit.plugins.ollama as indicated by the official documentation.
Runtime (please complete the following information):
- OS: MacOS
- Genkit Version:
genkit-plugin-ollama==0.4.0
Python version
python3 --version: Python 3.11.9
Additional context
The instructions were taken directly from the official Genkit documentation: https://genkit.dev/docs/integrations/ollama/?lang=python.
However, the imports for EmbeddingModelDefinition and ModelDefinition fail, preventing proper configuration of Ollama models within Genkit.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status