@langchain/google-common 2.0.1 → 2.0.3

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @langchain/google-common
2
2
 
3
+ ## 2.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`bd2c46e`](https://github.com/langchain-ai/langchainjs/commit/bd2c46e09e661d9ac766c09e71bc6687d6fc811c), [`487378b`](https://github.com/langchain-ai/langchainjs/commit/487378bf14277659c8ca0ef06ea0f9836b818ff4), [`138e7fb`](https://github.com/langchain-ai/langchainjs/commit/138e7fb6280705457079863bedb238b16b322032)]:
8
+ - @langchain/core@1.1.3
9
+
10
+ ## 2.0.2
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`833f578`](https://github.com/langchain-ai/langchainjs/commit/833f57834dc3aa64e4cfdd7499f865b2ab41462a)]:
15
+ - @langchain/core@1.1.2
16
+
3
17
  ## 2.0.1
4
18
 
5
19
  ### Patch Changes
@@ -30,13 +30,11 @@ interface ChatGoogleBaseInput<AuthOptions> extends BaseChatModelParams, GoogleCo
30
30
  * Integration with a Google chat model.
31
31
  */
32
32
  declare abstract class ChatGoogleBase<AuthOptions> extends BaseChatModel<GoogleAIBaseLanguageModelCallOptions, AIMessageChunk> implements ChatGoogleBaseInput<AuthOptions> {
33
- // Used for tracing, replace with the same name as your class
34
33
  static lc_name(): string;
35
34
  get lc_secrets(): {
36
35
  [key: string]: string;
37
36
  } | undefined;
38
37
  lc_serializable: boolean;
39
- // Set based on modelName
40
38
  model: string;
41
39
  modelName: string;
42
40
  temperature: number;
@@ -52,7 +50,6 @@ declare abstract class ChatGoogleBase<AuthOptions> extends BaseChatModel<GoogleA
52
50
  topLogprobs: number;
53
51
  safetySettings: GoogleAISafetySetting[];
54
52
  responseModalities?: GoogleAIModelModality[];
55
- // May intentionally be undefined, meaning to compute this.
56
53
  convertSystemMessageToHumanContent: boolean | undefined;
57
54
  safetyHandler: GoogleAISafetyHandler;
58
55
  speechConfig: GoogleSpeechConfig;
@@ -70,7 +67,6 @@ declare abstract class ChatGoogleBase<AuthOptions> extends BaseChatModel<GoogleA
70
67
  buildConnection(fields: GoogleBaseLLMInput<AuthOptions>, client: GoogleAbstractedClient): void;
71
68
  get platform(): GooglePlatformType;
72
69
  bindTools(tools: GoogleAIToolType[], kwargs?: Partial<GoogleAIBaseLanguageModelCallOptions>): Runnable<BaseLanguageModelInput, AIMessageChunk, GoogleAIBaseLanguageModelCallOptions>;
73
- // Replace
74
70
  _llmType(): string;
75
71
  /**
76
72
  * Get the parameters used to invoke the model
@@ -90,16 +86,8 @@ declare abstract class ChatGoogleBase<AuthOptions> extends BaseChatModel<GoogleA
90
86
  * @returns {ModelProfile} An object describing the model's capabilities and constraints
91
87
  */
92
88
  get profile(): ModelProfile;
93
- withStructuredOutput<
94
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
95
- RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput>
96
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
97
- | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;
98
- withStructuredOutput<
99
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
100
- RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput>
101
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
102
- | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {
89
+ withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;
90
+ withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {
103
91
  raw: BaseMessage;
104
92
  parsed: RunOutput;
105
93
  }>;
@@ -30,13 +30,11 @@ interface ChatGoogleBaseInput<AuthOptions> extends BaseChatModelParams, GoogleCo
30
30
  * Integration with a Google chat model.
31
31
  */
32
32
  declare abstract class ChatGoogleBase<AuthOptions> extends BaseChatModel<GoogleAIBaseLanguageModelCallOptions, AIMessageChunk> implements ChatGoogleBaseInput<AuthOptions> {
33
- // Used for tracing, replace with the same name as your class
34
33
  static lc_name(): string;
35
34
  get lc_secrets(): {
36
35
  [key: string]: string;
37
36
  } | undefined;
38
37
  lc_serializable: boolean;
39
- // Set based on modelName
40
38
  model: string;
41
39
  modelName: string;
42
40
  temperature: number;
@@ -52,7 +50,6 @@ declare abstract class ChatGoogleBase<AuthOptions> extends BaseChatModel<GoogleA
52
50
  topLogprobs: number;
53
51
  safetySettings: GoogleAISafetySetting[];
54
52
  responseModalities?: GoogleAIModelModality[];
55
- // May intentionally be undefined, meaning to compute this.
56
53
  convertSystemMessageToHumanContent: boolean | undefined;
57
54
  safetyHandler: GoogleAISafetyHandler;
58
55
  speechConfig: GoogleSpeechConfig;
@@ -70,7 +67,6 @@ declare abstract class ChatGoogleBase<AuthOptions> extends BaseChatModel<GoogleA
70
67
  buildConnection(fields: GoogleBaseLLMInput<AuthOptions>, client: GoogleAbstractedClient): void;
71
68
  get platform(): GooglePlatformType;
72
69
  bindTools(tools: GoogleAIToolType[], kwargs?: Partial<GoogleAIBaseLanguageModelCallOptions>): Runnable<BaseLanguageModelInput, AIMessageChunk, GoogleAIBaseLanguageModelCallOptions>;
73
- // Replace
74
70
  _llmType(): string;
75
71
  /**
76
72
  * Get the parameters used to invoke the model
@@ -90,16 +86,8 @@ declare abstract class ChatGoogleBase<AuthOptions> extends BaseChatModel<GoogleA
90
86
  * @returns {ModelProfile} An object describing the model's capabilities and constraints
91
87
  */
92
88
  get profile(): ModelProfile;
93
- withStructuredOutput<
94
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
95
- RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput>
96
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
97
- | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;
98
- withStructuredOutput<
99
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
100
- RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput>
101
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
102
- | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {
89
+ withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<false>): Runnable<BaseLanguageModelInput, RunOutput>;
90
+ withStructuredOutput<RunOutput extends Record<string, any> = Record<string, any>>(outputSchema: InteropZodType<RunOutput> | Record<string, any>, config?: StructuredOutputMethodOptions<true>): Runnable<BaseLanguageModelInput, {
103
91
  raw: BaseMessage;
104
92
  parsed: RunOutput;
105
93
  }>;
@@ -24,8 +24,6 @@ declare abstract class GoogleConnection<CallOptions extends AsyncCallerCallOptio
24
24
  _request(data: unknown | undefined, options: CallOptions, requestHeaders?: Record<string, string>): Promise<ResponseType>;
25
25
  }
26
26
  declare abstract class GoogleHostConnection<CallOptions extends AsyncCallerCallOptions, ResponseType extends GoogleResponse, AuthOptions> extends GoogleConnection<CallOptions, ResponseType> implements GoogleConnectionParams<AuthOptions> {
27
- // This does not default to a value intentionally.
28
- // Use the "platform" getter if you need this.
29
27
  platformType: GooglePlatformType | undefined;
30
28
  _endpoint: string | undefined;
31
29
  _location: string | undefined;
@@ -24,8 +24,6 @@ declare abstract class GoogleConnection<CallOptions extends AsyncCallerCallOptio
24
24
  _request(data: unknown | undefined, options: CallOptions, requestHeaders?: Record<string, string>): Promise<ResponseType>;
25
25
  }
26
26
  declare abstract class GoogleHostConnection<CallOptions extends AsyncCallerCallOptions, ResponseType extends GoogleResponse, AuthOptions> extends GoogleConnection<CallOptions, ResponseType> implements GoogleConnectionParams<AuthOptions> {
27
- // This does not default to a value intentionally.
28
- // Use the "platform" getter if you need this.
29
27
  platformType: GooglePlatformType | undefined;
30
28
  _endpoint: string | undefined;
31
29
  _location: string | undefined;
@@ -38,7 +38,6 @@ declare abstract class BlobStoreGoogle<ResponseType extends GoogleResponse, Auth
38
38
  abstract buildDeleteConnection(key: string): GoogleDownloadConnection<AsyncCallerCallOptions, GoogleResponse, AuthOptions>;
39
39
  _del(key: string): Promise<void>;
40
40
  mdelete(keys: string[]): Promise<void>;
41
- // eslint-disable-next-line require-yield
42
41
  yieldKeys(_prefix: string | undefined): AsyncGenerator<string>;
43
42
  }
44
43
  /**
@@ -109,7 +108,7 @@ declare abstract class BlobStoreGoogleCloudStorageBase<AuthOptions> extends Blob
109
108
  type AIStudioFileState = "PROCESSING" | "ACTIVE" | "FAILED" | "STATE_UNSPECIFIED";
110
109
  type AIStudioFileVideoMetadata = {
111
110
  videoMetadata: {
112
- videoDuration: string; // Duration in seconds, possibly with fractional, ending in "s"
111
+ videoDuration: string;
113
112
  };
114
113
  };
115
114
  type AIStudioFileMetadata = AIStudioFileVideoMetadata;
@@ -117,11 +116,11 @@ interface AIStudioFileObject {
117
116
  name?: string;
118
117
  displayName?: string;
119
118
  mimeType?: string;
120
- sizeBytes?: string; // int64 format
121
- createTime?: string; // timestamp format
122
- updateTime?: string; // timestamp format
123
- expirationTime?: string; // timestamp format
124
- sha256Hash?: string; // base64 encoded
119
+ sizeBytes?: string;
120
+ createTime?: string;
121
+ updateTime?: string;
122
+ expirationTime?: string;
123
+ sha256Hash?: string;
125
124
  uri?: string;
126
125
  state?: AIStudioFileState;
127
126
  error?: {
@@ -38,7 +38,6 @@ declare abstract class BlobStoreGoogle<ResponseType extends GoogleResponse, Auth
38
38
  abstract buildDeleteConnection(key: string): GoogleDownloadConnection<AsyncCallerCallOptions, GoogleResponse, AuthOptions>;
39
39
  _del(key: string): Promise<void>;
40
40
  mdelete(keys: string[]): Promise<void>;
41
- // eslint-disable-next-line require-yield
42
41
  yieldKeys(_prefix: string | undefined): AsyncGenerator<string>;
43
42
  }
44
43
  /**
@@ -109,7 +108,7 @@ declare abstract class BlobStoreGoogleCloudStorageBase<AuthOptions> extends Blob
109
108
  type AIStudioFileState = "PROCESSING" | "ACTIVE" | "FAILED" | "STATE_UNSPECIFIED";
110
109
  type AIStudioFileVideoMetadata = {
111
110
  videoMetadata: {
112
- videoDuration: string; // Duration in seconds, possibly with fractional, ending in "s"
111
+ videoDuration: string;
113
112
  };
114
113
  };
115
114
  type AIStudioFileMetadata = AIStudioFileVideoMetadata;
@@ -117,11 +116,11 @@ interface AIStudioFileObject {
117
116
  name?: string;
118
117
  displayName?: string;
119
118
  mimeType?: string;
120
- sizeBytes?: string; // int64 format
121
- createTime?: string; // timestamp format
122
- updateTime?: string; // timestamp format
123
- expirationTime?: string; // timestamp format
124
- sha256Hash?: string; // base64 encoded
119
+ sizeBytes?: string;
120
+ createTime?: string;
121
+ updateTime?: string;
122
+ expirationTime?: string;
123
+ sha256Hash?: string;
125
124
  uri?: string;
126
125
  state?: AIStudioFileState;
127
126
  error?: {
@@ -3,8 +3,8 @@ import { Serializable } from "@langchain/core/load/serializable";
3
3
 
4
4
  //#region src/experimental/utils/media_core.d.ts
5
5
  type MediaBlobData = {
6
- value: string; // In Base64 encoding
7
- type: string; // The mime type and possibly encoding
6
+ value: string;
7
+ type: string;
8
8
  };
9
9
  interface MediaBlobParameters {
10
10
  data?: MediaBlobData;
@@ -19,7 +19,6 @@ declare class MediaBlob extends Serializable implements MediaBlobParameters {
19
19
  lc_serializable: boolean;
20
20
  lc_namespace: string[];
21
21
  data: MediaBlobData;
22
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
22
  metadata?: Record<string, any>;
24
23
  path?: string;
25
24
  constructor(params: MediaBlobParameters);
@@ -90,7 +89,7 @@ interface BlobStoreOptions {
90
89
  * implemented should be documented and throw an Error if called.
91
90
  */
92
91
  declare abstract class BlobStore extends BaseStore<string, MediaBlob> {
93
- lc_namespace: string[]; // FIXME - What should this be? And why?
92
+ lc_namespace: string[];
94
93
  defaultStoreOptions: BlobStoreStoreOptions;
95
94
  defaultFetchOptions: BlobStoreFetchOptions;
96
95
  constructor(opts?: BlobStoreOptions);
@@ -3,8 +3,8 @@ import { Serializable } from "@langchain/core/load/serializable";
3
3
 
4
4
  //#region src/experimental/utils/media_core.d.ts
5
5
  type MediaBlobData = {
6
- value: string; // In Base64 encoding
7
- type: string; // The mime type and possibly encoding
6
+ value: string;
7
+ type: string;
8
8
  };
9
9
  interface MediaBlobParameters {
10
10
  data?: MediaBlobData;
@@ -19,7 +19,6 @@ declare class MediaBlob extends Serializable implements MediaBlobParameters {
19
19
  lc_serializable: boolean;
20
20
  lc_namespace: string[];
21
21
  data: MediaBlobData;
22
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
22
  metadata?: Record<string, any>;
24
23
  path?: string;
25
24
  constructor(params: MediaBlobParameters);
@@ -90,7 +89,7 @@ interface BlobStoreOptions {
90
89
  * implemented should be documented and throw an Error if called.
91
90
  */
92
91
  declare abstract class BlobStore extends BaseStore<string, MediaBlob> {
93
- lc_namespace: string[]; // FIXME - What should this be? And why?
92
+ lc_namespace: string[];
94
93
  defaultStoreOptions: BlobStoreStoreOptions;
95
94
  defaultFetchOptions: BlobStoreFetchOptions;
96
95
  constructor(opts?: BlobStoreOptions);
package/dist/llms.d.cts CHANGED
@@ -15,7 +15,6 @@ declare class GoogleLLMConnection<AuthOptions> extends AbstractGoogleLLMConnecti
15
15
  * Integration with an LLM.
16
16
  */
17
17
  declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelCallOptions> implements GoogleBaseLLMInput<AuthOptions> {
18
- // Used for tracing, replace with the same name as your class
19
18
  static lc_name(): string;
20
19
  get lc_secrets(): {
21
20
  [key: string]: string;
@@ -41,7 +40,6 @@ declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelC
41
40
  buildClient(fields?: GoogleAIBaseLLMInput<AuthOptions>): GoogleAbstractedClient;
42
41
  buildConnection(fields: GoogleBaseLLMInput<AuthOptions>, client: GoogleAbstractedClient): void;
43
42
  get platform(): GooglePlatformType;
44
- // Replace
45
43
  _llmType(): string;
46
44
  formatPrompt(prompt: string): MessageContent;
47
45
  /**
@@ -51,9 +49,6 @@ declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelC
51
49
  * in order to handle public APi calls to `generate()`.
52
50
  */
53
51
  _call(prompt: string, options: this["ParsedCallOptions"]): Promise<string>;
54
- // Normally, you should not override this method and instead should override
55
- // _streamResponseChunks. We are doing so here to allow for multimodal inputs into
56
- // the LLM.
57
52
  _streamIterator(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): AsyncGenerator<string>;
58
53
  predictMessages(messages: BaseMessage[], options?: string[] | BaseLanguageModelCallOptions, _callbacks?: Callbacks): Promise<BaseMessage>;
59
54
  /**
@@ -63,8 +58,6 @@ declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelC
63
58
  * TODO: Replace with something less hacky.
64
59
  */
65
60
  protected createProxyChat(): ChatGoogleBase<AuthOptions>;
66
- // TODO: Remove the need to override this - we are doing it to
67
- // allow the LLM to handle multimodal types of input.
68
61
  invoke(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): Promise<string>;
69
62
  }
70
63
  //#endregion
package/dist/llms.d.ts CHANGED
@@ -15,7 +15,6 @@ declare class GoogleLLMConnection<AuthOptions> extends AbstractGoogleLLMConnecti
15
15
  * Integration with an LLM.
16
16
  */
17
17
  declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelCallOptions> implements GoogleBaseLLMInput<AuthOptions> {
18
- // Used for tracing, replace with the same name as your class
19
18
  static lc_name(): string;
20
19
  get lc_secrets(): {
21
20
  [key: string]: string;
@@ -41,7 +40,6 @@ declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelC
41
40
  buildClient(fields?: GoogleAIBaseLLMInput<AuthOptions>): GoogleAbstractedClient;
42
41
  buildConnection(fields: GoogleBaseLLMInput<AuthOptions>, client: GoogleAbstractedClient): void;
43
42
  get platform(): GooglePlatformType;
44
- // Replace
45
43
  _llmType(): string;
46
44
  formatPrompt(prompt: string): MessageContent;
47
45
  /**
@@ -51,9 +49,6 @@ declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelC
51
49
  * in order to handle public APi calls to `generate()`.
52
50
  */
53
51
  _call(prompt: string, options: this["ParsedCallOptions"]): Promise<string>;
54
- // Normally, you should not override this method and instead should override
55
- // _streamResponseChunks. We are doing so here to allow for multimodal inputs into
56
- // the LLM.
57
52
  _streamIterator(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): AsyncGenerator<string>;
58
53
  predictMessages(messages: BaseMessage[], options?: string[] | BaseLanguageModelCallOptions, _callbacks?: Callbacks): Promise<BaseMessage>;
59
54
  /**
@@ -63,8 +58,6 @@ declare abstract class GoogleBaseLLM<AuthOptions> extends LLM<BaseLanguageModelC
63
58
  * TODO: Replace with something less hacky.
64
59
  */
65
60
  protected createProxyChat(): ChatGoogleBase<AuthOptions>;
66
- // TODO: Remove the need to override this - we are doing it to
67
- // allow the LLM to handle multimodal types of input.
68
61
  invoke(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): Promise<string>;
69
62
  }
70
63
  //#endregion
@@ -62,7 +62,6 @@ interface AnthropicMessageContentRedactedThinking extends AnthropicMessageConten
62
62
  type: "redacted_thinking";
63
63
  data: string;
64
64
  }
65
- // TODO: Define this
66
65
  type AnthropicMessageContentToolUseInput = object;
67
66
  interface AnthropicMessageContentToolUse extends AnthropicMessageContentBase {
68
67
  type: "tool_use";
@@ -99,10 +98,9 @@ interface AnthropicToolChoiceTool extends AnthropicToolChoiceBase {
99
98
  name: string;
100
99
  }
101
100
  type AnthropicToolChoice = AnthropicToolChoiceAuto | AnthropicToolChoiceAny | AnthropicToolChoiceTool;
102
- // TODO: Define this
103
101
  type AnthropicToolInputSchema = object;
104
102
  interface AnthropicTool {
105
- type?: string; // Just available on tools 20241022 and later?
103
+ type?: string;
106
104
  name: string;
107
105
  description?: string;
108
106
  cache_control?: AnthropicCacheControl;
@@ -221,7 +219,6 @@ interface AnthropicStreamPingEvent extends AnthropicStreamBaseEvent {
221
219
  }
222
220
  interface AnthropicStreamErrorEvent extends AnthropicStreamBaseEvent {
223
221
  type: "error";
224
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
225
222
  error: any;
226
223
  }
227
224
  //#endregion
@@ -62,7 +62,6 @@ interface AnthropicMessageContentRedactedThinking extends AnthropicMessageConten
62
62
  type: "redacted_thinking";
63
63
  data: string;
64
64
  }
65
- // TODO: Define this
66
65
  type AnthropicMessageContentToolUseInput = object;
67
66
  interface AnthropicMessageContentToolUse extends AnthropicMessageContentBase {
68
67
  type: "tool_use";
@@ -99,10 +98,9 @@ interface AnthropicToolChoiceTool extends AnthropicToolChoiceBase {
99
98
  name: string;
100
99
  }
101
100
  type AnthropicToolChoice = AnthropicToolChoiceAuto | AnthropicToolChoiceAny | AnthropicToolChoiceTool;
102
- // TODO: Define this
103
101
  type AnthropicToolInputSchema = object;
104
102
  interface AnthropicTool {
105
- type?: string; // Just available on tools 20241022 and later?
103
+ type?: string;
106
104
  name: string;
107
105
  description?: string;
108
106
  cache_control?: AnthropicCacheControl;
@@ -221,7 +219,6 @@ interface AnthropicStreamPingEvent extends AnthropicStreamBaseEvent {
221
219
  }
222
220
  interface AnthropicStreamErrorEvent extends AnthropicStreamBaseEvent {
223
221
  type: "error";
224
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
225
222
  error: any;
226
223
  }
227
224
  //#endregion
package/dist/types.d.cts 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;
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;
@@ -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
@@ -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
@@ -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> {
@@ -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> {
@@ -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
  }
@@ -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
  }
@@ -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 {
@@ -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 {
@@ -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
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/google-common",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Core types and classes for Google services.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -17,7 +17,7 @@
17
17
  "uuid": "^10.0.0"
18
18
  },
19
19
  "peerDependencies": {
20
- "@langchain/core": "1.1.1"
20
+ "@langchain/core": "1.1.3"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@jest/globals": "^29.5.0",
@@ -35,7 +35,7 @@
35
35
  "ts-jest": "^29.1.0",
36
36
  "typescript": "~5.8.3",
37
37
  "zod": "^3.25.76",
38
- "@langchain/core": "1.1.1",
38
+ "@langchain/core": "1.1.3",
39
39
  "@langchain/eslint": "0.1.1"
40
40
  },
41
41
  "publishConfig": {