@langchain/google-gauth 2.1.19 → 2.1.20

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,14 @@
1
1
  # @langchain/google-gauth
2
2
 
3
+ ## 2.1.20
4
+
5
+ ### Patch Changes
6
+
7
+ - [#10080](https://github.com/langchain-ai/langchainjs/pull/10080) [`b583729`](https://github.com/langchain-ai/langchainjs/commit/b583729e99cf0c035630f6b311c4d069a1980cca) Thanks [@hntrl](https://github.com/hntrl)! - Add string-model constructor overloads for chat models (with supporting tests where applicable).
8
+
9
+ - Updated dependencies []:
10
+ - @langchain/google-common@2.1.20
11
+
3
12
  ## 2.1.19
4
13
 
5
14
  ### Patch Changes
@@ -9,7 +9,11 @@ var ChatGoogle = class extends _langchain_google_common.ChatGoogleBase {
9
9
  static lc_name() {
10
10
  return "ChatGoogle";
11
11
  }
12
- constructor(fields) {
12
+ constructor(modelOrFields, paramsArg) {
13
+ const fields = typeof modelOrFields === "string" ? {
14
+ ...paramsArg ?? {},
15
+ model: modelOrFields
16
+ } : modelOrFields ?? {};
13
17
  super(fields);
14
18
  }
15
19
  buildAbstractedClient(fields) {
@@ -1 +1 @@
1
- {"version":3,"file":"chat_models.cjs","names":["ChatGoogleBase","GAuthClient"],"sources":["../src/chat_models.ts"],"sourcesContent":["import {\n ChatGoogleBase,\n ChatGoogleBaseInput,\n GoogleAbstractedClient,\n GoogleBaseLLMInput,\n} from \"@langchain/google-common\";\nimport { GoogleAuthOptions } from \"google-auth-library\";\nimport { GAuthClient } from \"./auth.js\";\n\n/**\n * Input to chat model class.\n */\nexport interface ChatGoogleInput extends ChatGoogleBaseInput<GoogleAuthOptions> {}\n\n/**\n * Integration with a Google chat model.\n */\nexport class ChatGoogle\n extends ChatGoogleBase<GoogleAuthOptions>\n implements ChatGoogleInput\n{\n // Used for tracing, replace with the same name as your class\n static lc_name() {\n return \"ChatGoogle\";\n }\n\n constructor(fields?: ChatGoogleInput) {\n super(fields);\n }\n\n buildAbstractedClient(\n fields: GoogleBaseLLMInput<GoogleAuthOptions> | undefined\n ): GoogleAbstractedClient {\n return new GAuthClient(fields);\n }\n}\n"],"mappings":";;;;;;;AAiBA,IAAa,aAAb,cACUA,wCAEV;CAEE,OAAO,UAAU;AACf,SAAO;;CAGT,YAAY,QAA0B;AACpC,QAAM,OAAO;;CAGf,sBACE,QACwB;AACxB,SAAO,IAAIC,yBAAY,OAAO"}
1
+ {"version":3,"file":"chat_models.cjs","names":["ChatGoogleBase","GAuthClient"],"sources":["../src/chat_models.ts"],"sourcesContent":["import {\n ChatGoogleBase,\n ChatGoogleBaseInput,\n GoogleAbstractedClient,\n GoogleBaseLLMInput,\n} from \"@langchain/google-common\";\nimport { GoogleAuthOptions } from \"google-auth-library\";\nimport { GAuthClient } from \"./auth.js\";\n\n/**\n * Input to chat model class.\n */\nexport interface ChatGoogleInput extends ChatGoogleBaseInput<GoogleAuthOptions> {}\n\n/**\n * Integration with a Google chat model.\n */\nexport class ChatGoogle\n extends ChatGoogleBase<GoogleAuthOptions>\n implements ChatGoogleInput\n{\n // Used for tracing, replace with the same name as your class\n static lc_name() {\n return \"ChatGoogle\";\n }\n\n constructor(model: string, params?: Omit<ChatGoogleInput, \"model\">);\n constructor(fields?: ChatGoogleInput);\n constructor(\n modelOrFields?: string | ChatGoogleInput,\n paramsArg?: Omit<ChatGoogleInput, \"model\">\n ) {\n const fields =\n typeof modelOrFields === \"string\"\n ? { ...(paramsArg ?? {}), model: modelOrFields }\n : (modelOrFields ?? {});\n super(fields);\n }\n\n buildAbstractedClient(\n fields: GoogleBaseLLMInput<GoogleAuthOptions> | undefined\n ): GoogleAbstractedClient {\n return new GAuthClient(fields);\n }\n}\n"],"mappings":";;;;;;;AAiBA,IAAa,aAAb,cACUA,wCAEV;CAEE,OAAO,UAAU;AACf,SAAO;;CAKT,YACE,eACA,WACA;EACA,MAAM,SACJ,OAAO,kBAAkB,WACrB;GAAE,GAAI,aAAa,EAAE;GAAG,OAAO;GAAe,GAC7C,iBAAiB,EAAE;AAC1B,QAAM,OAAO;;CAGf,sBACE,QACwB;AACxB,SAAO,IAAIC,yBAAY,OAAO"}
@@ -11,6 +11,7 @@ interface ChatGoogleInput extends ChatGoogleBaseInput<GoogleAuthOptions> {}
11
11
  */
12
12
  declare class ChatGoogle extends ChatGoogleBase<GoogleAuthOptions> implements ChatGoogleInput {
13
13
  static lc_name(): string;
14
+ constructor(model: string, params?: Omit<ChatGoogleInput, "model">);
14
15
  constructor(fields?: ChatGoogleInput);
15
16
  buildAbstractedClient(fields: GoogleBaseLLMInput<GoogleAuthOptions> | undefined): GoogleAbstractedClient;
16
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"chat_models.d.cts","names":[],"sources":["../src/chat_models.ts"],"mappings":";;;;;;AAYA;UAAiB,eAAA,SAAwB,mBAAA,CAAoB,iBAAA;;;AAK7D;cAAa,UAAA,SACH,cAAA,CAAe,iBAAA,aACZ,eAAA;EAAA,OAGJ,OAAA,CAAA;EAIP,WAAA,CAAY,MAAA,GAAS,eAAA;EAIrB,qBAAA,CACE,MAAA,EAAQ,kBAAA,CAAmB,iBAAA,gBAC1B,sBAAA;AAAA"}
1
+ {"version":3,"file":"chat_models.d.cts","names":[],"sources":["../src/chat_models.ts"],"mappings":";;;;;;AAYA;UAAiB,eAAA,SAAwB,mBAAA,CAAoB,iBAAA;;;AAK7D;cAAa,UAAA,SACH,cAAA,CAAe,iBAAA,aACZ,eAAA;EAAA,OAGJ,OAAA,CAAA;EAIP,WAAA,CAAY,KAAA,UAAe,MAAA,GAAS,IAAA,CAAK,eAAA;EACzC,WAAA,CAAY,MAAA,GAAS,eAAA;EAYrB,qBAAA,CACE,MAAA,EAAQ,kBAAA,CAAmB,iBAAA,gBAC1B,sBAAA;AAAA"}
@@ -11,6 +11,7 @@ interface ChatGoogleInput extends ChatGoogleBaseInput<GoogleAuthOptions> {}
11
11
  */
12
12
  declare class ChatGoogle extends ChatGoogleBase<GoogleAuthOptions> implements ChatGoogleInput {
13
13
  static lc_name(): string;
14
+ constructor(model: string, params?: Omit<ChatGoogleInput, "model">);
14
15
  constructor(fields?: ChatGoogleInput);
15
16
  buildAbstractedClient(fields: GoogleBaseLLMInput<GoogleAuthOptions> | undefined): GoogleAbstractedClient;
16
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"chat_models.d.ts","names":[],"sources":["../src/chat_models.ts"],"mappings":";;;;;;AAYA;UAAiB,eAAA,SAAwB,mBAAA,CAAoB,iBAAA;;;AAK7D;cAAa,UAAA,SACH,cAAA,CAAe,iBAAA,aACZ,eAAA;EAAA,OAGJ,OAAA,CAAA;EAIP,WAAA,CAAY,MAAA,GAAS,eAAA;EAIrB,qBAAA,CACE,MAAA,EAAQ,kBAAA,CAAmB,iBAAA,gBAC1B,sBAAA;AAAA"}
1
+ {"version":3,"file":"chat_models.d.ts","names":[],"sources":["../src/chat_models.ts"],"mappings":";;;;;;AAYA;UAAiB,eAAA,SAAwB,mBAAA,CAAoB,iBAAA;;;AAK7D;cAAa,UAAA,SACH,cAAA,CAAe,iBAAA,aACZ,eAAA;EAAA,OAGJ,OAAA,CAAA;EAIP,WAAA,CAAY,KAAA,UAAe,MAAA,GAAS,IAAA,CAAK,eAAA;EACzC,WAAA,CAAY,MAAA,GAAS,eAAA;EAYrB,qBAAA,CACE,MAAA,EAAQ,kBAAA,CAAmB,iBAAA,gBAC1B,sBAAA;AAAA"}
@@ -9,7 +9,11 @@ var ChatGoogle = class extends ChatGoogleBase {
9
9
  static lc_name() {
10
10
  return "ChatGoogle";
11
11
  }
12
- constructor(fields) {
12
+ constructor(modelOrFields, paramsArg) {
13
+ const fields = typeof modelOrFields === "string" ? {
14
+ ...paramsArg ?? {},
15
+ model: modelOrFields
16
+ } : modelOrFields ?? {};
13
17
  super(fields);
14
18
  }
15
19
  buildAbstractedClient(fields) {
@@ -1 +1 @@
1
- {"version":3,"file":"chat_models.js","names":[],"sources":["../src/chat_models.ts"],"sourcesContent":["import {\n ChatGoogleBase,\n ChatGoogleBaseInput,\n GoogleAbstractedClient,\n GoogleBaseLLMInput,\n} from \"@langchain/google-common\";\nimport { GoogleAuthOptions } from \"google-auth-library\";\nimport { GAuthClient } from \"./auth.js\";\n\n/**\n * Input to chat model class.\n */\nexport interface ChatGoogleInput extends ChatGoogleBaseInput<GoogleAuthOptions> {}\n\n/**\n * Integration with a Google chat model.\n */\nexport class ChatGoogle\n extends ChatGoogleBase<GoogleAuthOptions>\n implements ChatGoogleInput\n{\n // Used for tracing, replace with the same name as your class\n static lc_name() {\n return \"ChatGoogle\";\n }\n\n constructor(fields?: ChatGoogleInput) {\n super(fields);\n }\n\n buildAbstractedClient(\n fields: GoogleBaseLLMInput<GoogleAuthOptions> | undefined\n ): GoogleAbstractedClient {\n return new GAuthClient(fields);\n }\n}\n"],"mappings":";;;;;;;AAiBA,IAAa,aAAb,cACU,eAEV;CAEE,OAAO,UAAU;AACf,SAAO;;CAGT,YAAY,QAA0B;AACpC,QAAM,OAAO;;CAGf,sBACE,QACwB;AACxB,SAAO,IAAI,YAAY,OAAO"}
1
+ {"version":3,"file":"chat_models.js","names":[],"sources":["../src/chat_models.ts"],"sourcesContent":["import {\n ChatGoogleBase,\n ChatGoogleBaseInput,\n GoogleAbstractedClient,\n GoogleBaseLLMInput,\n} from \"@langchain/google-common\";\nimport { GoogleAuthOptions } from \"google-auth-library\";\nimport { GAuthClient } from \"./auth.js\";\n\n/**\n * Input to chat model class.\n */\nexport interface ChatGoogleInput extends ChatGoogleBaseInput<GoogleAuthOptions> {}\n\n/**\n * Integration with a Google chat model.\n */\nexport class ChatGoogle\n extends ChatGoogleBase<GoogleAuthOptions>\n implements ChatGoogleInput\n{\n // Used for tracing, replace with the same name as your class\n static lc_name() {\n return \"ChatGoogle\";\n }\n\n constructor(model: string, params?: Omit<ChatGoogleInput, \"model\">);\n constructor(fields?: ChatGoogleInput);\n constructor(\n modelOrFields?: string | ChatGoogleInput,\n paramsArg?: Omit<ChatGoogleInput, \"model\">\n ) {\n const fields =\n typeof modelOrFields === \"string\"\n ? { ...(paramsArg ?? {}), model: modelOrFields }\n : (modelOrFields ?? {});\n super(fields);\n }\n\n buildAbstractedClient(\n fields: GoogleBaseLLMInput<GoogleAuthOptions> | undefined\n ): GoogleAbstractedClient {\n return new GAuthClient(fields);\n }\n}\n"],"mappings":";;;;;;;AAiBA,IAAa,aAAb,cACU,eAEV;CAEE,OAAO,UAAU;AACf,SAAO;;CAKT,YACE,eACA,WACA;EACA,MAAM,SACJ,OAAO,kBAAkB,WACrB;GAAE,GAAI,aAAa,EAAE;GAAG,OAAO;GAAe,GAC7C,iBAAiB,EAAE;AAC1B,QAAM,OAAO;;CAGf,sBACE,QACwB;AACxB,SAAO,IAAI,YAAY,OAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/google-gauth",
3
- "version": "2.1.19",
3
+ "version": "2.1.20",
4
4
  "description": "Google auth based authentication support for Google services",
5
5
  "author": "LangChain",
6
6
  "license": "MIT",
@@ -15,7 +15,7 @@
15
15
  "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-google-gauth/",
16
16
  "dependencies": {
17
17
  "google-auth-library": "^10.1.0",
18
- "@langchain/google-common": "2.1.19"
18
+ "@langchain/google-common": "2.1.20"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@jest/globals": "^30.2.0",