@langchain/google-common 2.0.4 → 2.0.5-dev-1765431816670

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/auth.d.cts.map +1 -0
  2. package/dist/auth.d.ts.map +1 -0
  3. package/dist/chat_models.d.cts +2 -14
  4. package/dist/chat_models.d.cts.map +1 -0
  5. package/dist/chat_models.d.ts +2 -14
  6. package/dist/chat_models.d.ts.map +1 -0
  7. package/dist/connection.d.cts +0 -2
  8. package/dist/connection.d.cts.map +1 -0
  9. package/dist/connection.d.ts +0 -2
  10. package/dist/connection.d.ts.map +1 -0
  11. package/dist/embeddings.d.cts.map +1 -0
  12. package/dist/embeddings.d.ts.map +1 -0
  13. package/dist/experimental/media.d.cts +6 -7
  14. package/dist/experimental/media.d.cts.map +1 -0
  15. package/dist/experimental/media.d.ts +6 -7
  16. package/dist/experimental/media.d.ts.map +1 -0
  17. package/dist/experimental/utils/media_core.d.cts +3 -4
  18. package/dist/experimental/utils/media_core.d.cts.map +1 -0
  19. package/dist/experimental/utils/media_core.d.ts +3 -4
  20. package/dist/experimental/utils/media_core.d.ts.map +1 -0
  21. package/dist/llms.d.cts +0 -7
  22. package/dist/llms.d.cts.map +1 -0
  23. package/dist/llms.d.ts +0 -7
  24. package/dist/llms.d.ts.map +1 -0
  25. package/dist/output_parsers.d.cts.map +1 -0
  26. package/dist/output_parsers.d.ts.map +1 -0
  27. package/dist/types-anthropic.d.cts +1 -4
  28. package/dist/types-anthropic.d.cts.map +1 -0
  29. package/dist/types-anthropic.d.ts +1 -4
  30. package/dist/types-anthropic.d.ts.map +1 -0
  31. package/dist/types.d.cts +11 -24
  32. package/dist/types.d.cts.map +1 -0
  33. package/dist/types.d.ts +11 -24
  34. package/dist/types.d.ts.map +1 -0
  35. package/dist/utils/common.d.cts.map +1 -0
  36. package/dist/utils/common.d.ts.map +1 -0
  37. package/dist/utils/failed_handler.d.cts +0 -1
  38. package/dist/utils/failed_handler.d.cts.map +1 -0
  39. package/dist/utils/failed_handler.d.ts +0 -1
  40. package/dist/utils/failed_handler.d.ts.map +1 -0
  41. package/dist/utils/gemini.d.cts.map +1 -0
  42. package/dist/utils/gemini.d.ts.map +1 -0
  43. package/dist/utils/palm.d.cts +0 -1
  44. package/dist/utils/palm.d.cts.map +1 -0
  45. package/dist/utils/palm.d.ts +0 -1
  46. package/dist/utils/palm.d.ts.map +1 -0
  47. package/dist/utils/safety.d.cts +0 -1
  48. package/dist/utils/safety.d.cts.map +1 -0
  49. package/dist/utils/safety.d.ts +0 -1
  50. package/dist/utils/safety.d.ts.map +1 -0
  51. package/dist/utils/stream.d.cts +0 -21
  52. package/dist/utils/stream.d.cts.map +1 -0
  53. package/dist/utils/stream.d.ts +0 -21
  54. package/dist/utils/stream.d.ts.map +1 -0
  55. package/dist/utils/zod_to_gemini_parameters.d.cts +4 -14
  56. package/dist/utils/zod_to_gemini_parameters.d.cts.map +1 -0
  57. package/dist/utils/zod_to_gemini_parameters.d.ts +4 -14
  58. package/dist/utils/zod_to_gemini_parameters.d.ts.map +1 -0
  59. package/package.json +17 -7
