Python SDK

Upgrading from the octoai-sdk

Uninstall octoai-sdk

$pip uninstall octoai-sdk
>pip install octoai

Upgrading your code

The various OctoAI APIs are now accessable from a single client:

1from octoai.client import OctoAI
2
3client = OctoAI()
4
5# The various APIs are now accessible from the client
6client.text_gen
7
8client.image_gen
9
10client.fine_tuning
11
12client.asset_library

Image Generation API changes

In the octoai.image_gen API instead of specifying which engine to use, use the corresponding generate_* method.

Text Generation API changes

The text generation models with octoai.text_gen API are now specified with a str model name instead of an enum.

Streaming requests are made with the corresponding octoai.text_gen.*_stream method.

Asset Library (Asset Orchestrator) API changes

The Asset Orchestrator has been renamed to Asset Library and can be accessed via octoai.asset_library. Assets can be created with the octoai.asset_lirbary.create_from_file.

octoai.service API changes

The octoai.service API has been removed. You can make inferences to compute service endpoints via OctoAI client:

1from octoai.client import OctoAI
2
3client = OctoAI()
4
5# octoai.infer()

However you will need to continue to use the older octoai-sdk for the full octoai.service API which includes service authoring.