AI21
Observe AI21βs latest Jamba family of models with AgentOps
AgentOps has first party support for AI21 via its Python SDK. Explore development with AI21 by visiting their docs.
Steps to integrate AI21 with AgentOps
Install the AgentOps SDK
Install the AI21 SDK
We currently support v2.x.x of the AI21 SDK and plan to support v3.x.x in the future.
Add AgentOps to your code
Make sure to call agentops.init
before calling any openai
, cohere
, crew
, etc models.
Set your API key as an .env
variable for easy access.
Read more about environment variables in Advanced Configuration
Run your Agent
Execute your program and visit app.agentops.ai/drilldown to observe your Agent! π΅οΈ
After your run, AgentOps prints a clickable url to console linking directly to your session in the Dashboard
Clickable link to session
Full Examples
Streaming Examples
Task-Specific Models
AI21 v2.x.x provides specialized models called Task Specific Models for specific tasks.
Hereβs an example using the contextual answers endpoint:
If you want to stream the response, you can use the stream=True flag. The streaming response is handled by the AI21 SDK.
All of these examples can be found in this notebook.