package/dist/types.d.ts CHANGED
@@ -90,7 +90,7 @@ type GoogleAISafetyMethod = (typeof GoogleAISafetyMethod)[keyof typeof GoogleAIS
90
90
  interface GoogleAISafetySetting {
91
91
  category: GoogleAISafetyCategory | string;
92
92
  threshold: GoogleAISafetyThreshold | string;
93
- method?: GoogleAISafetyMethod | string; // Just for Vertex AI?
93
+ method?: GoogleAISafetyMethod | string;
94
94
  }
95
95
  type GoogleAIResponseMimeType = "text/plain" | "application/json";
96
96
  type GoogleAIModelModality = "TEXT" | "IMAGE" | "AUDIO" | string;
@@ -308,7 +308,6 @@ interface GoogleAIModelRequestParams extends GoogleAIModelParams {
308
308
  *
309
309
  * The tool configuration's "any" mode ("forced function calling") is supported for Gemini 1.5 Pro models only.
310
310
  */
311
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
312
311
  tool_choice?: string | "auto" | "any" | "none" | Record<string, any>;
313
312
  /**
314
313
  * Allowed functions to call when the mode is "any".
@@ -340,18 +339,17 @@ interface GoogleAIBaseLanguageModelCallOptions extends BaseChatModelCallOptions,
340
339
  */
341
340
  interface GoogleBaseLLMInput<AuthOptions> extends GoogleAIBaseLLMInput<AuthOptions> {}
342
341
  interface GoogleResponse {
343
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
344
342
  data: any;
345
343
  }
346
344
  interface GoogleRawResponse extends GoogleResponse {
347
345
  data: Blob;
348
346
  }
349
347
  interface GeminiPartBase {
350
- thought?: boolean; // Output only
348
+ thought?: boolean;
351
349
  thoughtSignature?: string;
352
350
  }
353
351
  interface GeminiVideoMetadata {
354
- fps?: number; // Double in range (0.0, 24.0]
352
+ fps?: number;
355
353
  startOffset?: string;
356
354
  endOffset?: string;
357
355
  }
@@ -373,14 +371,12 @@ interface GeminiPartFileData extends GeminiPartBaseFile {
373
371
  fileUri: string;
374
372
  };
375
373
  }
376
- // AI Studio only?
377
374
  interface GeminiPartFunctionCall extends GeminiPartBase {
378
375
  functionCall: {
379
376
  name: string;
380
377
  args?: object;
381
378
  };
382
379
  }
383
- // AI Studio Only?
384
380
  interface GeminiPartFunctionResponse extends GeminiPartBase {
385
381
  functionResponse: {
386
382
  name: string;
@@ -408,9 +404,9 @@ interface GeminiCitation {
408
404
  publicationDate: GoogleTypeDate;
409
405
  }
410
406
  interface GoogleTypeDate {
411
- year: number; // 1-9999 or 0 to specify a date without a year
412
- month: number; // 1-12 or 0 to specify a year without a month and day
413
- day: number; // Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant
407
+ year: number;
408
+ month: number;
409
+ day: number;
414
410
  }
415
411
  interface GeminiGroundingMetadata {
416
412
  webSearchQueries?: string[];
@@ -421,7 +417,7 @@ interface GeminiGroundingMetadata {
421
417
  }
422
418
  interface GeminiSearchEntryPoint {
423
419
  renderedContent?: string;
424
- sdkBlob?: string; // Base64 encoded JSON representing array of tuple.
420
+ sdkBlob?: string;
425
421
  }
426
422
  interface GeminiGroundingChunk {
427
423
  web: GeminiGroundingChunkWeb;
@@ -474,26 +470,18 @@ interface GeminiLogprobsResultCandidate {
474
470
  tokenId: number;
475
471
  logProbability: number;
476
472
  }
477
- // The "system" content appears to only be valid in the systemInstruction
478
473
  type GeminiRole = "system" | "user" | "model" | "function";
479
474
  interface GeminiContent {
480
475
  parts: GeminiPart[];
481
- role: GeminiRole; // Vertex AI requires the role
476
+ role: GeminiRole;
482
477
  }
483
- /*
484
- * If additional attributes are added here, they should also be
485
- * added to the attributes below
486
- */
487
478
  interface GeminiTool {
488
479
  functionDeclarations?: GeminiFunctionDeclaration[];
489
- googleSearchRetrieval?: GoogleSearchRetrieval; // Gemini-1.5
490
- googleSearch?: GoogleSearch; // Gemini-2.0
480
+ googleSearchRetrieval?: GoogleSearchRetrieval;
481
+ googleSearch?: GoogleSearch;
491
482
  urlContext?: UrlContext;
492
483
  retrieval?: VertexAIRetrieval;
493
484
  }
494
- /*
495
- * The known strings in this type should match those in GeminiSearchToolAttribuets
496
- */
497
485
  type GoogleSearchToolSetting = boolean | "googleSearchRetrieval" | "googleSearch" | string;
498
486
  declare const GeminiSearchToolAttributes: string[];
499
487
  declare const GeminiToolAttributes: string[];
@@ -665,7 +653,6 @@ interface GoogleAIAPIParams {
665
653
  apiName?: string;
666
654
  apiConfig?: GoogleAIAPIConfig;
667
655
  }
668
- // Embeddings
669
656
  /**
670
657
  * Defines the parameters required to initialize a
671
658
  * GoogleEmbeddings instance. It extends EmbeddingsParams and
@@ -710,7 +697,7 @@ interface AIStudioEmbeddingsRequest {
710
697
  content: {
711
698
  parts: GeminiPartText[];
712
699
  };
713
- model?: string; // Documentation says required, but tests say otherwise
700
+ model?: string;
714
701
  taskType?: GoogleEmbeddingsTaskType;
715
702
  title?: string;
716
703
  outputDimensionality?: number;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","names":["BaseLLMParams","BaseChatModelCallOptions","BindToolsInput","BaseMessage","BaseMessageChunk","MessageContent","ChatGenerationChunk","ChatResult","EmbeddingsParams","AsyncCallerCallOptions","JsonStream","MediaManager","AnthropicResponseData","AnthropicAPIConfig","GoogleClientParams","AuthOptions","GooglePlatformType","GoogleConnectionParams","GoogleAISafetyCategory","GoogleAISafetyThreshold","GoogleAISafetyMethod","GoogleAISafetySetting","GoogleAIResponseMimeType","GoogleAIModelModality","GoogleThinkingConfig","GooglePrebuiltVoiceName","GooglePrebuiltVoiceConfig","GoogleVoiceConfig","GoogleSpeakerVoiceConfig","GoogleMultiSpeakerVoiceConfig","GoogleSpeechConfigSingle","GoogleSpeechConfigMulti","GoogleSpeechConfig","GoogleSpeechSpeakerName","GoogleSpeechVoice","GoogleSpeechVoiceLanguage","GoogleSpeechVoicesLanguage","GoogleSpeechSimplifiedLanguage","GoogleSpeechConfigSimplified","GoogleModelParams","GoogleAIModelParams","Record","GoogleAIToolType","GeminiTool","GoogleAIModelRequestParams","GoogleAIBaseLLMInput","GoogleAISafetyParams","GoogleAIAPIParams","GoogleAIBaseLanguageModelCallOptions","GoogleBaseLLMInput","GoogleResponse","GoogleRawResponse","Blob","GeminiPartBase","GeminiVideoMetadata","GeminiPartBaseFile","GeminiPartText","GeminiPartInlineData","GeminiPartFileData","GeminiPartFunctionCall","GeminiPartFunctionResponse","GeminiPart","GeminiSafetySetting","GeminiSafetyRating","GeminiCitationMetadata","GeminiCitation","GoogleTypeDate","GeminiGroundingMetadata","GeminiSearchEntryPoint","GeminiGroundingChunk","GeminiGroundingSupport","GeminiRetrievalMetadata","GeminiGroundingChunkWeb","GeminiGroundingChunkRetrievedContext","GeminiSegment","GeminiUrlRetrievalStatus","GeminiUrlRetrievalContext","GeminiUrlRetrievalMetadata","GeminiUrlMetadata","GeminiUrlContextMetadata","GeminiLogprobsResult","GeminiLogprobsTopCandidate","GeminiLogprobsResultCandidate","GeminiRole","GeminiContent","GeminiFunctionDeclaration","GoogleSearchRetrieval","GoogleSearch","UrlContext","VertexAIRetrieval","GoogleSearchToolSetting","GeminiSearchToolAttributes","GeminiToolAttributes","GeminiFunctionSchema","GeminiFunctionSchemaType","GeminiGenerationConfig","GeminiRequest","GeminiResponseCandidate","GeminiResponsePromptFeedback","ModalityEnum","ModalityTokenCount","GenerateContentResponseUsageMetadata","GenerateContentResponseData","GoogleLLMModelFamily","VertexModelFamily","GoogleLLMResponseData","GoogleLLMResponse","GoogleAISafetyHandler","GeminiJsonSchema","GeminiJsonSchemaDirty","GoogleAIAPI","Promise","GeminiAPIConfig","GoogleAIAPIConfig","BaseGoogleEmbeddingsParams","BaseGoogleEmbeddingsOptions","GoogleEmbeddingsTaskType","VertexEmbeddingsInstance","VertexEmbeddingsParameters","VertexEmbeddingsRequest","AIStudioEmbeddingsRequest","GoogleEmbeddingsRequest","VertexEmbeddingsResponsePrediction","VertexEmbeddingsResponse","AIStudioEmbeddingsResponse","GoogleEmbeddingsResponse"],"sources":["../src/types.d.ts"],"sourcesContent":["import type { BaseLLMParams } from \"@langchain/core/language_models/llms\";\nimport type { BaseChatModelCallOptions, BindToolsInput } from \"@langchain/core/language_models/chat_models\";\nimport { BaseMessage, BaseMessageChunk, MessageContent } from \"@langchain/core/messages\";\nimport { ChatGenerationChunk, ChatResult } from \"@langchain/core/outputs\";\nimport { EmbeddingsParams } from \"@langchain/core/embeddings\";\nimport { AsyncCallerCallOptions } from \"@langchain/core/utils/async_caller\";\nimport type { JsonStream } from \"./utils/stream.js\";\nimport { MediaManager } from \"./experimental/utils/media_core.js\";\nimport { AnthropicResponseData, AnthropicAPIConfig } from \"./types-anthropic.js\";\nexport * from \"./types-anthropic.js\";\n/**\n * Parameters needed to setup the client connection.\n * AuthOptions are something like GoogleAuthOptions (from google-auth-library)\n * or WebGoogleAuthOptions.\n */\nexport interface GoogleClientParams<AuthOptions> {\n authOptions?: AuthOptions;\n /** Some APIs allow an API key instead */\n apiKey?: string;\n}\n/**\n * What platform is this running on?\n * gai - Google AI Studio / MakerSuite / Generative AI platform\n * gcp - Google Cloud Platform\n */\nexport type GooglePlatformType = \"gai\" | \"gcp\";\nexport interface GoogleConnectionParams<AuthOptions> extends GoogleClientParams<AuthOptions> {\n /** Hostname for the API call (if this is running on GCP) */\n endpoint?: string;\n /** Region where the LLM is stored (if this is running on GCP) */\n location?: string;\n /** The version of the API functions. Part of the path. */\n apiVersion?: string;\n /**\n * What platform to run the service on.\n * If not specified, the class should determine this from other\n * means. Either way, the platform actually used will be in\n * the \"platform\" getter.\n */\n platformType?: GooglePlatformType;\n /**\n * For compatibility with Google's libraries, should this use Vertex?\n * The \"platformType\" parmeter takes precedence.\n */\n vertexai?: boolean;\n}\nexport declare const GoogleAISafetyCategory: {\n readonly Harassment: \"HARM_CATEGORY_HARASSMENT\";\n readonly HARASSMENT: \"HARM_CATEGORY_HARASSMENT\";\n readonly HARM_CATEGORY_HARASSMENT: \"HARM_CATEGORY_HARASSMENT\";\n readonly HateSpeech: \"HARM_CATEGORY_HATE_SPEECH\";\n readonly HATE_SPEECH: \"HARM_CATEGORY_HATE_SPEECH\";\n readonly HARM_CATEGORY_HATE_SPEECH: \"HARM_CATEGORY_HATE_SPEECH\";\n readonly SexuallyExplicit: \"HARM_CATEGORY_SEXUALLY_EXPLICIT\";\n readonly SEXUALLY_EXPLICIT: \"HARM_CATEGORY_SEXUALLY_EXPLICIT\";\n readonly HARM_CATEGORY_SEXUALLY_EXPLICIT: \"HARM_CATEGORY_SEXUALLY_EXPLICIT\";\n readonly Dangerous: \"HARM_CATEGORY_DANGEROUS\";\n readonly DANGEROUS: \"HARM_CATEGORY_DANGEROUS\";\n readonly HARM_CATEGORY_DANGEROUS: \"HARM_CATEGORY_DANGEROUS\";\n readonly CivicIntegrity: \"HARM_CATEGORY_CIVIC_INTEGRITY\";\n readonly CIVIC_INTEGRITY: \"HARM_CATEGORY_CIVIC_INTEGRITY\";\n readonly HARM_CATEGORY_CIVIC_INTEGRITY: \"HARM_CATEGORY_CIVIC_INTEGRITY\";\n};\nexport type GoogleAISafetyCategory = (typeof GoogleAISafetyCategory)[keyof typeof GoogleAISafetyCategory];\nexport declare const GoogleAISafetyThreshold: {\n readonly None: \"BLOCK_NONE\";\n readonly NONE: \"BLOCK_NONE\";\n readonly BLOCK_NONE: \"BLOCK_NONE\";\n readonly Few: \"BLOCK_ONLY_HIGH\";\n readonly FEW: \"BLOCK_ONLY_HIGH\";\n readonly BLOCK_ONLY_HIGH: \"BLOCK_ONLY_HIGH\";\n readonly Some: \"BLOCK_MEDIUM_AND_ABOVE\";\n readonly SOME: \"BLOCK_MEDIUM_AND_ABOVE\";\n readonly BLOCK_MEDIUM_AND_ABOVE: \"BLOCK_MEDIUM_AND_ABOVE\";\n readonly Most: \"BLOCK_LOW_AND_ABOVE\";\n readonly MOST: \"BLOCK_LOW_AND_ABOVE\";\n readonly BLOCK_LOW_AND_ABOVE: \"BLOCK_LOW_AND_ABOVE\";\n readonly Off: \"OFF\";\n readonly OFF: \"OFF\";\n readonly BLOCK_OFF: \"OFF\";\n};\nexport type GoogleAISafetyThreshold = (typeof GoogleAISafetyThreshold)[keyof typeof GoogleAISafetyThreshold];\nexport declare const GoogleAISafetyMethod: {\n readonly Severity: \"SEVERITY\";\n readonly Probability: \"PROBABILITY\";\n};\nexport type GoogleAISafetyMethod = (typeof GoogleAISafetyMethod)[keyof typeof GoogleAISafetyMethod];\nexport interface GoogleAISafetySetting {\n category: GoogleAISafetyCategory | string;\n threshold: GoogleAISafetyThreshold | string;\n method?: GoogleAISafetyMethod | string;\n}\nexport type GoogleAIResponseMimeType = \"text/plain\" | \"application/json\";\nexport type GoogleAIModelModality = \"TEXT\" | \"IMAGE\" | \"AUDIO\" | string;\nexport interface GoogleThinkingConfig {\n thinkingBudget?: number;\n includeThoughts?: boolean;\n}\nexport type GooglePrebuiltVoiceName = string;\nexport interface GooglePrebuiltVoiceConfig {\n voiceName: GooglePrebuiltVoiceName;\n}\nexport interface GoogleVoiceConfig {\n prebuiltVoiceConfig: GooglePrebuiltVoiceConfig;\n}\nexport interface GoogleSpeakerVoiceConfig {\n speaker: string;\n voiceConfig: GoogleVoiceConfig;\n}\nexport interface GoogleMultiSpeakerVoiceConfig {\n speakerVoiceConfigs: GoogleSpeakerVoiceConfig[];\n}\nexport interface GoogleSpeechConfigSingle {\n voiceConfig: GoogleVoiceConfig;\n languageCode?: string;\n}\nexport interface GoogleSpeechConfigMulti {\n multiSpeakerVoiceConfig: GoogleMultiSpeakerVoiceConfig;\n languageCode?: string;\n}\nexport type GoogleSpeechConfig = GoogleSpeechConfigSingle | GoogleSpeechConfigMulti;\n/**\n * A simplified version of the GoogleSpeakerVoiceConfig\n */\nexport interface GoogleSpeechSpeakerName {\n speaker: string;\n name: GooglePrebuiltVoiceName;\n}\nexport type GoogleSpeechVoice = GooglePrebuiltVoiceName | GoogleSpeechSpeakerName | GoogleSpeechSpeakerName[];\nexport interface GoogleSpeechVoiceLanguage {\n voice: GoogleSpeechVoice;\n languageCode: string;\n}\nexport interface GoogleSpeechVoicesLanguage {\n voices: GoogleSpeechVoice;\n languageCode: string;\n}\n/**\n * A simplified way to represent the voice (or voices) and language code.\n * \"voice\" and \"voices\" are semantically the same, we're not enforcing\n * that one is an array and one isn't.\n */\nexport type GoogleSpeechSimplifiedLanguage = GoogleSpeechVoiceLanguage | GoogleSpeechVoicesLanguage;\n/**\n * A simplified way to represent the voices.\n * It can either be the voice (or voices), or the voice or voices with language configuration\n */\nexport type GoogleSpeechConfigSimplified = GoogleSpeechVoice | GoogleSpeechSimplifiedLanguage;\nexport interface GoogleModelParams {\n /** Model to use */\n model?: string;\n /**\n * Model to use\n * Alias for `model`\n */\n modelName?: string;\n}\nexport interface GoogleAIModelParams extends GoogleModelParams {\n /** Sampling temperature to use */\n temperature?: number;\n /**\n * Maximum number of tokens to generate in the completion.\n * This may include reasoning tokens (for backwards compatibility).\n */\n maxOutputTokens?: number;\n /**\n * The maximum number of the output tokens that will be used\n * for the \"thinking\" or \"reasoning\" stages.\n */\n maxReasoningTokens?: number;\n /**\n * An alias for \"maxReasoningTokens\"\n */\n thinkingBudget?: number;\n /**\n * An OpenAI compatible parameter that will map to \"maxReasoningTokens\"\n */\n reasoningEffort?: \"low\" | \"medium\" | \"high\";\n /**\n * Top-p changes how the model selects tokens for output.\n *\n * Tokens are selected from most probable to least until the sum\n * of their probabilities equals the top-p value.\n *\n * For example, if tokens A, B, and C have a probability of\n * .3, .2, and .1 and the top-p value is .5, then the model will\n * select either A or B as the next token (using temperature).\n */\n topP?: number;\n /**\n * Top-k changes how the model selects tokens for output.\n *\n * A top-k of 1 means the selected token is the most probable among\n * all tokens in the model’s vocabulary (also called greedy decoding),\n * while a top-k of 3 means that the next token is selected from\n * among the 3 most probable tokens (using temperature).\n */\n topK?: number;\n /**\n * Seed used in decoding. If not set, the request uses a randomly generated seed.\n */\n seed?: number;\n /**\n * Presence penalty applied to the next token's logprobs\n * if the token has already been seen in the response.\n * This penalty is binary on/off and not dependant on the\n * number of times the token is used (after the first).\n * Use frequencyPenalty for a penalty that increases with each use.\n * A positive penalty will discourage the use of tokens that have\n * already been used in the response, increasing the vocabulary.\n * A negative penalty will encourage the use of tokens that have\n * already been used in the response, decreasing the vocabulary.\n */\n presencePenalty?: number;\n /**\n * Frequency penalty applied to the next token's logprobs,\n * multiplied by the number of times each token has been seen\n * in the respponse so far.\n * A positive penalty will discourage the use of tokens that\n * have already been used, proportional to the number of times\n * the token has been used:\n * The more a token is used, the more dificult it is for the model\n * to use that token again increasing the vocabulary of responses.\n * Caution: A _negative_ penalty will encourage the model to reuse\n * tokens proportional to the number of times the token has been used.\n * Small negative values will reduce the vocabulary of a response.\n * Larger negative values will cause the model to start repeating\n * a common token until it hits the maxOutputTokens limit.\n */\n frequencyPenalty?: number;\n stopSequences?: string[];\n safetySettings?: GoogleAISafetySetting[];\n convertSystemMessageToHumanContent?: boolean;\n /**\n * Available for `gemini-1.5-pro`.\n * The output format of the generated candidate text.\n * Supported MIME types:\n * - `text/plain`: Text output.\n * - `application/json`: JSON response in the candidates.\n *\n * @default \"text/plain\"\n */\n responseMimeType?: GoogleAIResponseMimeType;\n /**\n * Whether or not to stream.\n * @default false\n */\n streaming?: boolean;\n /**\n * Whether to return log probabilities of the output tokens or not.\n * If true, returns the log probabilities of each output token\n * returned in the content of message.\n */\n logprobs?: boolean;\n /**\n * An integer between 0 and 5 specifying the number of\n * most likely tokens to return at each token position,\n * each with an associated log probability.\n * logprobs must be set to true if this parameter is used.\n */\n topLogprobs?: number;\n /**\n * The modalities of the response.\n */\n responseModalities?: GoogleAIModelModality[];\n /**\n * Custom metadata labels to associate with the request.\n * Only supported on Vertex AI (Google Cloud Platform).\n * Labels are key-value pairs where both keys and values must be strings.\n *\n * Example:\n * ```typescript\n * {\n * labels: {\n * \"team\": \"research\",\n * \"component\": \"frontend\",\n * \"environment\": \"production\"\n * }\n * }\n * ```\n */\n labels?: Record<string, string>;\n /**\n * Speech generation configuration.\n * You can use either Google's definition of the speech configuration,\n * or a simplified version we've defined (which can be as simple\n * as the name of a pre-defined voice).\n */\n speechConfig?: GoogleSpeechConfig | GoogleSpeechConfigSimplified;\n}\nexport type GoogleAIToolType = BindToolsInput | GeminiTool;\n/**\n * The params which can be passed to the API at request time.\n */\nexport interface GoogleAIModelRequestParams extends GoogleAIModelParams {\n tools?: GoogleAIToolType[];\n /**\n * Force the model to use tools in a specific way.\n *\n * | Mode |\tDescription |\n * |----------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n * | \"auto\"\t | The default model behavior. The model decides whether to predict a function call or a natural language response. |\n * | \"any\"\t | The model must predict only function calls. To limit the model to a subset of functions, define the allowed function names in `allowed_function_names`. |\n * | \"none\"\t | The model must not predict function calls. This behavior is equivalent to a model request without any associated function declarations. |\n * | string | The string value must be one of the function names. This will force the model to predict the specified function call. |\n *\n * The tool configuration's \"any\" mode (\"forced function calling\") is supported for Gemini 1.5 Pro models only.\n */\n tool_choice?: string | \"auto\" | \"any\" | \"none\" | Record<string, any>;\n /**\n * Allowed functions to call when the mode is \"any\".\n * If empty, any one of the provided functions are called.\n */\n allowed_function_names?: string[];\n /**\n * Used to specify a previously created context cache to use with generation.\n * For Vertex, this should be of the form:\n * \"projects/PROJECT_NUMBER/locations/LOCATION/cachedContents/CACHE_ID\",\n *\n * See these guides for more information on how to use context caching:\n * https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-create\n * https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-use\n */\n cachedContent?: string;\n}\nexport interface GoogleAIBaseLLMInput<AuthOptions> extends BaseLLMParams, GoogleConnectionParams<AuthOptions>, GoogleAIModelParams, GoogleAISafetyParams, GoogleAIAPIParams {\n}\nexport interface GoogleAIBaseLanguageModelCallOptions extends BaseChatModelCallOptions, GoogleAIModelRequestParams, GoogleAISafetyParams {\n /**\n * Whether or not to include usage data, like token counts\n * in the streamed response chunks.\n * @default true\n */\n streamUsage?: boolean;\n}\n/**\n * Input to LLM class.\n */\nexport interface GoogleBaseLLMInput<AuthOptions> extends GoogleAIBaseLLMInput<AuthOptions> {\n}\nexport interface GoogleResponse {\n data: any;\n}\nexport interface GoogleRawResponse extends GoogleResponse {\n data: Blob;\n}\nexport interface GeminiPartBase {\n thought?: boolean;\n thoughtSignature?: string;\n}\nexport interface GeminiVideoMetadata {\n fps?: number;\n startOffset?: string;\n endOffset?: string;\n}\nexport interface GeminiPartBaseFile extends GeminiPartBase {\n videoMetadata?: GeminiVideoMetadata;\n}\nexport interface GeminiPartText extends GeminiPartBase {\n text: string;\n}\nexport interface GeminiPartInlineData extends GeminiPartBaseFile {\n inlineData: {\n mimeType: string;\n data: string;\n };\n}\nexport interface GeminiPartFileData extends GeminiPartBaseFile {\n fileData: {\n mimeType: string;\n fileUri: string;\n };\n}\nexport interface GeminiPartFunctionCall extends GeminiPartBase {\n functionCall: {\n name: string;\n args?: object;\n };\n}\nexport interface GeminiPartFunctionResponse extends GeminiPartBase {\n functionResponse: {\n name: string;\n response: object;\n };\n}\nexport type GeminiPart = GeminiPartText | GeminiPartInlineData | GeminiPartFileData | GeminiPartFunctionCall | GeminiPartFunctionResponse;\nexport interface GeminiSafetySetting {\n category: string;\n threshold: string;\n}\nexport type GeminiSafetyRating = {\n category: string;\n probability: string;\n} & Record<string, unknown>;\nexport interface GeminiCitationMetadata {\n citations: GeminiCitation[];\n}\nexport interface GeminiCitation {\n startIndex: number;\n endIndex: number;\n uri: string;\n title: string;\n license: string;\n publicationDate: GoogleTypeDate;\n}\nexport interface GoogleTypeDate {\n year: number;\n month: number;\n day: number;\n}\nexport interface GeminiGroundingMetadata {\n webSearchQueries?: string[];\n searchEntryPoint?: GeminiSearchEntryPoint;\n groundingChunks: GeminiGroundingChunk[];\n groundingSupports?: GeminiGroundingSupport[];\n retrievalMetadata?: GeminiRetrievalMetadata;\n}\nexport interface GeminiSearchEntryPoint {\n renderedContent?: string;\n sdkBlob?: string;\n}\nexport interface GeminiGroundingChunk {\n web: GeminiGroundingChunkWeb;\n retrievedContext: GeminiGroundingChunkRetrievedContext;\n}\nexport interface GeminiGroundingChunkWeb {\n uri: string;\n title: string;\n}\nexport interface GeminiGroundingChunkRetrievedContext {\n uri: string;\n title: string;\n text: string;\n}\nexport interface GeminiGroundingSupport {\n segment: GeminiSegment;\n groundingChunkIndices: number[];\n confidenceScores: number[];\n}\nexport interface GeminiSegment {\n partIndex: number;\n startIndex: number;\n endIndex: number;\n text: string;\n}\nexport interface GeminiRetrievalMetadata {\n googleSearchDynamicRetrievalScore: number;\n}\nexport type GeminiUrlRetrievalStatus = \"URL_RETRIEVAL_STATUS_SUCCESS\" | \"URL_RETRIEVAL_STATUS_ERROR\";\nexport interface GeminiUrlRetrievalContext {\n retrievedUrl: string;\n urlRetrievalStatus: GeminiUrlRetrievalStatus;\n}\nexport interface GeminiUrlRetrievalMetadata {\n urlRetrievalContexts: GeminiUrlRetrievalContext[];\n}\nexport type GeminiUrlMetadata = GeminiUrlRetrievalContext;\nexport interface GeminiUrlContextMetadata {\n urlMetadata: GeminiUrlMetadata[];\n}\nexport interface GeminiLogprobsResult {\n topCandidates: GeminiLogprobsTopCandidate[];\n chosenCandidates: GeminiLogprobsResultCandidate[];\n}\nexport interface GeminiLogprobsTopCandidate {\n candidates: GeminiLogprobsResultCandidate[];\n}\nexport interface GeminiLogprobsResultCandidate {\n token: string;\n tokenId: number;\n logProbability: number;\n}\nexport type GeminiRole = \"system\" | \"user\" | \"model\" | \"function\";\nexport interface GeminiContent {\n parts: GeminiPart[];\n role: GeminiRole;\n}\nexport interface GeminiTool {\n functionDeclarations?: GeminiFunctionDeclaration[];\n googleSearchRetrieval?: GoogleSearchRetrieval;\n googleSearch?: GoogleSearch;\n urlContext?: UrlContext;\n retrieval?: VertexAIRetrieval;\n}\nexport type GoogleSearchToolSetting = boolean | \"googleSearchRetrieval\" | \"googleSearch\" | string;\nexport declare const GeminiSearchToolAttributes: string[];\nexport declare const GeminiToolAttributes: string[];\nexport interface GoogleSearchRetrieval {\n dynamicRetrievalConfig?: {\n mode?: string;\n dynamicThreshold?: number;\n };\n}\nexport interface GoogleSearch {\n}\nexport interface UrlContext {\n}\nexport interface VertexAIRetrieval {\n vertexAiSearch: {\n datastore: string;\n };\n disableAttribution?: boolean;\n}\nexport interface GeminiFunctionDeclaration {\n name: string;\n description: string;\n parameters?: GeminiFunctionSchema;\n}\nexport interface GeminiFunctionSchema {\n type: GeminiFunctionSchemaType;\n format?: string;\n description?: string;\n nullable?: boolean;\n enum?: string[];\n properties?: Record<string, GeminiFunctionSchema>;\n required?: string[];\n items?: GeminiFunctionSchema;\n}\nexport type GeminiFunctionSchemaType = \"string\" | \"number\" | \"integer\" | \"boolean\" | \"array\" | \"object\";\nexport interface GeminiGenerationConfig {\n stopSequences?: string[];\n candidateCount?: number;\n maxOutputTokens?: number;\n temperature?: number;\n topP?: number;\n topK?: number;\n seed?: number;\n presencePenalty?: number;\n frequencyPenalty?: number;\n responseMimeType?: GoogleAIResponseMimeType;\n responseLogprobs?: boolean;\n logprobs?: number;\n responseModalities?: GoogleAIModelModality[];\n thinkingConfig?: GoogleThinkingConfig;\n speechConfig?: GoogleSpeechConfig;\n}\nexport interface GeminiRequest {\n contents?: GeminiContent[];\n systemInstruction?: GeminiContent;\n tools?: GeminiTool[];\n toolConfig?: {\n functionCallingConfig: {\n mode: \"auto\" | \"any\" | \"none\";\n allowedFunctionNames?: string[];\n };\n };\n safetySettings?: GeminiSafetySetting[];\n generationConfig?: GeminiGenerationConfig;\n cachedContent?: string;\n /**\n * Custom metadata labels to associate with the API call.\n */\n labels?: Record<string, string>;\n}\nexport interface GeminiResponseCandidate {\n content: {\n parts: GeminiPart[];\n role: string;\n };\n finishReason: string;\n index: number;\n tokenCount?: number;\n safetyRatings: GeminiSafetyRating[];\n citationMetadata?: GeminiCitationMetadata;\n groundingMetadata?: GeminiGroundingMetadata;\n urlRetrievalMetadata?: GeminiUrlRetrievalMetadata;\n urlContextMetadata?: GeminiUrlContextMetadata;\n avgLogprobs?: number;\n logprobsResult: GeminiLogprobsResult;\n finishMessage?: string;\n}\ninterface GeminiResponsePromptFeedback {\n blockReason?: string;\n safetyRatings: GeminiSafetyRating[];\n}\nexport type ModalityEnum = \"TEXT\" | \"IMAGE\" | \"VIDEO\" | \"AUDIO\" | \"DOCUMENT\" | string;\nexport interface ModalityTokenCount {\n modality: ModalityEnum;\n tokenCount: number;\n}\nexport interface GenerateContentResponseUsageMetadata {\n promptTokenCount: number;\n toolUsePromptTokenCount: number;\n cachedContentTokenCount: number;\n thoughtsTokenCount: number;\n candidatesTokenCount: number;\n totalTokenCount: number;\n promptTokensDetails: ModalityTokenCount[];\n toolUsePromptTokensDetails: ModalityTokenCount[];\n cacheTokensDetails: ModalityTokenCount[];\n candidatesTokensDetails: ModalityTokenCount[];\n [key: string]: unknown;\n}\nexport interface GenerateContentResponseData {\n candidates: GeminiResponseCandidate[];\n promptFeedback: GeminiResponsePromptFeedback;\n usageMetadata: GenerateContentResponseUsageMetadata;\n}\nexport type GoogleLLMModelFamily = null | \"palm\" | \"gemini\" | \"gemma\";\nexport type VertexModelFamily = GoogleLLMModelFamily | \"claude\";\nexport type GoogleLLMResponseData = JsonStream | GenerateContentResponseData | GenerateContentResponseData[];\nexport interface GoogleLLMResponse extends GoogleResponse {\n data: GoogleLLMResponseData | AnthropicResponseData;\n}\nexport interface GoogleAISafetyHandler {\n /**\n * A function that will take a response and return the, possibly modified,\n * response or throw an exception if there are safety issues.\n *\n * @throws GoogleAISafetyError\n */\n handle(response: GoogleLLMResponse): GoogleLLMResponse;\n}\nexport interface GoogleAISafetyParams {\n safetyHandler?: GoogleAISafetyHandler;\n}\nexport type GeminiJsonSchema = Record<string, unknown> & {\n properties?: Record<string, GeminiJsonSchema>;\n type: GeminiFunctionSchemaType;\n nullable?: boolean;\n};\nexport interface GeminiJsonSchemaDirty extends GeminiJsonSchema {\n items?: GeminiJsonSchemaDirty;\n properties?: Record<string, GeminiJsonSchemaDirty>;\n additionalProperties?: boolean;\n}\nexport type GoogleAIAPI = {\n messageContentToParts?: (content: MessageContent) => Promise<GeminiPart[]>;\n baseMessageToContent?: (message: BaseMessage, prevMessage: BaseMessage | undefined, useSystemInstruction: boolean) => Promise<GeminiContent[]>;\n responseToString: (response: GoogleLLMResponse) => string;\n responseToChatGeneration: (response: GoogleLLMResponse) => ChatGenerationChunk | null;\n chunkToString: (chunk: BaseMessageChunk) => string;\n responseToBaseMessage: (response: GoogleLLMResponse) => BaseMessage;\n responseToChatResult: (response: GoogleLLMResponse) => ChatResult;\n formatData: (input: unknown, parameters: GoogleAIModelRequestParams) => Promise<unknown>;\n};\nexport interface GeminiAPIConfig {\n safetyHandler?: GoogleAISafetyHandler;\n mediaManager?: MediaManager;\n useSystemInstruction?: boolean;\n /**\n * How to handle the Google Search tool, since the name (and format)\n * of the tool changes between Gemini 1.5 and Gemini 2.0.\n * true - Change based on the model version. (Default)\n * false - Do not change the tool name provided\n * string value - Use this as the attribute name for the search\n * tool, adapting any tool attributes if possible.\n * When the model is created, a \"true\" or default setting\n * will be changed to a string based on the model.\n */\n googleSearchToolAdjustment?: GoogleSearchToolSetting;\n}\nexport type GoogleAIAPIConfig = GeminiAPIConfig | AnthropicAPIConfig;\nexport interface GoogleAIAPIParams {\n apiName?: string;\n apiConfig?: GoogleAIAPIConfig;\n}\n/**\n * Defines the parameters required to initialize a\n * GoogleEmbeddings instance. It extends EmbeddingsParams and\n * GoogleConnectionParams.\n */\nexport interface BaseGoogleEmbeddingsParams<AuthOptions> extends EmbeddingsParams, GoogleConnectionParams<AuthOptions> {\n model: string;\n /**\n * Used to specify output embedding size.\n * If set, output embeddings will be truncated to the size specified.\n */\n dimensions?: number;\n /**\n * An alias for \"dimensions\"\n */\n outputDimensionality?: number;\n}\n/**\n * Defines additional options specific to the\n * GoogleEmbeddingsInstance. It extends AsyncCallerCallOptions.\n */\nexport interface BaseGoogleEmbeddingsOptions extends AsyncCallerCallOptions {\n}\nexport type GoogleEmbeddingsTaskType = \"RETRIEVAL_QUERY\" | \"RETRIEVAL_DOCUMENT\" | \"SEMANTIC_SIMILARITY\" | \"CLASSIFICATION\" | \"CLUSTERING\" | \"QUESTION_ANSWERING\" | \"FACT_VERIFICATION\" | \"CODE_RETRIEVAL_QUERY\" | string;\n/**\n * Represents an instance for generating embeddings using the Google\n * Vertex AI API. It contains the content to be embedded.\n */\nexport interface VertexEmbeddingsInstance {\n content: string;\n taskType?: GoogleEmbeddingsTaskType;\n title?: string;\n}\nexport interface VertexEmbeddingsParameters extends GoogleModelParams {\n autoTruncate?: boolean;\n outputDimensionality?: number;\n}\nexport interface VertexEmbeddingsRequest {\n instances: VertexEmbeddingsInstance[];\n parameters?: VertexEmbeddingsParameters;\n}\nexport interface AIStudioEmbeddingsRequest {\n content: {\n parts: GeminiPartText[];\n };\n model?: string;\n taskType?: GoogleEmbeddingsTaskType;\n title?: string;\n outputDimensionality?: number;\n}\nexport type GoogleEmbeddingsRequest = VertexEmbeddingsRequest | AIStudioEmbeddingsRequest;\nexport interface VertexEmbeddingsResponsePrediction {\n embeddings: {\n statistics: {\n token_count: number;\n truncated: boolean;\n };\n values: number[];\n };\n}\n/**\n * Defines the structure of the embeddings results returned by the Google\n * Vertex AI API. It extends GoogleBasePrediction and contains the\n * embeddings and their statistics.\n */\nexport interface VertexEmbeddingsResponse extends GoogleResponse {\n data: {\n predictions: VertexEmbeddingsResponsePrediction[];\n };\n}\nexport interface AIStudioEmbeddingsResponse extends GoogleResponse {\n data: {\n embedding: {\n values: number[];\n };\n };\n}\nexport type GoogleEmbeddingsResponse = VertexEmbeddingsResponse | AIStudioEmbeddingsResponse;\n//# sourceMappingURL=types.d.ts.map"],"mappings":";;;;;;;;;;;;;AAeA;AAUA;AACA;;AAamBgB,UAxBFF,kBAwBEE,CAAAA,WAAAA,CAAAA,CAAAA;EAb0CF,WAAAA,CAAAA,EAV3CC,WAU2CD;EAAkB;EAoB1DI,MAAAA,CAAAA,EAAAA,MAAAA;AAiBrB;AACA;AAiBA;AACA;AAIA;AACA;AACcA,KA/DFF,kBAAAA,GA+DEE,KAAAA,GAAAA,KAAAA;AACCC,UA/DEF,sBA+DFE,CAAAA,WAAAA,CAAAA,SA/D8CL,kBA+D9CK,CA/DiEJ,WA+DjEI,CAAAA,CAAAA;EACFC;EAAoB,QAAA,CAAA,EAAA,MAAA;EAErBE;EACAC,QAAAA,CAAAA,EAAAA,MAAAA;EACKC;EAILC,UAAAA,CAAAA,EAAAA,MAAAA;EACKC;AAGjB;AAGA;AAIA;AAGA;AAIA;EAIYM,YAAAA,CAAAA,EAjFOhB,kBAiFcc;EAIhBG;AAIjB;;;EAAoFA,QAAAA,CAAAA,EAAAA,OAAAA;AAAuB;AAC1FE,cAnFIjB,sBAmFqB,EAC/BgB;EAGME,SAAAA,UAAAA,EAAAA,0BACLF;EAQAG,SAAAA,UAAAA,EAAAA,0BAAiCF;EAKjCG,SAAAA,wBAA4B,EAAA,0BAAGJ;EAC1BK,SAAAA,UAAAA,EAAiB,2BAAA;EASjBC,SAAAA,WAAAA,EAAmB,2BAAA;EA0EfnB,S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;KACpBE,qBAAAA,GAAwB/F,aAAa4F,8BAA8BA;UAC9DI,iBAAAA,SAA0BxD;QACjCuD,wBAAwB7F;;UAEjB+F,qBAAAA;;;;;;;mBAOID,oBAAoBA;;UAExB5D,oBAAAA;kBACG6D;;KAERC,gBAAAA,GAAmBnE;eACdA,eAAemE;QACtBd;;;UAGOe,qBAAAA,SAA8BD;UACnCC;eACKpE,eAAeoE;;;KAGpBC,WAAAA;oCAC0BzG,mBAAmB0G,QAAQlD;mCAC5B1D,0BAA0BA,2DAA2D4G,QAAQ3B;+BACjGsB;uCACQA,sBAAsBpG;yBACpCF;oCACWsG,sBAAsBvG;mCACvBuG,sBAAsBnG;2CACdqC,+BAA+BmE;;UAE3DC,eAAAA;kBACGL;iBACDhG;;;;;;;;;;;;+BAYc+E;;KAErBuB,iBAAAA,GAAoBD,kBAAkBnG;UACjCkC,iBAAAA;;cAEDkE;;;;;;;UAOCC,gDAAgD1G,kBAAkBS,uBAAuBF;;;;;;;;;;;;;;;;UAgBzFoG,2BAAAA,SAAoC1G;KAEzC2G,wBAAAA;;;;;UAKKC,wBAAAA;;aAEFD;;;UAGEE,0BAAAA,SAAmC/E;;;;UAInCgF,uBAAAA;aACFF;eACEC;;UAEAE,yBAAAA;;WAEFhE;;;aAGA4D;;;;KAIHK,uBAAAA,GAA0BF,0BAA0BC;UAC/CE,kCAAAA;;;;;;;;;;;;;;UAcAC,wBAAAA,SAAiCzE;;iBAE7BwE;;;UAGJE,0BAAAA,SAAmC1E;;;;;;;KAOxC2E,wBAAAA,GAA2BF,2BAA2BC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.cts","names":["GeminiTool","GoogleAIBaseLanguageModelCallOptions","GoogleAIModelParams","GoogleAIModelRequestParams","GoogleAIToolType","VertexModelFamily","copyAIModelParams","convertToGeminiTools","copyAIModelParamsInto","modelToFamily","modelToPublisher","validateModelParams","copyAndValidateModelParamsInto"],"sources":["../../src/utils/common.d.ts"],"sourcesContent":["import { GeminiTool, GoogleAIBaseLanguageModelCallOptions, GoogleAIModelParams, GoogleAIModelRequestParams, GoogleAIToolType, VertexModelFamily } from \"../types.js\";\nexport declare function copyAIModelParams(params: GoogleAIModelParams | undefined, options: GoogleAIBaseLanguageModelCallOptions | undefined): GoogleAIModelRequestParams;\nexport declare function convertToGeminiTools(tools: GoogleAIToolType[]): GeminiTool[];\nexport declare function copyAIModelParamsInto(params: GoogleAIModelParams | undefined, options: GoogleAIBaseLanguageModelCallOptions | undefined, target: GoogleAIModelParams): GoogleAIModelRequestParams;\nexport declare function modelToFamily(modelName: string | undefined): VertexModelFamily;\nexport declare function modelToPublisher(modelName: string | undefined): string;\nexport declare function validateModelParams(params: GoogleAIModelParams | undefined): void;\nexport declare function copyAndValidateModelParamsInto(params: GoogleAIModelParams | undefined, target: GoogleAIModelParams): GoogleAIModelParams;\n//# sourceMappingURL=common.d.ts.map"],"mappings":";;;iBACwBM,iBAAAA,SAA0BJ,0CAA0CD,mDAAmDE;iBACvHI,oBAAAA,QAA4BH,qBAAqBJ;AADjDM,iBAEAE,qBAAAA,CAFiB,MAAA,EAEaN,mBAFb,GAAA,SAAA,EAAA,OAAA,EAEuDD,oCAFvD,GAAA,SAAA,EAAA,MAAA,EAEiHC,mBAFjH,CAAA,EAEuIC,0BAFvI;AAASD,iBAG1BO,aAAAA,CAH0BP,SAAAA,EAAAA,MAAAA,GAAAA,SAAAA,CAAAA,EAGoBG,iBAHpBH;AAA0CD,iBAIpES,gBAAAA,CAJoET,SAAAA,EAAAA,MAAAA,GAAAA,SAAAA,CAAAA,EAAAA,MAAAA;AAAmDE,iBAKvHQ,mBAAAA,CALuHR,MAAAA,EAK3FD,mBAL2FC,GAAAA,SAAAA,CAAAA,EAAAA,IAAAA;AAA0B,iBAMjJS,8BAAAA,CANiJ,MAAA,EAM1GV,mBAN0G,GAAA,SAAA,EAAA,MAAA,EAMjEA,mBANiE,CAAA,EAM3CA,mBAN2C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","names":["GeminiTool","GoogleAIBaseLanguageModelCallOptions","GoogleAIModelParams","GoogleAIModelRequestParams","GoogleAIToolType","VertexModelFamily","copyAIModelParams","convertToGeminiTools","copyAIModelParamsInto","modelToFamily","modelToPublisher","validateModelParams","copyAndValidateModelParamsInto"],"sources":["../../src/utils/common.d.ts"],"sourcesContent":["import { GeminiTool, GoogleAIBaseLanguageModelCallOptions, GoogleAIModelParams, GoogleAIModelRequestParams, GoogleAIToolType, VertexModelFamily } from \"../types.js\";\nexport declare function copyAIModelParams(params: GoogleAIModelParams | undefined, options: GoogleAIBaseLanguageModelCallOptions | undefined): GoogleAIModelRequestParams;\nexport declare function convertToGeminiTools(tools: GoogleAIToolType[]): GeminiTool[];\nexport declare function copyAIModelParamsInto(params: GoogleAIModelParams | undefined, options: GoogleAIBaseLanguageModelCallOptions | undefined, target: GoogleAIModelParams): GoogleAIModelRequestParams;\nexport declare function modelToFamily(modelName: string | undefined): VertexModelFamily;\nexport declare function modelToPublisher(modelName: string | undefined): string;\nexport declare function validateModelParams(params: GoogleAIModelParams | undefined): void;\nexport declare function copyAndValidateModelParamsInto(params: GoogleAIModelParams | undefined, target: GoogleAIModelParams): GoogleAIModelParams;\n//# sourceMappingURL=common.d.ts.map"],"mappings":";;;iBACwBM,iBAAAA,SAA0BJ,0CAA0CD,mDAAmDE;iBACvHI,oBAAAA,QAA4BH,qBAAqBJ;AADjDM,iBAEAE,qBAAAA,CAFiB,MAAA,EAEaN,mBAFb,GAAA,SAAA,EAAA,OAAA,EAEuDD,oCAFvD,GAAA,SAAA,EAAA,MAAA,EAEiHC,mBAFjH,CAAA,EAEuIC,0BAFvI;AAASD,iBAG1BO,aAAAA,CAH0BP,SAAAA,EAAAA,MAAAA,GAAAA,SAAAA,CAAAA,EAGoBG,iBAHpBH;AAA0CD,iBAIpES,gBAAAA,CAJoET,SAAAA,EAAAA,MAAAA,GAAAA,SAAAA,CAAAA,EAAAA,MAAAA;AAAmDE,iBAKvHQ,mBAAAA,CALuHR,MAAAA,EAK3FD,mBAL2FC,GAAAA,SAAAA,CAAAA,EAAAA,IAAAA;AAA0B,iBAMjJS,8BAAAA,CANiJ,MAAA,EAM1GV,mBAN0G,GAAA,SAAA,EAAA,MAAA,EAMjEA,mBANiE,CAAA,EAM3CA,mBAN2C"}
@@ -1,7 +1,6 @@
1
1
  import { AsyncCallerParams } from "@langchain/core/utils/async_caller";
2
2
 
3
3
  //#region src/utils/failed_handler.d.ts
4
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
4
  declare function failedAttemptHandler(error: any): void;
6
5
  declare function ensureParams(params?: AsyncCallerParams): AsyncCallerParams;
7
6
  //#endregion
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failed_handler.d.cts","names":["AsyncCallerParams","failedAttemptHandler","ensureParams"],"sources":["../../src/utils/failed_handler.d.ts"],"sourcesContent":["import { AsyncCallerParams } from \"@langchain/core/utils/async_caller\";\nexport declare function failedAttemptHandler(error: any): void;\nexport declare function ensureParams(params?: AsyncCallerParams): AsyncCallerParams;\n//# sourceMappingURL=failed_handler.d.ts.map"],"mappings":";;;iBACwBC,oBAAAA;iBACAC,YAAAA,UAAsBF,oBAAoBA"}
@@ -1,7 +1,6 @@
1
1
  import { AsyncCallerParams } from "@langchain/core/utils/async_caller";
2
2
 
3
3
  //#region src/utils/failed_handler.d.ts
4
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
4
  declare function failedAttemptHandler(error: any): void;
6
5
  declare function ensureParams(params?: AsyncCallerParams): AsyncCallerParams;
7
6
  //#endregion
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failed_handler.d.ts","names":["AsyncCallerParams","failedAttemptHandler","ensureParams"],"sources":["../../src/utils/failed_handler.d.ts"],"sourcesContent":["import { AsyncCallerParams } from \"@langchain/core/utils/async_caller\";\nexport declare function failedAttemptHandler(error: any): void;\nexport declare function ensureParams(params?: AsyncCallerParams): AsyncCallerParams;\n//# sourceMappingURL=failed_handler.d.ts.map"],"mappings":";;;iBACwBC,oBAAAA;iBACAC,YAAAA,UAAsBF,oBAAoBA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini.d.cts","names":["GoogleLLMResponse","GoogleAIModelParams","GenerateContentResponseData","GoogleAISafetyHandler","GoogleAIAPI","GeminiAPIConfig","GoogleSpeechConfig","GoogleSpeechConfigSimplified","FunctionCall","ToolCall","FunctionCallRaw","ToolCallRaw","DefaultGeminiSafetySettings","DefaultGeminiSafetyHandler","MessageGeminiSafetySettings","MessageGeminiSafetyHandler","normalizeSpeechConfig","getGeminiAPI","validateGeminiParams","isModelGemini","isModelGemma"],"sources":["../../src/utils/gemini.d.ts"],"sourcesContent":["import { GoogleLLMResponse, GoogleAIModelParams, GenerateContentResponseData, GoogleAISafetyHandler, GoogleAIAPI, GeminiAPIConfig, GoogleSpeechConfig, GoogleSpeechConfigSimplified } from \"../types.js\";\nexport interface FunctionCall {\n name: string;\n arguments: string;\n}\nexport interface ToolCall {\n id: string;\n type: \"function\";\n function: FunctionCall;\n}\nexport interface FunctionCallRaw {\n name: string;\n arguments: object;\n}\nexport interface ToolCallRaw {\n id: string;\n type: \"function\";\n function: FunctionCallRaw;\n}\nexport interface DefaultGeminiSafetySettings {\n errorFinish?: string[];\n}\nexport declare class DefaultGeminiSafetyHandler implements GoogleAISafetyHandler {\n errorFinish: string[];\n constructor(settings?: DefaultGeminiSafetySettings);\n handleDataPromptFeedback(response: GoogleLLMResponse, data: GenerateContentResponseData): GenerateContentResponseData;\n handleDataFinishReason(response: GoogleLLMResponse, data: GenerateContentResponseData): GenerateContentResponseData;\n handleData(response: GoogleLLMResponse, data: GenerateContentResponseData): GenerateContentResponseData;\n handle(response: GoogleLLMResponse): GoogleLLMResponse;\n}\nexport interface MessageGeminiSafetySettings extends DefaultGeminiSafetySettings {\n msg?: string;\n forceNewMessage?: boolean;\n}\nexport declare class MessageGeminiSafetyHandler extends DefaultGeminiSafetyHandler {\n msg: string;\n forceNewMessage: boolean;\n constructor(settings?: MessageGeminiSafetySettings);\n setMessage(data: GenerateContentResponseData): GenerateContentResponseData;\n handleData(response: GoogleLLMResponse, data: GenerateContentResponseData): GenerateContentResponseData;\n}\nexport declare function normalizeSpeechConfig(config: GoogleSpeechConfig | GoogleSpeechConfigSimplified | undefined): GoogleSpeechConfig | undefined;\nexport declare function getGeminiAPI(config?: GeminiAPIConfig): GoogleAIAPI;\nexport declare function validateGeminiParams(params: GoogleAIModelParams): void;\nexport declare function isModelGemini(modelName: string): boolean;\nexport declare function isModelGemma(modelName: string): boolean;\n//# sourceMappingURL=gemini.d.ts.map"],"mappings":";;;UACiBQ,YAAAA;;EAAAA,SAAAA,EAAAA,MAAY;AAI7B;AAKiBE,UALAD,QAAAA,CAKe;EAIfE,EAAAA,EAAAA,MAAAA;EAKAC,IAAAA,EAAAA,UAAAA;EAGIC,QAAAA,EAdPL,YAcOK;;AAGkBb,UAftBU,eAAAA,CAesBV;EAAyBE,IAAAA,EAAAA,MAAAA;EAA8BA,SAAAA,EAAAA,MAAAA;;AAChCA,UAZ7CS,WAAAA,CAY6CT;EAA8BA,EAAAA,EAAAA,MAAAA;EACnEF,IAAAA,EAAAA,UAAAA;EAAyBE,QAAAA,EAVpCQ,eAUoCR;;AAC7BF,UATJY,2BAAAA,CASIZ;EAAoBA,WAAAA,CAAAA,EAAAA,MAAAA,EAAAA;;AANuC,cAA3Da,0BAAAA,YAAsCV,qBAAqB,CAAA;EAQ/DW,WAAAA,EAAAA,MAAAA,EAAAA;EAIIC,WAAAA,CAAAA,QAA0B,CAA1BA,EAVMH,2BAUoB;EAGpBE,wBAAAA,CAAAA,QAAAA,EAZYd,iBAYZc,EAAAA,IAAAA,EAZqCZ,2BAYrCY,CAAAA,EAZmEZ,2BAYnEY;EACNZ,sBAAAA,CAAAA,QAAAA,EAZgBF,iBAYhBE,EAAAA,IAAAA,EAZyCA,2BAYzCA,CAAAA,EAZuEA,2BAYvEA;EAA8BA,UAAAA,CAAAA,QAAAA,EAX1BF,iBAW0BE,EAAAA,IAAAA,EAXDA,2BAWCA,CAAAA,EAX6BA,2BAW7BA;EAC1BF,MAAAA,CAAAA,QAAAA,EAXJA,iBAWIA,CAAAA,EAXgBA,iBAWhBA;;AAAuDE,UAT/DY,2BAAAA,SAAoCF,2BAS2BV,CAAAA;EALxBW,GAAAA,CAAAA,EAAAA,MAAAA;EAA0B,eAAA,CAAA,EAAA,OAAA;AAOlF;AAAsDP,cAPjCS,0BAAAA,SAAmCF,0BAAAA,CAOFP;EAAqBC,GAAAA,EAAAA,MAAAA;EAA2CD,eAAAA,EAAAA,OAAAA;EAAkB,WAAA,CAAA,QAAA,CAAA,EAJ7GQ,2BAI6G;EAChHG,UAAAA,CAAAA,IAAY,EAJff,2BAIyBG,CAAkBD,EAJbF,2BAIwB;EACnDgB,UAAAA,CAAAA,QAAAA,EAJClB,iBAI4BC,EAAAA,IAAAA,EAJHC,2BAIsB,CAAA,EAJQA,2BAIR;AACxE;AACwBkB,iBAJAJ,qBAAAA,CAIY,MAAA,EAJkBV,kBAIlB,GAJuCC,4BAIvC,GAAA,SAAA,CAAA,EAJkFD,kBAIlF,GAAA,SAAA;iBAHZW,YAAAA,UAAsBZ,kBAAkBD;iBACxCc,oBAAAA,SAA6BjB;iBAC7BkB,aAAAA;iBACAC,YAAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini.d.ts","names":["GoogleLLMResponse","GoogleAIModelParams","GenerateContentResponseData","GoogleAISafetyHandler","GoogleAIAPI","GeminiAPIConfig","GoogleSpeechConfig","GoogleSpeechConfigSimplified","FunctionCall","ToolCall","FunctionCallRaw","ToolCallRaw","DefaultGeminiSafetySettings","DefaultGeminiSafetyHandler","MessageGeminiSafetySettings","MessageGeminiSafetyHandler","normalizeSpeechConfig","getGeminiAPI","validateGeminiParams","isModelGemini","isModelGemma"],"sources":["../../src/utils/gemini.d.ts"],"sourcesContent":["import { GoogleLLMResponse, GoogleAIModelParams, GenerateContentResponseData, GoogleAISafetyHandler, GoogleAIAPI, GeminiAPIConfig, GoogleSpeechConfig, GoogleSpeechConfigSimplified } from \"../types.js\";\nexport interface FunctionCall {\n name: string;\n arguments: string;\n}\nexport interface ToolCall {\n id: string;\n type: \"function\";\n function: FunctionCall;\n}\nexport interface FunctionCallRaw {\n name: string;\n arguments: object;\n}\nexport interface ToolCallRaw {\n id: string;\n type: \"function\";\n function: FunctionCallRaw;\n}\nexport interface DefaultGeminiSafetySettings {\n errorFinish?: string[];\n}\nexport declare class DefaultGeminiSafetyHandler implements GoogleAISafetyHandler {\n errorFinish: string[];\n constructor(settings?: DefaultGeminiSafetySettings);\n handleDataPromptFeedback(response: GoogleLLMResponse, data: GenerateContentResponseData): GenerateContentResponseData;\n handleDataFinishReason(response: GoogleLLMResponse, data: GenerateContentResponseData): GenerateContentResponseData;\n handleData(response: GoogleLLMResponse, data: GenerateContentResponseData): GenerateContentResponseData;\n handle(response: GoogleLLMResponse): GoogleLLMResponse;\n}\nexport interface MessageGeminiSafetySettings extends DefaultGeminiSafetySettings {\n msg?: string;\n forceNewMessage?: boolean;\n}\nexport declare class MessageGeminiSafetyHandler extends DefaultGeminiSafetyHandler {\n msg: string;\n forceNewMessage: boolean;\n constructor(settings?: MessageGeminiSafetySettings);\n setMessage(data: GenerateContentResponseData): GenerateContentResponseData;\n handleData(response: GoogleLLMResponse, data: GenerateContentResponseData): GenerateContentResponseData;\n}\nexport declare function normalizeSpeechConfig(config: GoogleSpeechConfig | GoogleSpeechConfigSimplified | undefined): GoogleSpeechConfig | undefined;\nexport declare function getGeminiAPI(config?: GeminiAPIConfig): GoogleAIAPI;\nexport declare function validateGeminiParams(params: GoogleAIModelParams): void;\nexport declare function isModelGemini(modelName: string): boolean;\nexport declare function isModelGemma(modelName: string): boolean;\n//# sourceMappingURL=gemini.d.ts.map"],"mappings":";;;UACiBQ,YAAAA;;EAAAA,SAAAA,EAAAA,MAAY;AAI7B;AAKiBE,UALAD,QAAAA,CAKe;EAIfE,EAAAA,EAAAA,MAAAA;EA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DgB,UAAAA,CAAAA,QAAAA,EAJClB,iBAI4BC,EAAAA,IAAAA,EAJHC,2BAIsB,CAAA,EAJQA,2BAIR;AACxE;AACwBkB,iBAJAJ,qBAAAA,CAIY,MAAA,EAJkBV,kBAIlB,GAJuCC,4BAIvC,GAAA,SAAA,CAAA,EAJkFD,kBAIlF,GAAA,SAAA;iBAHZW,YAAAA,UAAsBZ,kBAAkBD;iBACxCc,oBAAAA,SAA6BjB;iBAC7BkB,aAAAA;iBACAC,YAAAA"}
@@ -1,6 +1,5 @@
1
1
  //#region src/utils/palm.d.ts
