Skip to main content

Tasks related to ollama

Project description

Zrb ollama

zrb-ollama is a pypi package.

You can install zrb-ollama by invoking the following command:

# From pypi
pip install zrb-ollama
# From github
pip install git+https://github.com/goFrendiAsgard/zrb-ollama.git@main
# From directory
pip install path/to/this/directory

Once zrb-ollama is installed, you can then run it by invoking the following command:

zrb-ollama "Why is the sky blue?"

You can also import zrb-ollama into your Zrb project and perform some fun things:

from zrb import runner
from zrb_ollama import PromptTask

chat = PromptTask(
    name='chat',
    model='mistral',
    prompt='echo {{ " ".join(input._args) if input._args | length > 0 else "tell me some fun fact" }}',  # noqa
    options={
        'temperature': 0.8,
        'num_gpu': 0
    },
    system_prompt='You are a code tutor. You eager to explain code in a very detail manner',  # noqa
    context_file='.ctx.json'
)
runner.register(chat)
zrb chat "Please explain the following Python script: $(cat fibo.py)"
zrb chat "Can you make it better?"

For maintainers

Publish to pypi

To publish zrb-ollama, you need to have a Pypi account:

You can also create a TestPypi account:

Once you have your API token, you need to create a ~/.pypirc file:

[distutils]
index-servers =
   pypi
   testpypi

[pypi]
  repository = https://upload.pypi.org/legacy/
  username = __token__
  password = pypi-xxx-xxx
[testpypi]
  repository = https://test.pypi.org/legacy/
  username = __token__
  password = pypi-xxx-xxx

To publish zrb-ollama, you can do the following command:

zrb project publish-zrb-ollama

Updating version

You can update zrb-ollama version by modifying the following section in pyproject.toml:

[project]
version = "0.0.2"

Adding dependencies

To add zrb-ollama dependencies, you can edit the following section in pyproject.toml:

[project]
dependencies = [
    "Jinja2==3.1.2",
    "jsons==1.6.3"
]

Adding script

To make zrb-package-name executable, you can edit the following section in pyproject.toml:

[project-scripts]
zrb-ollama = "zrb-ollama.__main__:hello"

This will look for hello callable inside of your __main__.py file

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

zrb_ollama-0.0.4.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

zrb_ollama-0.0.4-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file zrb_ollama-0.0.4.tar.gz.

File metadata

  • Download URL: zrb_ollama-0.0.4.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for zrb_ollama-0.0.4.tar.gz
Algorithm Hash digest
SHA256 8677a25eed520c75516fbea78200d2c632364f54b151ba38965bea1db2d0ac06
MD5 57ddf6b3cc49ba679f499b086465f56a
BLAKE2b-256 701f8544c0955531c87f9d332cd5cb2500a935b359db3c8c5f2fc284c1c6a2a4

See more details on using hashes here.

File details

Details for the file zrb_ollama-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: zrb_ollama-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for zrb_ollama-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 823794d19389919828c0c00628925425ea1105ea70bb907406b8e97332a16ab0
MD5 ff042703740910c3ad5adaae568381df
BLAKE2b-256 48ddd59f653716746ba18348808ade7e431cfd15352f746b60e7364611fe94b4

See more details on using hashes here.

Supported by

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