SageMaker
Examples for using AI21's models through Amazon SageMaker
Install / Use
/learn @AI21Labs/SageMakerREADME
Deploy AI21 Labs Language Models on AWS SageMaker
Examples for using Jurassic-2 models through Amazon SageMaker.
Installation
You can install the package using pip:
pip install -U "ai21[AWS]"
And then import the package:
import ai21
Quickstart
In order to use this library, you must configure your AWS credentials.
All set up? Make your first interaction with Jurassic-2:
response = ai21.Completion.execute(destination=ai21.SageMakerDestination("j2-ultra"),
prompt="To be, or",
maxTokens=4,
temperature=0)
print(response['completions'][0]['data']['text'])
# not to be: that is the question
For more comprehensive quickstart guides, see:
Foundation models
Task-specific models
AI21 Grammatical Error Correction (GEC)
Learn more
-
AI21 Studio playground - no code environment to test and perfect your prompts
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
