Checkout the example notebook in our cookbook repository.
Aisuite works only with text-to-text models.
Prerequisites
- Create an API key to authorize requests to Nebius Token Factory.
-
Save the API key into a
NEBIUS_API_KEYenvironment variable: -
Install the
aisuiteandopenaipackages:
Create a chat completion
Paste the following code into your script:-
To work with a different model, change
model_id. You can copy the model ID from the model card or look it up in the list. -
Modify
messagesto get the model’s responses to your questions. To work with a larger context, you can also add previous responses from the model. For example:
Checkout the example notebook in our cookbook repository.