@fancyrobot/fred-google
v4.1.0
Published
Google (Gemini) provider for Fred AI framework
Maintainers
Readme
@fancyrobot/fred-google
Google (Gemini) 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-google@^0.14.0 @effect/platform@^0.96.0Setup
Set your API key:
export GOOGLE_GENERATIVE_AI_API_KEY=your-api-keyUsage
Auto-Registration
Import the package to auto-register the provider:
import '@fancyrobot/fred-google';This is the recommended approach -- the provider registers itself when imported.
Programmatic
import { createFred } from '@fancyrobot/fred';
import '@fancyrobot/fred-google';
const fred = await createFred();
await fred.providers.use('google', {
googleOAuth: { clientId: process.env.FRED_GOOGLE_OAUTH_CLIENT_ID },
});googleOAuth.clientId is required only for saved OAuth connections. Fred uses
the stored expiry and credential version to refresh immediately before agent
invocation, connections.resolve, or connections.test; Google API-key
connections are unchanged. Pass an optional client secret as a
Redacted<string> only when the Google client registration requires one.
Config File (YAML)
providers:
- id: google
type: googleAgent File (.md)
---
id: my-agent
platform: google
model: gemini-2.0-flash
---
You are a helpful assistant.Supported Models
See Google documentation for available models.
Related
- Fred core -- main framework documentation
- All packages -- monorepo overview
License
MIT
