Back to Blog

Introducing AI21’s Python SDK 2.0 for a Simplified Developer Experience

,
,
,
February 16, 2024
No items found.

The newly released SDK is now open source, offering developers a more convenient and seamless building experience with AI21’s models.

AI21 is thrilled to announce the release of AI21’s open source Python SDK v2.0, as part of our commitment to accelerating and scaling the use of AI in production for the enterprise. 

Developed to create a more convenient building experience for developers who are working with AI21’s models, this updated version of our software development kit features seamless integrations with the most popular GenAI platforms and frameworks, as well as support for multiple client instances. 

Whereas it was difficult to customize the previous SDK for specific use cases, the SDK v2.0’s source code is fully accessible and open for suggestions and input—just submit an issue to share your request. Finally, with the SDK v2.0's interface making it easier to be integrated within other LLM orchestration frameworks like LangChain and LlamaIndex, AI21’s models are more widely usable than ever before.

AI21’s family of models are already recognized for their reliability, accuracy, security, world-class performance, and affordability. Now, with this newly-released SDK, these benefits are more accessible for developer use, shortening the time to implementation and facilitating adoption for the high-impact enterprise use cases these models were built to solve. 

AI21’s Python SDK v2.0 Key Highlights

The newly-released SDK offers the following features for developer convenience:

  1. Support for multiple client instances: Access different platforms on different accounts using multiple AI21 client instances, including AI21 Studio, Amazon Sagemaker, and Amazon Bedrock.
  2. Input and output typing standardization: Rather than switching back and forth between the SDK and its documentation, as was necessary with the previous SDK, use your IDEs autocompletions and suggestions to discover the input and output shape for each function.
  3. Built-in tokenizer: Track the number of AI21 tokens used for any call in your own environment without the need to make an API request.
  4. Open source access: Find AI21’s entire Python SDK v2.0 within GitHub

Get started with the new SDK

To start building with the SDK v2.0’s enhanced features, or to migrate from v1, follow the installation and configuration instructions in GitHub’s README documentation.

If you’d like to use the SDK v2.0 for your next application, please don’t hesitate to reach out. Let’s build together.

Discover more