Version 2.0.0
Changelog
We are excited to announce the release of version 2.0.0 of the Novita.ai Javascript SDK. This release includes several significant changes and improvements. Please read the following notes carefully as these changes may impact your existing code.
Breaking Changes
-
Removed Functional Usage:
- The SDK no longer supports functional usage. Only class-based usage is now supported. This change aims to provide a more consistent and maintainable API.
-
Removed Synchronous Methods for Asynchronous APIs:
- All synchronous methods for asynchronous APIs (e.g.,
txt2ImgSync
) have been removed. You will now need to handle task status polling yourself. This change is intended to improve performance and scalability.
- All synchronous methods for asynchronous APIs (e.g.,
-
Removed All V2 Interface Calls:
- All V2 interface calls have been removed. All V3-related type names and method names have been renamed to their previous V2 counterparts. V2 types and methods have been removed entirely. This change simplifies the API and reduces confusion.
Migration Guide
To help you migrate to version 2.0.0, please follow these steps:
-
Update Your Code to Use Class-Based Usage:
- Replace any functional usage with class-based usage. Refer to the updated documentation for examples.
-
Handle Task Status Polling:
- Implement your own task status polling for asynchronous APIs. Refer to the updated documentation for guidance on how to do this.
-
Update Type Names and Method Names:
- If you were using V2 methods, you need to update your parameters and method calls to the new version.
- If you were using V3 methods, you need to rename the method names and type names to their previous V2 counterparts. Refer to the updated documentation for the new names.