A Python SDK for Inference Gateway
Project description
Inference Gateway Python SDK
An SDK written in Python for the Inference Gateway.
Installation
pip install inference-gateway-python-sdk
Usage
Creating a Client
if __name__ == "__main__":
client = InferenceGatewayClient("http://localhost:8080")
models = client.list_models()
print("Available models:", models)
response = client.generate_content("providerName", "modelName", "your prompt here")
print("Generated content:", response["Response"]["Content"])
Listing Models
To list available models, use the list_models method:
models = client.list_models()
print("Available models:", models)
Generating Content
To generate content using a model, use the generate_content method:
response = client.generate_content("providerName", "modelName", "your prompt here")
print("Generated content:", response["Response"]["Content"])
License
This SDK is distributed under the MIT License, see LICENSE for more information.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inference_gateway-0.1.1.tar.gz.
File metadata
- Download URL: inference_gateway-0.1.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
020a07563d99473e6ec0f6eabb0ed682c25174a86d25f595fc1de4f75d1be970
|
|
| MD5 |
a3494321e55d4b0ebba2afc54ba5e6db
|
|
| BLAKE2b-256 |
35b88275df21a7fae80f72925ee65ebf42883db0937fd9abf9d54a473fbed43f
|
File details
Details for the file inference_gateway-0.1.1-py3-none-any.whl.
File metadata
- Download URL: inference_gateway-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcfaebe7cce0cff5add0fd3360622ad2baabae68d0c5943deff9cc64fd0a61b2
|
|
| MD5 |
e6346dc418f55da2b1580c502957fcb2
|
|
| BLAKE2b-256 |
7145f2960564fef8c2749319a13e487900b02a3790c6e35b10fedeaf07f1b66e
|