TypeScript SDK

Upgrading from @octoai/client

Uninstall octoai-sdk

$npm uninstall @octoai/client
>npm install @octoai/sdk

Upgrading your code

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

1import { OctoAIClient } from '@octoai/sdk';
2
3const client = new OctoAIClient();
4
5// The various APIs are now accessible from the client
6client.textGen
7
8client.imageGen
9
10client.fineTuning
11
12client.assetLibrary

Image Generation API changes

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

Text Generation API changes

The text generation models with client.textGen API are now specified with a string model name instead of an enum.

Streaming requests are made with the corresponding client.textGen.*_stream method.

Asset Library (Asset Orchestrator) API changes

The Asset Orchestrator has been renamed to Asset Library and can be accessed via client.assetLibrary. Assets can be created with the client.assetLibrary.upload() method.

Compute Inferencing API changes

The infer() method is not yet available in this sdk. You will need to continue to use the older @octoai/client for full inferencing support.