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: "qwen/qwq-32b-preview",
messages: [
{
"role": "user",
"content": "Write a blog about cat."
}
]
})
console.log(completion.choices[0].message)
}
main()
Feature/Aspect | OpenAI GPT-4 | Anthropic Claude | Qwen: QwQ-32B-Preview |
---|---|---|---|
Parameters | Up to 175 billion | 52 billion | 32.5 billion |
Context Length | 8,192 tokens | 9,000 tokens | 32,768 tokens |
Language Mixing | Generally consistent language use | Consistent language use | Occasional unexpected language switching |
Benchmark Performance | Strong performance across various domains | Competitive in instruction-following tasks | Excels in math and coding tasks |
Reasoning Capabilities | Strong reasoning but less focus on self-checking | Emphasis on safety and ethical reasoning | Advanced reasoning with self-checking |