import OpenAI from "openai"
const openai = new OpenAI({
baseURL: "https://api.aiapilab.com/v1",
apiKey: $AIAPILAB_API_KEY
})
async function main() {
const completion = await openai.chat.completions.create({
model: "mistralai/pixtral-large-2411",
messages: [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What's in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
]
})
console.log(completion.choices[0].message)
}
main()
Feature/Aspect | GPT-4 | Mistral Large 2407 | Mistral: Pixtral Large 2411 |
---|---|---|---|
Model Type | Text-only | Text-only | Multimodal (text and image) |
Parameters | 175 billion | 24 billion | 124 billion (with 1 billion vision encoder) |
Context Window | 8,192 tokens | 32,000 tokens | 128,000 tokens |
Integration Capabilities | Excellent in language understanding and generation | Strong reasoning and text generation | Advanced document interpretation and image understanding |
Performance on Benchmarks | Leading performance in various benchmarks | High performance in text tasks | Superior in multimodal tasks (e.g., 69.4% on Math Vista) |