@fancyrobot/fred-openai
v4.0.0
Published
OpenAI provider for Fred AI framework
Downloads
639
Readme
@fancyrobot/fred-openai
OpenAI provider for Fred AI framework.
See the Phase 68 migration matrix for the compatible core and Effect AI lines.
Installation
bun add @fancyrobot/[email protected] \
@fancyrobot/[email protected] effect@^3.21.5 \
@effect/ai@^0.35.0 @effect/ai-openai@^0.39.0Setup
Set your API key:
export OPENAI_API_KEY=your-api-keyUsage
Auto-Registration
Import the package to auto-register the provider:
import '@fancyrobot/fred-openai';This is the recommended approach -- the provider registers itself when imported.
Programmatic
import { createFred } from '@fancyrobot/fred';
import '@fancyrobot/fred-openai';
const fred = await createFred();
await fred.providers.use('openai');Config File (YAML)
providers:
- id: openai
type: openaiAgent File (.md)
---
id: my-agent
platform: openai
model: gpt-4o
---
You are a helpful assistant.Supported Models
See OpenAI documentation for available models.
Related
- Fred core -- main framework documentation
- All packages -- monorepo overview
License
MIT