2
2
  interface GoogleVertexAIBasePrediction {
3
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4
3
  safetyAttributes?: any;
5
4
  }
6
5
  interface GoogleVertexAILLMPredictions<PredictionType extends GoogleVertexAIBasePrediction> {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palm.d.cts","names":["GoogleVertexAIBasePrediction","GoogleVertexAILLMPredictions","PredictionType"],"sources":["../../src/utils/palm.d.ts"],"sourcesContent":["export interface GoogleVertexAIBasePrediction {\n safetyAttributes?: any;\n}\nexport interface GoogleVertexAILLMPredictions<PredictionType extends GoogleVertexAIBasePrediction> {\n predictions: PredictionType[];\n}\n//# sourceMappingURL=palm.d.ts.map"],"mappings":";UAAiBA,4BAAAA;EAAAA,gBAAAA,CAAAA,EAAAA,GAAAA;AAGjB;UAAiBC,oDAAoDD;eACpDE"}
@@ -1,6 +1,5 @@
1
1
  //#region src/utils/palm.d.ts
2
2
  interface GoogleVertexAIBasePrediction {
3
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4
3
  safetyAttributes?: any;
5
4
  }
6
5
  interface GoogleVertexAILLMPredictions<PredictionType extends GoogleVertexAIBasePrediction> {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palm.d.ts","names":["GoogleVertexAIBasePrediction","GoogleVertexAILLMPredictions","PredictionType"],"sources":["../../src/utils/palm.d.ts"],"sourcesContent":["export interface GoogleVertexAIBasePrediction {\n safetyAttributes?: any;\n}\nexport interface GoogleVertexAILLMPredictions<PredictionType extends GoogleVertexAIBasePrediction> {\n predictions: PredictionType[];\n}\n//# sourceMappingURL=palm.d.ts.map"],"mappings":";UAAiBA,4BAAAA;EAAAA,gBAAAA,CAAAA,EAAAA,GAAAA;AAGjB;UAAiBC,oDAAoDD;eACpDE"}
@@ -3,7 +3,6 @@ import { GoogleLLMResponse } from "../types.cjs";
3
3
  //#region src/utils/safety.d.ts
4
4
  declare class GoogleAISafetyError extends Error {
5
5
  response: GoogleLLMResponse;
6
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
6
  reply: any;
8
7
  constructor(response: GoogleLLMResponse, message?: string);
9
8
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safety.d.cts","names":["GoogleLLMResponse","GoogleAISafetyError","Error"],"sources":["../../src/utils/safety.d.ts"],"sourcesContent":["import { GoogleLLMResponse } from \"../types.js\";\nexport declare class GoogleAISafetyError extends Error {\n response: GoogleLLMResponse;\n reply: any;\n constructor(response: GoogleLLMResponse, message?: string);\n}\n//# sourceMappingURL=safety.d.ts.map"],"mappings":";;;cACqBC,mBAAAA,SAA4BC,KAAAA;YACnCF;EADOC,KAAAA,EAAAA,GAAAA;EACPD,WAAAA,CAAAA,QAAAA,EAEYA,iBAFZA,EAAAA,OAAAA,CAAAA,EAAAA,MAAAA"}
@@ -3,7 +3,6 @@ import { GoogleLLMResponse } from "../types.js";
3
3
  //#region src/utils/safety.d.ts
4
4
  declare class GoogleAISafetyError extends Error {
5
5
  response: GoogleLLMResponse;
6
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
6
  reply: any;
8
7
  constructor(response: GoogleLLMResponse, message?: string);
9
8
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safety.d.ts","names":["GoogleLLMResponse","GoogleAISafetyError","Error"],"sources":["../../src/utils/safety.d.ts"],"sourcesContent":["import { GoogleLLMResponse } from \"../types.js\";\nexport declare class GoogleAISafetyError extends Error {\n response: GoogleLLMResponse;\n reply: any;\n constructor(response: GoogleLLMResponse, message?: string);\n}\n//# sourceMappingURL=safety.d.ts.map"],"mappings":";;;cACqBC,mBAAAA,SAA4BC,KAAAA;YACnCF;EADOC,KAAAA,EAAAA,GAAAA;EACPD,WAAAA,CAAAA,QAAAA,EAEYA,iBAFZA,EAAAA,OAAAA,CAAAA,EAAAA,MAAAA"}
@@ -14,7 +14,6 @@ interface AbstractStream {
14
14
  * Get the next chunk that is coming from the stream.
15
15
  * This chunk may be null, usually indicating the last chunk in the stream.
16
16
  */
17
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
17
  nextChunk(): Promise<any>;
19
18
  /**
20
19
  * Is the stream done?
@@ -63,14 +62,8 @@ declare class JsonStream implements AbstractStream {
63
62
  */
64
63
  _getFullObject(): object | null;
65
64
  _simplifyObject(obj: unknown): object;
66
- // Set up a potential Promise that the handler can resolve.
67
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
68
65
  _chunkResolution: (chunk: any) => void;
69
- // If there is no Promise (it is null), the handler must add it to the queue
70
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
71
66
  _chunkPending: Promise<any> | null;
72
- // A queue that will collect chunks while there is no Promise
73
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
74
67
  _chunkQueue: any[];
75
68
  /**
76
69
  * Register that we have another chunk available for consumption.
@@ -78,13 +71,11 @@ declare class JsonStream implements AbstractStream {
78
71
  * If not, then add it to the queue.
79
72
  * @param chunk
80
73
  */
81
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
82
74
  _handleChunk(chunk: any): void;
83
75
  /**
84
76
  * Get the next chunk that is coming from the stream.
85
77
  * This chunk may be null, usually indicating the last chunk in the stream.
86
78
  */
87
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
88
79
  nextChunk(): Promise<any>;
89
80
  /**
90
81
  * Is the stream done?
@@ -104,12 +95,8 @@ declare class ReadableAbstractStream implements AbstractStream {
104
95
  constructor(baseStream: AbstractStream, body: ReadableStream | null);
105
96
  appendBuffer(data: string): void;
106
97
  closeBuffer(): void;
107
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
108
98
  nextChunk(): Promise<any>;
109
99
  get streamDone(): boolean;
110
- // Should be a ReadableStream, but the Gaxios Readable stream isn't.
111
- // But both should support async iterators, so make sure of that.
112
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
113
100
  run(body: any): Promise<void>;
114
101
  }
115
102
  declare class ReadableJsonStream extends ReadableAbstractStream {
@@ -134,17 +121,10 @@ declare class SseStream implements AbstractStream {
134
121
  * @param event
135
122
  */
136
123
  _parseEvent(event: string | null): Record<string, string> | null;
137
- // Set up a potential Promise that the handler can resolve.
138
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
139
124
  _chunkResolution: (chunk: any) => void;
140
- // If there is no Promise (it is null), the handler must add it to the queue
141
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
142
125
  _chunkPending: Promise<any> | null;
143
- // A queue that will collect chunks while there is no Promise
144
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
145
126
  _chunkQueue: any[];
146
127
  _handleEvent(event: string | null): void;
147
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
148
128
  nextChunk(): Promise<any>;
149
129
  get streamDone(): boolean;
150
130
  }
