Skip to main content

A Python client for the Ollama API

Project description

Ollama API Python Client

A Python client for interacting with the Ollama API.

Installation

pip install ollama_api

Usage

from ollama_api import OllamaClient

client = OllamaClient()
response = client.generate_completion(model="llama3", prompt="Why is the sky blue?")
print(response)

Documentation

For more details, refer to the Ollama API documentation.

Step 6: Install and Test

Navigate to the root directory of your package and install it locally:

pip install .

Now you can test the package by importing and using the OllamaClient class in a Python script or interactive session.

This basic package structure and client class should give you a good starting point for interacting with the Ollama API using Python. You can expand and refine it further based on your specific needs and the API's capabilities.

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

ollama_api-0.1.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

ollama_api-0.1.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file ollama_api-0.1.1.tar.gz.

File metadata

  • Download URL: ollama_api-0.1.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.8

File hashes

Hashes for ollama_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c77cb1086a5900e1ad26dc646b10c1146fd8a14f5b7f099474dca380c459dd32
MD5 f15339d57913d9e554a73211b5502c1b
BLAKE2b-256 8988e80904ca0a76d3b06b6c522dc8ca3c637de137afeda04a92c32fc5a34f93

See more details on using hashes here.

File details

Details for the file ollama_api-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ollama_api-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.8

File hashes

Hashes for ollama_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 75051eb95dc05f2a24f4e227eae02f8c7de8ee85e5072b44c0c53cd079df75b1
MD5 0260d7dcb008ba64b856f1a242eeb56b
BLAKE2b-256 c79cc20c8f2c583f0f05510672faca424dc14855cfd6372406d61fd57107560e

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