Skip to content

HinxVietti/ollama_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages