Models Deprecations
This guide provides information on deprecated SUTRA models, including timelines, migration steps, and resources to transition to newer models like SUTRA-V2. Ensure your applications remain compatible and leverage the latest features, such as improved multilingual performance and enhanced efficiency. As we continue to evolve, older models may be deprecated to make way for newer, more efficient versions. Below, we outline the deprecation process and steps to transition smoothly.
Deprecated Models
SUTRA-V1
- Deprecation Date: March 22, 2025, at 11:55 PM PST
- Details: The SUTRA-V1 API, designed for multilingual conversational tasks, has been replaced by SUTRA-V2, which offers improved performance, image processing, and full compatibility with OpenAI’s API specifications.
- Action Required: Migrate to SUTRA-V2 to ensure continued support and access to new features like streaming mode and faster response times.
Step 1: Check Your Current Model
Identify which SUTRA model your application uses:
- SUTRA-V1: Used for multilingual conversation and instruction tasks.
- Visit docs.two.ai to confirm your model version and review API usage.
Step 2: Obtain or Verify Your API Key
To access newer models, ensure you have a valid SUTRA API key:
- Get your API key from https://www.two.ai/sutra/api.
- Set your API key as an environment variable:
export SUTRA_API_KEY="your-api-key-here"
Then in your Python code:
import os
SUTRA_API_KEY = os.getenv("SUTRA_API_KEY")
Step 3: Transition to SUTRA-V2
For SUTRA-V1 users, update your code to use SUTRA-V2:
- Update Model Name: Replace
sutra-v1
withsutra-v2
in your API calls. - Initialize Client:
from openai import OpenAI
client = OpenAI(
base_url='https://api.two.ai/v2',
api_key=SUTRA_API_KEY
)
- Test Basic Completion:
response = client.chat.completions.create(
model='sutra-v2',
messages=[{"role": "user", "content": "Tell me about AI advancements in 3 sentences."}],
max_tokens=1024,
temperature=0.7
)
print(response.choices[0].message.content)
🛠 Troubleshooting
- API Key Errors: Verify your
SUTRA_API_KEY
spelling and ensure it’s stored securely in Colab secrets. - Model Not Found: Update your model name (e.g.,
sutra-v2
instead ofsutra-v1
) in API calls. - Rate Limits: If you encounter rate limits, consider upgrading your plan or reducing request frequency.
- Incompatible Code: Ensure your code aligns with OpenAI-compatible SDKs for SUTRA-V2. Refer to docs.two.ai for updated examples.