@lumenchain/langchain-gigachat 0.0.1 → 0.0.2

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.
@@ -379,7 +379,7 @@ class GigaChat extends chat_models_1.BaseChatModel {
379
379
  return "giga-chat-model";
380
380
  }
381
381
  bindTools(tools, kwargs) {
382
- return this.bind({
382
+ return this.withConfig({
383
383
  tools: this.formatStructuredToolToGigaChat(tools),
384
384
  ...kwargs,
385
385
  });
@@ -402,7 +402,7 @@ class GigaChat extends chat_models_1.BaseChatModel {
402
402
  return {
403
403
  name: tool.name,
404
404
  description: tool.description,
405
- parameters: (0, zod_to_json_schema_1.zodToJsonSchema)(tool.schema),
405
+ parameters: (0, types_1.isZodSchema)(tool.schema) ? (0, zod_to_json_schema_1.zodToJsonSchema)(tool.schema) : tool.schema,
406
406
  };
407
407
  }
408
408
  throw new Error(`Unknown tool type passed to GigaChat: ${JSON.stringify(tool, null, 2)}`);
@@ -376,7 +376,7 @@ export class GigaChat extends BaseChatModel {
376
376
  return "giga-chat-model";
377
377
  }
378
378
  bindTools(tools, kwargs) {
379
- return this.bind({
379
+ return this.withConfig({
380
380
  tools: this.formatStructuredToolToGigaChat(tools),
381
381
  ...kwargs,
382
382
  });
@@ -399,7 +399,7 @@ export class GigaChat extends BaseChatModel {
399
399
  return {
400
400
  name: tool.name,
401
401
  description: tool.description,
402
- parameters: zodToJsonSchema(tool.schema),
402
+ parameters: isZodSchema(tool.schema) ? zodToJsonSchema(tool.schema) : tool.schema,
403
403
  };
404
404
  }
405
405
  throw new Error(`Unknown tool type passed to GigaChat: ${JSON.stringify(tool, null, 2)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumenchain/langchain-gigachat",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "GigaChat integration for LangChain.js",
5
5
  "type": "module",
6
6
  "engines": {
@@ -28,9 +28,16 @@
28
28
  "test:single": "NODE_OPTIONS=--experimental-vm-modules yarn run jest --config jest.config.cjs --testTimeout 100000",
29
29
  "test:int": "NODE_OPTIONS=--experimental-vm-modules jest --testPathPattern=\\.int\\.test.ts --testTimeout 100000 --maxWorkers=50%",
30
30
  "format": "prettier --config .prettierrc --write \"src\"",
31
- "format:check": "prettier --config .prettierrc --check \"src\""
31
+ "format:check": "prettier --config .prettierrc --check \"src\"",
32
+ "release:whoami": "npm whoami --registry=https://registry.npmjs.org/",
33
+ "release:version:patch": "npm version patch --no-git-tag-version",
34
+ "release:version:minor": "npm version minor --no-git-tag-version",
35
+ "release:version:major": "npm version major --no-git-tag-version",
36
+ "release:pack": "npm pack --dry-run --ignore-scripts",
37
+ "release:publish": "npm publish --access public --ignore-scripts --registry=https://registry.npmjs.org/",
38
+ "release:verify": "npm view @lumenchain/langchain-gigachat version --registry=https://registry.npmjs.org/"
32
39
  },
33
- "author": "Mikelarg",
40
+ "author": "Mikelarg, Mrikaev K.",
34
41
  "license": "MIT",
35
42
  "keywords": [
36
43
  "llm",
@@ -114,15 +121,7 @@
114
121
  "./package.json": "./package.json"
115
122
  },
116
123
  "files": [
117
- "dist/chat_models.cjs",
118
- "dist/chat_models.d.ts",
119
- "dist/chat_models.js",
120
- "dist/embeddings.cjs",
121
- "dist/embeddings.d.ts",
122
- "dist/embeddings.js",
123
- "dist/index.cjs",
124
- "dist/index.d.ts",
125
- "dist/index.js",
124
+ "dist/",
126
125
  "chat_models.cjs",
127
126
  "chat_models.js",
128
127
  "chat_models.d.ts",