traitclaw-openai
Native OpenAI provider for TraitClaw with structured output and ergonomic constructors.
Provides first-class integration with OpenAI's API including GPT-4o, GPT-4o-mini, o1, and future models. Uses native structured output when available.
Usage
use *;
use OpenAiProvider;
let provider = new;
let agent = builder
.provider
.system
.build?;
let output = agent.run.await?;
When to Use This vs traitclaw-openai-compat
traitclaw-openai |
traitclaw-openai-compat |
|
|---|---|---|
| OpenAI-only features | ✅ Native support | Partial |
| Structured output | ✅ Native response_format |
Schema injection |
| Other backends (Ollama, Groq) | ❌ | ✅ |
Use this crate for pure OpenAI deployments. Use traitclaw-openai-compat if you need to swap between providers.
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.