Skip to content

feat: expose __version__ via importlib.metadata - #708

Open
SaiDevaHarshaR wants to merge 1 commit into
ollama:mainfrom
SaiDevaHarshaR:feat/add-version-attribute
Open

feat: expose __version__ via importlib.metadata#708
SaiDevaHarshaR wants to merge 1 commit into
ollama:mainfrom
SaiDevaHarshaR:feat/add-version-attribute

Conversation

@SaiDevaHarshaR

Copy link
Copy Markdown

What this does

Exposes __version__ attribute on the ollama module so users can
check the installed library version programmatically.

Why

Fixes #646 and #623 — users reported AttributeError when accessing
ollama.__version__.

How

Uses importlib.metadata.version() which reads from the installed
package metadata. Falls back to "unknown" if run from source without
installing.

Testing

import ollama
print(ollama.__version__)  # prints "0.6.2"

Related issues

Closes #646
Closes #623

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: expose __version__ and top-level version() for server version Closes #623 “缺少 __version__属性

1 participant