@@ -154,7 +134,6 @@ declare class ReadableSseStream extends ReadableAbstractStream {
154
134
  declare class SseJsonStream extends SseStream {
155
135
  _jsonAttribute: string;
156
136
  constructor(jsonAttribute?: string);
157
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
158
137
  nextChunk(): Promise<any>;
159
138
  }
160
139
  declare class ReadableSseJsonStream extends ReadableAbstractStream {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream.d.cts","names":["AbstractStream","Promise","complexValue","simpleValue","JsonStream","ComplexJsonStream","ReadableAbstractStream","TextDecoder","ReadableStream","ReadableJsonStream","SseStream","Record","ReadableSseStream","SseJsonStream","ReadableSseJsonStream"],"sources":["../../src/utils/stream.d.ts"],"sourcesContent":["export interface AbstractStream {\n /**\n * Add more text to the buffer\n * @param data\n */\n appendBuffer(data: string): void;\n /**\n * Indicate that there is no more text to be added to the buffer\n * (ie - our source material is done)\n */\n closeBuffer(): void;\n /**\n * Get the next chunk that is coming from the stream.\n * This chunk may be null, usually indicating the last chunk in the stream.\n */\n nextChunk(): Promise<any>;\n /**\n * Is the stream done?\n * A stream is only done if all of the following are true:\n * - There is no more data to be added to the text buffer\n * - There is no more data in the text buffer\n * - There are no chunks that are waiting to be consumed\n */\n get streamDone(): boolean;\n}\nexport declare function complexValue(value: unknown): unknown;\nexport declare function simpleValue(val: unknown): unknown;\nexport declare class JsonStream implements AbstractStream {\n _buffer: string;\n _bufferOpen: boolean;\n _firstRun: boolean;\n /**\n * Add data to the buffer. This may cause chunks to be generated, if available.\n * @param data\n */\n appendBuffer(data: string): void;\n /**\n * Indicate there is no more data that will be added to the text buffer.\n * This should be called when all the data has been read and added to indicate\n * that we should process everything remaining in the buffer.\n */\n closeBuffer(): void;\n /**\n * Skip characters in the buffer till we get to the start of an object.\n * Then attempt to read a full object.\n * If we do read a full object, turn it into a chunk and send it to the chunk handler.\n * Repeat this for as much as we can.\n */\n _parseBuffer(): void;\n /**\n * If the string is present, move the start of the buffer to the first occurrence\n * of that string. This is useful for skipping over elements or parts that we're not\n * really interested in parsing. (ie - the opening characters, comma separators, etc.)\n * @param start The string to start the buffer with\n */\n _skipTo(start: string): void;\n /**\n * Given what is in the buffer, parse a single object out of it.\n * If a complete object isn't available, return null.\n * Assumes that we are at the start of an object to parse.\n */\n _getFullObject(): object | null;\n _simplifyObject(obj: unknown): object;\n _chunkResolution: (chunk: any) => void;\n _chunkPending: Promise<any> | null;\n _chunkQueue: any[];\n /**\n * Register that we have another chunk available for consumption.\n * If we are waiting for a chunk, resolve the promise waiting for it immediately.\n * If not, then add it to the queue.\n * @param chunk\n */\n _handleChunk(chunk: any): void;\n /**\n * Get the next chunk that is coming from the stream.\n * This chunk may be null, usually indicating the last chunk in the stream.\n */\n nextChunk(): Promise<any>;\n /**\n * Is the stream done?\n * A stream is only done if all of the following are true:\n * - There is no more data to be added to the text buffer\n * - There is no more data in the text buffer\n * - There are no chunks that are waiting to be consumed\n */\n get streamDone(): boolean;\n}\nexport declare class ComplexJsonStream extends JsonStream {\n _simplifyObject(obj: unknown): object;\n}\nexport declare class ReadableAbstractStream implements AbstractStream {\n private baseStream;\n decoder: TextDecoder;\n constructor(baseStream: AbstractStream, body: ReadableStream | null);\n appendBuffer(data: string): void;\n closeBuffer(): void;\n nextChunk(): Promise<any>;\n get streamDone(): boolean;\n run(body: any): Promise<void>;\n}\nexport declare class ReadableJsonStream extends ReadableAbstractStream {\n constructor(body: ReadableStream | null);\n}\nexport declare class SseStream implements AbstractStream {\n _buffer: string;\n _bufferOpen: boolean;\n appendBuffer(data: string): void;\n closeBuffer(): void;\n /**\n * Attempt to load an entire event.\n * For each entire event we load,\n * send them to be handled.\n */\n _parseBuffer(): void;\n /**\n * Given an event string, get all the fields\n * in the event. It is assumed there is one field\n * per line, but that field names can be duplicated,\n * indicating to append the new value to the previous value\n * @param event\n */\n _parseEvent(event: string | null): Record<string, string> | null;\n _chunkResolution: (chunk: any) => void;\n _chunkPending: Promise<any> | null;\n _chunkQueue: any[];\n _handleEvent(event: string | null): void;\n nextChunk(): Promise<any>;\n get streamDone(): boolean;\n}\nexport declare class ReadableSseStream extends ReadableAbstractStream {\n constructor(body: ReadableStream | null);\n}\nexport declare class SseJsonStream extends SseStream {\n _jsonAttribute: string;\n constructor(jsonAttribute?: string);\n nextChunk(): Promise<any>;\n}\nexport declare class ReadableSseJsonStream extends ReadableAbstractStream {\n constructor(body: ReadableStream | null);\n}\n//# sourceMappingURL=stream.d.ts.map"],"mappings":";UAAiBA,cAAAA;EAAAA;AAyBjB;AACA;AACA;EAqCmBC,YAAAA,CAAAA,IAAAA,EAAAA,MAAAA,CAAAA,EAAAA,IAAAA;EAaFA;;AAlDwC;AA4DzD;EAGqBK,WAAAA,EAAAA,EAAAA,IAAAA;EAERC;;;;EAMON,SAAAA,EAAAA,EAnFHA,OAmFGA,CAAAA,GAAAA,CAAAA;EARmCD;AAAc;AAUrE;AAGA;;;;EAA0CA,IAAAA,UAAAA,EAAAA,EAAAA,OAAAA;AAAc;AA0BnCY,iBAxGGV,YAAAA,CAyGFM,KAAAA,EAAAA,OAAAA,CAAAA,EADyBF,OAAAA;AAG1BO,iBA1GGV,WAAAA,CA6GPF,GAAAA,EAAAA,OAH0BS,CAAAA,EAAS,OAAA;AAK/BI,cA9GAV,UAAAA,YAAsBJ,cA8GQM,CAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAzEhCL;;;;;;;;;;;;;eAaFA;;;;;;;;;;cAUII,iBAAAA,SAA0BD,UAAU;;;cAGpCE,sBAAAA,YAAkCN;;WAE1CO;0BACeP,sBAAsBQ;;;eAGjCP;;kBAEGA;;cAECQ,kBAAAA,SAA2BH,sBAAsB;oBAChDE;;cAEDE,SAAAA,YAAqBV;;;;;;;;;;;;;;;;;;qCAkBHW;;iBAEpBV;;;eAGFA;;;cAGIW,iBAAAA,SAA0BN,sBAAsB;oBAC/CE;;cAEDK,aAAAA,SAAsBH,SAAS;;;eAGnCT;;cAEIa,qBAAAA,SAA8BR,sBAAsB;oBACnDE"}
@@ -14,7 +14,6 @@ interface AbstractStream {
14
14
  * Get the next chunk that is coming from the stream.
15
15
  * This chunk may be null, usually indicating the last chunk in the stream.
16
16
  */
17
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
17
  nextChunk(): Promise<any>;
19
18
  /**
20
19
  * Is the stream done?
@@ -63,14 +62,8 @@ declare class JsonStream implements AbstractStream {
63
62
  */
64
63
  _getFullObject(): object | null;
65
64
  _simplifyObject(obj: unknown): object;
66
- // Set up a potential Promise that the handler can resolve.
67
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
68
65
  _chunkResolution: (chunk: any) => void;
69
- // If there is no Promise (it is null), the handler must add it to the queue
70
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
71
66
  _chunkPending: Promise<any> | null;
72
- // A queue that will collect chunks while there is no Promise
73
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
74
67
  _chunkQueue: any[];
75
68
  /**
76
69
  * Register that we have another chunk available for consumption.
@@ -78,13 +71,11 @@ declare class JsonStream implements AbstractStream {
78
71
  * If not, then add it to the queue.
79
72
  * @param chunk
80
73
  */
81
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
82
74
  _handleChunk(chunk: any): void;
83
75
  /**
84
76
  * Get the next chunk that is coming from the stream.
85
77
  * This chunk may be null, usually indicating the last chunk in the stream.
86
78
  */
87
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
88
79
  nextChunk(): Promise<any>;
89
80
  /**
90
81
  * Is the stream done?
@@ -104,12 +95,8 @@ declare class ReadableAbstractStream implements AbstractStream {
104
95
  constructor(baseStream: AbstractStream, body: ReadableStream | null);
105
96
  appendBuffer(data: string): void;
106
97
  closeBuffer(): void;
107
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
108
98
  nextChunk(): Promise<any>;
109
99
  get streamDone(): boolean;
110
- // Should be a ReadableStream, but the Gaxios Readable stream isn't.
111
- // But both should support async iterators, so make sure of that.
112
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
113
100
  run(body: any): Promise<void>;
114
101
  }
115
102
  declare class ReadableJsonStream extends ReadableAbstractStream {
@@ -134,17 +121,10 @@ declare class SseStream implements AbstractStream {
134
121
  * @param event
135
122
  */
136
123
  _parseEvent(event: string | null): Record<string, string> | null;
137
- // Set up a potential Promise that the handler can resolve.
138
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
139
124
  _chunkResolution: (chunk: any) => void;
140
- // If there is no Promise (it is null), the handler must add it to the queue
141
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
142
125
  _chunkPending: Promise<any> | null;
143
- // A queue that will collect chunks while there is no Promise
144
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
145
126
  _chunkQueue: any[];
146
127
  _handleEvent(event: string | null): void;
147
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
148
128
  nextChunk(): Promise<any>;
149
129
  get streamDone(): boolean;
150
130
  }
@@ -154,7 +134,6 @@ declare class ReadableSseStream extends ReadableAbstractStream {
154
134
  declare class SseJsonStream extends SseStream {
155
135
  _jsonAttribute: string;
156
136
  constructor(jsonAttribute?: string);
157
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
158
137
  nextChunk(): Promise<any>;
159
138
  }
160
139
  declare class ReadableSseJsonStream extends ReadableAbstractStream {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream.d.ts","names":["AbstractStream","Promise","complexValue","simpleValue","JsonStream","ComplexJsonStream","ReadableAbstractStream","TextDecoder","ReadableStream","ReadableJsonStream","SseStream","Record","ReadableSseStream","SseJsonStream","ReadableSseJsonStream"],"sources":["../../src/utils/stream.d.ts"],"sourcesContent":["export interface AbstractStream {\n /**\n * Add more text to the buffer\n * @param data\n */\n appendBuffer(data: string): void;\n /**\n * Indicate that there is no more text to be added to the buffer\n * (ie - our source material is done)\n */\n closeBuffer(): void;\n /**\n * Get the next chunk that is coming from the stream.\n * This chunk may be null, usually indicating the last chunk in the stream.\n */\n nextChunk(): Promise<any>;\n /**\n * Is the stream done?\n * A stream is only done if all of the following are true:\n * - There is no more data to be added to the text buffer\n * - There is no more data in the text buffer\n * - There are no chunks that are waiting to be consumed\n */\n get streamDone(): boolean;\n}\nexport declare function complexValue(value: unknown): unknown;\nexport declare function simpleValue(val: unknown): unknown;\nexport declare class JsonStream implements AbstractStream {\n _buffer: string;\n _bufferOpen: boolean;\n _firstRun: boolean;\n /**\n * Add data to the buffer. This may cause chunks to be generated, if available.\n * @param data\n */\n appendBuffer(data: string): void;\n /**\n * Indicate there is no more data that will be added to the text buffer.\n * This should be called when all the data has been read and added to indicate\n * that we should process everything remaining in the buffer.\n */\n closeBuffer(): void;\n /**\n * Skip characters in the buffer till we get to the start of an object.\n * Then attempt to read a full object.\n * If we do read a full object, turn it into a chunk and send it to the chunk handler.\n * Repeat this for as much as we can.\n */\n _parseBuffer(): void;\n /**\n * If the string is present, move the start of the buffer to the first occurrence\n * of that string. This is useful for skipping over elements or parts that we're not\n * really interested in parsing. (ie - the opening characters, comma separators, etc.)\n * @param start The string to start the buffer with\n */\n _skipTo(start: string): void;\n /**\n * Given what is in the buffer, parse a single object out of it.\n * If a complete object isn't available, return null.\n * Assumes that we are at the start of an object to parse.\n */\n _getFullObject(): object | null;\n _simplifyObject(obj: unknown): object;\n _chunkResolution: (chunk: any) => void;\n _chunkPending: Promise<any> | null;\n _chunkQueue: any[];\n /**\n * Register that we have another chunk available for consumption.\n * If we are waiting for a chunk, resolve the promise waiting for it immediately.\n * If not, then add it to the queue.\n * @param chunk\n */\n _handleChunk(chunk: any): void;\n /**\n * Get the next chunk that is coming from the stream.\n * This chunk may be null, usually indicating the last chunk in the stream.\n */\n nextChunk(): Promise<any>;\n /**\n * Is the stream done?\n * A stream is only done if all of the following are true:\n * - There is no more data to be added to the text buffer\n * - There is no more data in the text buffer\n * - There are no chunks that are waiting to be consumed\n */\n get streamDone(): boolean;\n}\nexport declare class ComplexJsonStream extends JsonStream {\n _simplifyObject(obj: unknown): object;\n}\nexport declare class ReadableAbstractStream implements AbstractStream {\n private baseStream;\n decoder: TextDecoder;\n constructor(baseStream: AbstractStream, body: ReadableStream | null);\n appendBuffer(data: string): void;\n closeBuffer(): void;\n nextChunk(): Promise<any>;\n get streamDone(): boolean;\n run(body: any): Promise<void>;\n}\nexport declare class ReadableJsonStream extends ReadableAbstractStream {\n constructor(body: ReadableStream | null);\n}\nexport declare class SseStream implements AbstractStream {\n _buffer: string;\n _bufferOpen: boolean;\n appendBuffer(data: string): void;\n closeBuffer(): void;\n /**\n * Attempt to load an entire event.\n * For each entire event we load,\n * send them to be handled.\n */\n _parseBuffer(): void;\n /**\n * Given an event string, get all the fields\n * in the event. It is assumed there is one field\n * per line, but that field names can be duplicated,\n * indicating to append the new value to the previous value\n * @param event\n */\n _parseEvent(event: string | null): Record<string, string> | null;\n _chunkResolution: (chunk: any) => void;\n _chunkPending: Promise<any> | null;\n _chunkQueue: any[];\n _handleEvent(event: string | null): void;\n nextChunk(): Promise<any>;\n get streamDone(): boolean;\n}\nexport declare class ReadableSseStream extends ReadableAbstractStream {\n constructor(body: ReadableStream | null);\n}\nexport declare class SseJsonStream extends SseStream {\n _jsonAttribute: string;\n constructor(jsonAttribute?: string);\n nextChunk(): Promise<any>;\n}\nexport declare class ReadableSseJsonStream extends ReadableAbstractStream {\n constructor(body: ReadableStream | null);\n}\n//# sourceMappingURL=stream.d.ts.map"],"mappings":";UAAiBA,cAAAA;EAAAA;AAyBjB;AACA;AACA;EAqCmBC,YAAAA,CAAAA,IAAAA,EAAAA,MAAAA,CAAAA,EAAAA,IAAAA;EAaFA;;AAlDwC;AA4DzD;EAGqBK,WAAAA,EAAAA,EAAAA,IAAAA;EAERC;;;;EAMON,SAAAA,EAAAA,EAnFHA,OAmFGA,CAAAA,GAAAA,CAAAA;EARmCD;AAAc;AAUrE;AAGA;;;;EAA0CA,IAAAA,UAAAA,EAAAA,EAAAA,OAAAA;AAAc;AA0BnCY,iBAxGGV,YAAAA,CAyGFM,KAAAA,EAAAA,OAAAA,CAAAA,EADyBF,OAAAA;AAG1BO,iBA1GGV,WAAAA,CA6GPF,GAAAA,EAAAA,OAH0BS,CAAAA,EAAS,OAAA;AAK/BI,cA9GAV,UAAAA,YAAsBJ,cA8GQM,CAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAzEhCL;;;;;;;;;;;;;eAaFA;;;;;;;;;;cAUII,iBAAAA,SAA0BD,UAAU;;;cAGpCE,sBAAAA,YAAkCN;;WAE1CO;0BACeP,sBAAsBQ;;;eAGjCP;;kBAEGA;;cAECQ,kBAAAA,SAA2BH,sBAAsB;oBAChDE;;cAEDE,SAAAA,YAAqBV;;;;;;;;;;;;;;;;;;qCAkBHW;;iBAEpBV;;;eAGFA;;;cAGIW,iBAAAA,SAA0BN,sBAAsB;oBAC/CE;;cAEDK,aAAAA,SAAsBH,SAAS;;;eAGnCT;;cAEIa,qBAAAA,SAA8BR,sBAAsB;oBACnDE"}
@@ -3,20 +3,10 @@ import { InteropZodType } from "@langchain/core/utils/types";
3
3
  import { JsonSchema7Type } from "@langchain/core/utils/json_schema";
4
4
 
5
5
  //#region src/utils/zod_to_gemini_parameters.d.ts
6
- declare function adjustObjectType(
7
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
- obj: Record<string, any>
9
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
- ): Record<string, any>;
11
- declare function removeAdditionalProperties(
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
- obj: Record<string, any>): GeminiJsonSchema;
14
- declare function schemaToGeminiParameters<
15
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
- RunOutput extends Record<string, any> = Record<string, any>>(schema: InteropZodType<RunOutput> | JsonSchema7Type): GeminiFunctionSchema;
17
- declare function jsonSchemaToGeminiParameters(
18
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
- schema: Record<string, any>): GeminiFunctionSchema;
6
+ declare function adjustObjectType(obj: Record<string, any>): Record<string, any>;
7
+ declare function removeAdditionalProperties(obj: Record<string, any>): GeminiJsonSchema;
8
+ declare function schemaToGeminiParameters<RunOutput extends Record<string, any> = Record<string, any>>(schema: InteropZodType<RunOutput> | JsonSchema7Type): GeminiFunctionSchema;
9
+ declare function jsonSchemaToGeminiParameters(schema: Record<string, any>): GeminiFunctionSchema;
20
10
  //#endregion
21
11
  export { adjustObjectType, jsonSchemaToGeminiParameters, removeAdditionalProperties, schemaToGeminiParameters };
22
12
  //# sourceMappingURL=zod_to_gemini_parameters.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod_to_gemini_parameters.d.cts","names":["InteropZodType","JsonSchema7Type","GeminiFunctionSchema","GeminiJsonSchema","adjustObjectType","Record","removeAdditionalProperties","schemaToGeminiParameters","RunOutput","jsonSchemaToGeminiParameters"],"sources":["../../src/utils/zod_to_gemini_parameters.d.ts"],"sourcesContent":["import { InteropZodType } from \"@langchain/core/utils/types\";\nimport { type JsonSchema7Type } from \"@langchain/core/utils/json_schema\";\nimport { GeminiFunctionSchema, GeminiJsonSchema } from \"../types.js\";\nexport declare function adjustObjectType(obj: Record<string, any>): Record<string, any>;\nexport declare function removeAdditionalProperties(obj: Record<string, any>): GeminiJsonSchema;\nexport declare function schemaToGeminiParameters<RunOutput extends Record<string, any> = Record<string, any>>(schema: InteropZodType<RunOutput> | JsonSchema7Type): GeminiFunctionSchema;\nexport declare function jsonSchemaToGeminiParameters(schema: Record<string, any>): GeminiFunctionSchema;\n//# sourceMappingURL=zod_to_gemini_parameters.d.ts.map"],"mappings":";;;;;iBAGwBI,gBAAAA,MAAsBC,sBAAsBA;iBAC5CC,0BAAAA,MAAgCD,sBAAsBF;AADtDC,iBAEAG,wBAF4CF,CAAAA,kBAEDA,MAFO,CAAA,MAAA,EAAA,GAAA,CAAA,GAEeA,MAFf,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,MAAA,EAE4CL,cAF5C,CAE2DQ,SAF3D,CAAA,GAEwEP,eAFxE,CAAA,EAE0FC,oBAF1F;AAClDI,iBAEAG,4BAAAA,CAFgCJ,MAAsBF,EAEjBE,MAFiBF,CAAAA,MAAgB,EAAA,GAAA,CAAA,CAAA,EAEXD,oBAFW"}
@@ -3,20 +3,10 @@ import { InteropZodType } from "@langchain/core/utils/types";
3
3
  import { JsonSchema7Type } from "@langchain/core/utils/json_schema";
4
4
 
5
5
  //#region src/utils/zod_to_gemini_parameters.d.ts
6
- declare function adjustObjectType(
7
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
- obj: Record<string, any>
9
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
- ): Record<string, any>;
11
- declare function removeAdditionalProperties(
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
- obj: Record<string, any>): GeminiJsonSchema;
14
- declare function schemaToGeminiParameters<
15
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
- RunOutput extends Record<string, any> = Record<string, any>>(schema: InteropZodType<RunOutput> | JsonSchema7Type): GeminiFunctionSchema;
17
- declare function jsonSchemaToGeminiParameters(
18
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
- schema: Record<string, any>): GeminiFunctionSchema;
6
+ declare function adjustObjectType(obj: Record<string, any>): Record<string, any>;
7
+ declare function removeAdditionalProperties(obj: Record<string, any>): GeminiJsonSchema;
8
+ declare function schemaToGeminiParameters<RunOutput extends Record<string, any> = Record<string, any>>(schema: InteropZodType<RunOutput> | JsonSchema7Type): GeminiFunctionSchema;
9
+ declare function jsonSchemaToGeminiParameters(schema: Record<string, any>): GeminiFunctionSchema;
20
10
  //#endregion
21
11
  export { adjustObjectType, jsonSchemaToGeminiParameters, removeAdditionalProperties, schemaToGeminiParameters };
22
12
  //# sourceMappingURL=zod_to_gemini_parameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod_to_gemini_parameters.d.ts","names":["InteropZodType","JsonSchema7Type","GeminiFunctionSchema","GeminiJsonSchema","adjustObjectType","Record","removeAdditionalProperties","schemaToGeminiParameters","RunOutput","jsonSchemaToGeminiParameters"],"sources":["../../src/utils/zod_to_gemini_parameters.d.ts"],"sourcesContent":["import { InteropZodType } from \"@langchain/core/utils/types\";\nimport { type JsonSchema7Type } from \"@langchain/core/utils/json_schema\";\nimport { GeminiFunctionSchema, GeminiJsonSchema } from \"../types.js\";\nexport declare function adjustObjectType(obj: Record<string, any>): Record<string, any>;\nexport declare function removeAdditionalProperties(obj: Record<string, any>): GeminiJsonSchema;\nexport declare function schemaToGeminiParameters<RunOutput extends Record<string, any> = Record<string, any>>(schema: InteropZodType<RunOutput> | JsonSchema7Type): GeminiFunctionSchema;\nexport declare function jsonSchemaToGeminiParameters(schema: Record<string, any>): GeminiFunctionSchema;\n//# sourceMappingURL=zod_to_gemini_parameters.d.ts.map"],"mappings":";;;;;iBAGwBI,gBAAAA,MAAsBC,sBAAsBA;iBAC5CC,0BAAAA,MAAgCD,sBAAsBF;AADtDC,iBAEAG,wBAF4CF,CAAAA,kBAEDA,MAFO,CAAA,MAAA,EAAA,GAAA,CAAA,GAEeA,MAFf,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,MAAA,EAE4CL,cAF5C,CAE2DQ,SAF3D,CAAA,GAEwEP,eAFxE,CAAA,EAE0FC,oBAF1F;AAClDI,iBAEAG,4BAAAA,CAFgCJ,MAAsBF,EAEjBE,MAFiBF,CAAAA,MAAgB,EAAA,GAAA,CAAA,CAAA,EAEXD,oBAFW"}