Back to Open Interpreter

AI21

docs/language-models/hosted-models/ai21.mdx

0.4.21.0 KB
Original Source

To use Open Interpreter with a model from AI21, set the model flag:

<CodeGroup>
bash
interpreter --model j2-light
python
from interpreter import interpreter

interpreter.llm.model = "j2-light"
interpreter.chat()
</CodeGroup>

Supported Models

We support any model from AI21:

<CodeGroup>
bash
interpreter --model j2-light
interpreter --model j2-mid
interpreter --model j2-ultra
python
interpreter.llm.model = "j2-light"
interpreter.llm.model = "j2-mid"
interpreter.llm.model = "j2-ultra"
</CodeGroup>

Required Environment Variables

Set the following environment variables (click here to learn how) to use these models.

Environment VariableDescriptionWhere to Find
AI21_API_KEYThe API key for authenticating to AI21's services.AI21 Account Page