Upgrading from @octoai/client
Migrating to the new SDK package
Upgrading your code
The various OctoAI APIs are now accessible from a single client:
Image Generation API changes
In the octoai.imageGen
API, instead of specifying which engine to use, use the corresponding generate*
method such as generateSdxl()
or generateSd()
.
Text Generation API changes
The text generation models with octoai.textGen
API are now specified with a string
model name instead of an enum
.
Streaming requests are made with the corresponding octoai.textGen.*Stream
method such as createCompletionStream()
or createChatCompletionStream()
.
Asset Library (Asset Orchestrator) API changes
The Asset Orchestrator has been renamed to Asset Library and can be accessed via octoai.assetLibrary
. Assets can be created with the octoai.assetLibrary.upload()
method.
Compute Inferencing API changes
The infer()
method is not available in this SDK. You will need to continue to use the older @octoai/client
for full inferencing support.