Gradient AI API
Project description
gradientai-python-sdk
Interface for interacting with Gradient AI.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 1.0.0-dev.3
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python 3.7+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/Preemo-Inc/gradientai-python-sdk.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/Preemo-Inc/gradientai-python-sdk.git
)
Then import the package:
import gradientai
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import gradientai
Tests
Execute pytest
to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import time
import gradientai
from gradientai.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.gradient.ai/api
# See configuration.py for a list of all supported configuration parameters.
configuration = gradientai.Configuration(
host = "https://api.gradient.ai/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = gradientai.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with gradientai.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = gradientai.ModelsApi(api_client)
id = 'id_example' # str |
x_preemo_workspace_id = 'x_preemo_workspace_id_example' # str |
complete_model_body_params = gradientai.CompleteModelBodyParams() # CompleteModelBodyParams |
try:
# Complete model
api_response = api_instance.complete_model(id, x_preemo_workspace_id, complete_model_body_params)
print("The response of ModelsApi->complete_model:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling ModelsApi->complete_model: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.gradient.ai/api
Class | Method | HTTP request | Description |
---|---|---|---|
ModelsApi | complete_model | POST /models/{id}/completions | Complete model |
ModelsApi | create_model | POST /models | Create model |
ModelsApi | delete_model | DELETE /models/{id} | Delete model. |
ModelsApi | get_model | GET /models/{id} | Describe model |
ModelsApi | list_models | GET /models | List available models |
ModelsApi | train_model | PUT /models/{id} | Train model |
Documentation For Models
- CompleteModelBodyParams
- CompleteModelError
- CompleteModelSuccess
- CreateModelError
- CreateModelRequestBody
- CreateModelRequestBodyInitialHyperparameters
- CreateModelRequestBodyInitialHyperparametersLoraHyperparameters
- CreateModelRequestBodyInitialHyperparametersTrainingArguments
- CreateModelRequestBodyModel
- CreateModelSuccess
- DeleteModelError
- GetModelError
- GetModelSuccess
- ListModelsError
- ListModelsSuccess
- ListModelsSuccessModelsInner
- ListModelsSuccessModelsInnerOneOf
- ListModelsSuccessModelsInnerOneOf1
- TrainModelError
- TrainModelRequestBody
- TrainModelRequestBodySamplesInner
- TrainModelRequestBodySamplesInnerFineTuningParameters
- TrainModelSuccess
Documentation For Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: Bearer authentication (JWT)
Author
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
Built Distribution
File details
Details for the file gradientai-1.0.0.dev3.tar.gz
.
File metadata
- Download URL: gradientai-1.0.0.dev3.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 666a0a9d48bb8a4121b5de85f4fdd2596cc1195c52a0cefc29f4c82fb1f8d0d0 |
|
MD5 | b13adebc41934fd41b0086d0b9b4aa3f |
|
BLAKE2b-256 | a1f49c12e49df2baa8d9385d563d2fc40f1ae069c03c23a92ed658546a14980b |
Provenance
File details
Details for the file gradientai-1.0.0.dev3-py3-none-any.whl
.
File metadata
- Download URL: gradientai-1.0.0.dev3-py3-none-any.whl
- Upload date:
- Size: 55.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e01f95b78d866a53ee19893227f791a31b98fcbcdb5102a8c0c5d6dbb97518e |
|
MD5 | 9c4201378f98e635772bbd2e71c37e9d |
|
BLAKE2b-256 | 0306b6c90f718cf99fbea01b672ba073356ba2b64e66ea5c52517f1229ea7f1a |