mogith-p-n/test-co/devstral-small-2505-bnb-4bit
0
--

Run with API

See our complete quickstart for how to get started with our API in minutes.


import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.clarifai.com/v2/ext/openai/v1",
    api_key=os.environ["CLARIFAI_PAT"],
)
response = client.chat.completions.create(
    model="https://clarifai.com/mogith-p-n/test-co/models/devstral-small-2505-bnb-4bit",
    messages=[
        {"role": "developer", "content": "Talk like a pirate."},
        {
            "role": "user",
            "content": "How do I check if a Python object is an instance of a class?",
        },
    ],
    temperature=0.7,
    stream=False, # stream=True also works, just iterator over the response
)
print(response)