MCPcopy Index your code
hub / github.com/Effect-TS/effect / layer

Function layer

packages/ai/google/src/GoogleClient.ts:192–214  ·  view source on GitHub ↗
(options: {
  /**
   * The API key to use to communicate with the Google Generative AI API.
   */
  readonly apiKey?: Redacted.Redacted | undefined

  /**
   * The URL to use to communicate with the Google Generative AI API.
   *
   * Defaults to `"https://generativelanguage.googleapis.com/v1beta"`.
   */
  readonly apiUrl?: string | undefined

  /**
   * A method which can be used to transform the underlying `HttpClient` which
   * will be used to communicate with the Google Generative AI API.
   */
  readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined
})

Source from the content-addressed store, hash-verified

190 * @category Layers
191 */
192export const layer = (options: {
193 /**
194 * The API key to use to communicate with the Google Generative AI API.
195 */
196 readonly apiKey?: Redacted.Redacted | undefined
197
198 /**
199 * The URL to use to communicate with the Google Generative AI API.
200 *
201 * Defaults to `"https://generativelanguage.googleapis.com/v1beta"`.
202 */
203 readonly apiUrl?: string | undefined
204
205 /**
206 * A method which can be used to transform the underlying `HttpClient` which
207 * will be used to communicate with the Google Generative AI API.
208 */
209 readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined
210}): Layer.Layer<
211 GoogleClient,
212 never,
213 HttpClient.HttpClient
214> => Layer.scoped(GoogleClient, make(options))
215
216/**
217 * @since 1.0.0

Callers

nothing calls this directly

Calls 1

makeFunction · 0.70

Tested by

no test coverage detected