Skip to main content Link Search Menu Expand Document (external link)

GoogleLanguageModel.ts overview

Since v1.0.0


Exports Grouped by Category


AiModel

model

Signature

declare const model: (
  model: (string & {}) | Model,
  config?: Omit<Config.Service, "model">
) => AiModel.Model<"google", LanguageModel.LanguageModel, GoogleClient>

Source

Since v1.0.0

Constructors

make

Signature

declare const make: (options: {
  readonly model: (string & {}) | Model
  readonly config?: Omit<Config.Service, "model">
}) => Effect.Effect<LanguageModel.Service, never, GoogleClient>

Source

Since v1.0.0

Context

Config (class)

Signature

declare class Config

Source

Since v1.0.0

ProviderMetadata (class)

Signature

declare class ProviderMetadata

Source

Since v1.0.0

Layers

layer

Signature

declare const layer: (options: {
  readonly model: (string & {}) | Model
  readonly config?: Omit<Config.Service, "model">
}) => Layer.Layer<LanguageModel.LanguageModel, never, GoogleClient>

Source

Since v1.0.0

Models

Model (type alias)

Signature

type Model = string

Source

Since v1.0.0

utils

Config (namespace)

Source

Since v1.0.0

Service (interface)

Signature

export interface Service
  extends Simplify<
    Partial<
      Omit<typeof Generated.GenerateContentRequest.Encoded, "contents" | "tools" | "toolConfig" | "systemInstruction">
    >
  > {
  readonly toolConfig: Partial<{
    readonly functionCallingConfig: Omit<typeof Generated.FunctionCallingConfig.Encoded, "mode">
  }>
}

Source

Since v1.0.0

ProviderMetadata (namespace)

Source

Since v1.0.0

Service (interface)

Signature

export interface Service {
  finish: {
    readonly groundingMetadata?: Generated.GroundingMetadata | undefined
    readonly safetyRatings?: ReadonlyArray<Generated.SafetyRating> | undefined
    readonly urlContextMetadata?: Generated.UrlContextMetadata | undefined
    readonly usageMetadata?: Generated.UsageMetadata | undefined
  }

  reasoning: {
    readonly thoughtSignature?: string | undefined
  }

  "reasoning-start": {
    readonly thoughtSignature?: string | undefined
  }

  "reasoning-delta": {
    readonly thoughtSignature?: string | undefined
  }

  "text-start": {
    readonly thoughtSignature?: string | undefined
  }

  "text-delta": {
    readonly thoughtSignature?: string | undefined
  }

  "tool-params-start": {
    readonly thoughtSignature?: string | undefined
  }

  "tool-params-delta": {
    readonly thoughtSignature?: string | undefined
  }

  "tool-params-end": {
    readonly thoughtSignature?: string | undefined
  }

  "tool-call": {
    readonly thoughtSignature?: string | undefined
  }
}

Source

Since v1.0.0