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: "openai/o1-mini",
messages: [
{
"role": "user",
"content": "Write a blog about cat."
}
]
})
console.log(completion.choices[0].message)
}
main()
Feature/Aspect | GPT-4 | OpenAI O1 | OpenAI O1 Mini |
---|---|---|---|
Context Length | Supports up to 64k tokens | Supports up to 128k tokens | Supports up to 128k tokens |
Safety Features | Standard safety features but less focus on advanced reasoning safety | Enhanced safety measures with high robustness against jailbreaks | Similar safety features as O1, slightly lower robustness |
Reasoning Capability | Strong reasoning but less focused on specialized tasks | Advanced reasoning with deep analysis for complex problems | Optimized for STEM tasks, excels in coding and math |
Response Generation Speed | Generally faster than both O1 models | Slower due to extensive reasoning process | Faster than O1, suitable for quick responses |
Performance in Competitions | Good performance but not specialized for coding | High performance in math competitions (AIME) and coding contests | Competitive in coding challenges, high ELO rating on Codeforces |