Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 991 Bytes

README.md

File metadata and controls

41 lines (26 loc) · 991 Bytes

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:

# build locally
python setup.py sdist bdist_wheel
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.