Skip to content

AIDK API Reference / aidk-google

aidk-google ​

AIDK Google AI Adapter ​

Native Google AI (Gemini) adapter for AIDK. Provides direct integration with Google's Gemini models without requiring the Vercel AI SDK.

Features ​

  • Native API - Direct Google AI API integration
  • Streaming - Full streaming support
  • Tool Calling - Native function calling support
  • Multimodal - Image and document understanding
  • All Models - Gemini Pro, Gemini Flash, and more

Quick Start ​

typescript
import { google } from 'aidk-google';

const model = google('gemini-1.5-pro');

// Use with engine
const engine = createEngine();
const result = await engine.execute(
  <Model model={model}>
    <System>You are a helpful assistant.</System>
    <User>Hello!</User>
  </Model>
);

Interfaces ​

InterfaceDescription
GoogleModelPropsProps for GoogleModel component. Extends adapter config with optional Model component props.

Type Aliases ​

Type AliasDescription
GoogleAdapter-

Functions ​

FunctionDescription
buildClientOptions-
convertBlocksToGooglePartsConvert ContentBlocks to Google GenAI parts
createGoogleModelFactory function for creating Google model adapter using createModel
googleFactory function for creating Google adapter (alias for createGoogleModel)
GoogleModelGoogleModel component for declarative model configuration in JSX.
mapGoogleFinishReasonMap Google FinishReason to normalized StopReason
mapToolDefinitionMap tool definition to Google format

Released under the MIT License.