No project description provided
Project description
from ollama_x_client import AuthenticatedClient
ollama-x-client
This is the autogenerated client for the Ollama-X project. Ollama-X is a backend application that allows to balance the load of Ollama instances and control users' access to them.
Installation
Using pip:
pip install ollama-x-client
Using poetry:
poetry add ollama-x-client
Usage
from ollama_x_client.client import AuthenticatedClient
from ollama_x_client.api.user.create import sync_detailed as create_user
from ollama_x_client.models import CreateUserRequest
client = AuthenticatedClient(base_url="http://localhost:8000")
response = create_user(
client=client,
body=CreateUserRequest("test-user")
)
How to generate
To generate the client, you need to have the OpenAPI specification file. You can download it from the Ollama-X server by visiting the /openapi.json
endpoint.
Then, you can generate the client using the OpenAPI CLI:
openapi-cli generate --url https://<ollama_x_instance>/openapi.json --output ollama_x_client
--no-install --no-interaction
This will generate the client in the ollama_x_client
directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ollama_x_client-0.1.0.tar.gz
(96.0 kB
view hashes)
Built Distribution
Close
Hashes for ollama_x_client-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d17d8e20632f9bf94b75b2fbe6d0d64d672ee61a11883e6ff83fb2ee41304df |
|
MD5 | f4e99e5aa0152550e5d28cd53959fca2 |
|
BLAKE2b-256 | 0664853e5362c58ac0176b28233b8f9006e1b6cb01012d3a126f29fb833f963c |