Thanks to visit codestin.com
Credit goes to effect-ts.github.io

Skip to main content Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App

GoogleClient.ts overview

Since v1.0.0


Exports Grouped by Category


Constructors

make

Signature

declare const make: (options: {
  readonly apiKey?: Redacted.Redacted | undefined
  readonly apiUrl?: string | undefined
  readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined
}) => Effect.Effect<Service, never, HttpClient.HttpClient | Scope.Scope>

Source

Since v1.0.0

Context

GoogleClient (class)

Signature

declare class GoogleClient

Source

Since v1.0.0

Layers

layer

Signature

declare const layer: (options: {
  readonly apiKey?: Redacted.Redacted | undefined
  readonly apiUrl?: string | undefined
  readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined
}) => Layer.Layer<GoogleClient, never, HttpClient.HttpClient>

Source

Since v1.0.0

layerConfig

Signature

declare const layerConfig: (options: {
  readonly apiKey?: Config.Config<Redacted.Redacted | undefined> | undefined
  readonly apiUrl?: Config.Config<string | undefined> | undefined
  readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined
}) => Layer.Layer<GoogleClient, ConfigError, HttpClient.HttpClient>

Source

Since v1.0.0

Models

Service (interface)

Signature

export interface Service {
  readonly client: Generated.Client

  readonly streamRequest: <A, I, R>(
    request: HttpClientRequest.HttpClientRequest,
    schema: Schema.Schema<A, I, R>
  ) => Stream.Stream<A, AiError.AiError, R>

  readonly generateContent: (
    request: typeof Generated.GenerateContentRequest.Encoded
  ) => Effect.Effect<Generated.GenerateContentResponse, AiError.AiError>

  readonly generateContentStream: (
    request: typeof Generated.GenerateContentRequest.Encoded
  ) => Stream.Stream<Generated.GenerateContentResponse, AiError.AiError>
}

Source

Since v1.0.0