MiniCPM3-4B is the 3rd generation of MiniCPM series. The overall performance of MiniCPM3-4B surpasses Phi-3.5-mini-Instruct and GPT-3.5-Turbo-0125, being comparable with many recent 7B~9B models.
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/openbmb/miniCPM/models/MiniCPM3-4B", 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)