{"version":3,"sources":["../../src/googleai/types.ts"],"sourcesContent":["/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n  CreateInteractionRequest,\n  GeminiInteraction,\n} from '../common/interaction-types.mjs';\nimport {\n  Content,\n  FinishReason,\n  GenerateContentCandidate,\n  GenerateContentRequest,\n  GenerateContentResponse,\n  GenerateContentStreamResult,\n  GenerationConfig,\n  GoogleSearchRetrievalTool,\n  HarmBlockThreshold,\n  HarmCategory,\n  Part,\n  SafetySetting,\n  TaskType,\n  TaskTypeSchema,\n  Tool,\n  ToolConfig,\n  UrlContextTool,\n} from '../common/types.mjs';\n\n// This makes it easier to import all types from one place.\nexport {\n  FinishReason,\n  HarmBlockThreshold,\n  HarmCategory,\n  TaskTypeSchema,\n  type Content,\n  type CreateInteractionRequest,\n  type GeminiInteraction,\n  type GenerateContentCandidate,\n  type GenerateContentRequest,\n  type GenerateContentResponse,\n  type GenerateContentStreamResult,\n  type GenerationConfig,\n  type GoogleSearchRetrievalTool,\n  type Part,\n  type SafetySetting,\n  type Tool,\n  type ToolConfig,\n  type UrlContextTool,\n};\n\nexport interface GoogleAIPluginOptions {\n  /**\n   * Provide the API key to use to authenticate with the Gemini API. By\n   * default, an API key must be provided explicitly here or through the\n   * `GEMINI_API_KEY` or `GOOGLE_API_KEY` environment variables.\n   *\n   * If `false` is explicitly passed, the plugin will be configured to\n   * expect an `apiKey` option to be provided to the model config at\n   * call time.\n   **/\n  apiKey?: string | false;\n  apiVersion?: string;\n  baseUrl?: string;\n  experimental_debugTraces?: boolean;\n  /** Use `responseSchema` field instead of `responseJsonSchema`. */\n  legacyResponseSchema?: boolean;\n  /**\n   * Whether to store conversations on the server when using the Interactions API.\n   * Defaults to false (stateless).\n   */\n  store?: boolean;\n  /**\n   * Additional headers to send along with the request.\n   */\n  customHeaders?: Record<string, string>;\n}\n\n/**\n * Options passed to the client\n * @public\n */\nexport interface ClientOptions {\n  /**\n   * An object that may be used to abort asynchronous requests. The request may\n   * also be aborted due to the expiration of the timeout value, if provided.\n   *\n   * NOTE: AbortSignal is a client-only operation. Using it to cancel an\n   * operation will not cancel the request in the service. You will still\n   * be charged usage for any applicable operations.\n   */\n  signal?: AbortSignal;\n  /**\n   * Request timeout in milliseconds.\n   */\n  timeout?: number;\n  /**\n   * Api Key for Gemini API\n   */\n  apiKey?: string;\n  /**\n   * Version of API endpoint to call (e.g. \"v1\" or \"v1beta\"). If not specified,\n   * defaults to 'v1beta'.\n   */\n  apiVersion?: string;\n  /**\n   * Additional attribution information to include in the x-goog-api-client header.\n   * Used by wrapper SDKs.\n   */\n  apiClient?: string;\n  /**\n   * Base endpoint url. Defaults to \"https://generativelanguage.googleapis.com\"\n   */\n  baseUrl?: string;\n  /**\n   * Custom HTTP request headers.\n   */\n  customHeaders?: Headers | Record<string, string>;\n  /**\n   * Enables additional debug traces (e.g. raw model API call details).\n   */\n  experimental_debugTraces?: boolean;\n}\n\n/**\n * Params for calling embedContent\n * @public\n */\nexport interface EmbedContentRequest {\n  content: Content;\n  taskType?: TaskType;\n  title?: string;\n}\n\n/**\n * Gemini model object\n * @public\n */\nexport interface Model {\n  name: string;\n  baseModelId: string;\n  version: string;\n  displayName: string;\n  description: string;\n  inputTokenLimit: number;\n  outputTokenLimit: number;\n  supportedGenerationMethods: string[];\n  temperature: number;\n  maxTemperature: number;\n  topP: number;\n  topK: number;\n}\n\n/**\n * Response from calling listModels\n * @public\n */\nexport interface ListModelsResponse {\n  models: Model[];\n  nextPageToken?: string;\n}\n\n/**\n * Response from calling embedContent\n * @public\n */\nexport interface EmbedContentResponse {\n  embedding: ContentEmbedding;\n}\n\n/**\n * A single content embedding.\n * @public\n */\nexport interface ContentEmbedding {\n  values: number[];\n}\n\nexport declare interface VeoPredictRequest {\n  instances: VeoInstance[];\n  parameters: VeoParameters;\n}\n\nexport declare interface VeoParameters {\n  negativePrompt?: string;\n  aspectRatio?: string;\n  personGeneration?: string;\n  durationSeconds?: number;\n  enhancePrompt?: boolean;\n  resolution?: string;\n  seed?: number;\n}\n\nexport declare interface VeoInstance {\n  prompt: string;\n  image?: VeoImage;\n  video?: VeoVideo;\n}\n\nexport declare interface VeoImage {\n  bytesBase64Encoded: string;\n  mimeType: string;\n}\n\nexport declare interface VeoVideo {\n  uri: string;\n}\n\nexport declare interface VeoOperation {\n  name: string;\n  done?: boolean;\n  error?: {\n    message: string;\n  };\n  response?: {\n    generateVideoResponse: {\n      generatedSamples: { video: { uri: string } }[];\n    };\n  };\n}\n"],"mappings":"AAoBA;AAAA,EAEE;AAAA,EAOA;AAAA,EACA;AAAA,EAIA;AAAA,OAIK;","names":[]}