@langchain/core 1.1.1 → 1.1.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.
Files changed (233) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/agents.d.cts +0 -2
  3. package/dist/agents.d.ts +0 -2
  4. package/dist/callbacks/base.d.cts +22 -60
  5. package/dist/callbacks/base.d.ts +22 -60
  6. package/dist/callbacks/dispatch/index.d.cts +1 -3
  7. package/dist/callbacks/dispatch/index.d.ts +1 -3
  8. package/dist/callbacks/dispatch/web.d.cts +1 -3
  9. package/dist/callbacks/dispatch/web.d.ts +1 -3
  10. package/dist/callbacks/manager.d.cts +2 -12
  11. package/dist/callbacks/manager.d.ts +2 -12
  12. package/dist/chat_history.cjs +1 -1
  13. package/dist/chat_history.d.cts +0 -1
  14. package/dist/chat_history.d.ts +0 -1
  15. package/dist/chat_history.js +1 -1
  16. package/dist/document_loaders/langsmith.d.cts +0 -3
  17. package/dist/document_loaders/langsmith.d.ts +0 -3
  18. package/dist/documents/document.d.cts +3 -12
  19. package/dist/documents/document.d.ts +3 -12
  20. package/dist/example_selectors/length_based.d.cts +1 -1
  21. package/dist/example_selectors/length_based.d.ts +1 -1
  22. package/dist/indexing/base.d.cts +0 -1
  23. package/dist/indexing/base.d.ts +0 -1
  24. package/dist/indexing/record_manager.d.cts +0 -1
  25. package/dist/indexing/record_manager.d.ts +0 -1
  26. package/dist/language_models/base.d.cts +8 -38
  27. package/dist/language_models/base.d.ts +8 -38
  28. package/dist/language_models/chat_models.cjs +1 -1
  29. package/dist/language_models/chat_models.d.cts +6 -33
  30. package/dist/language_models/chat_models.d.ts +6 -33
  31. package/dist/language_models/chat_models.js +1 -1
  32. package/dist/language_models/llms.d.cts +0 -6
  33. package/dist/language_models/llms.d.ts +0 -6
  34. package/dist/load/import_type.d.cts +0 -1
  35. package/dist/load/import_type.d.ts +0 -1
  36. package/dist/load/map_keys.cjs +4 -5
  37. package/dist/load/map_keys.cjs.map +1 -1
  38. package/dist/load/map_keys.d.cts +0 -1
  39. package/dist/load/map_keys.d.ts +0 -1
  40. package/dist/load/map_keys.js +3 -3
  41. package/dist/load/map_keys.js.map +1 -1
  42. package/dist/load/serializable.d.cts +0 -1
  43. package/dist/load/serializable.d.ts +0 -1
  44. package/dist/memory.d.cts +0 -3
  45. package/dist/memory.d.ts +0 -3
  46. package/dist/messages/ai.cjs +6 -48
  47. package/dist/messages/ai.cjs.map +1 -1
  48. package/dist/messages/ai.js +6 -48
  49. package/dist/messages/ai.js.map +1 -1
  50. package/dist/messages/base.cjs +3 -2
  51. package/dist/messages/base.cjs.map +1 -1
  52. package/dist/messages/base.d.cts +1 -13
  53. package/dist/messages/base.d.ts +1 -13
  54. package/dist/messages/base.js +3 -2
  55. package/dist/messages/base.js.map +1 -1
  56. package/dist/messages/content/data.d.cts +2 -7
  57. package/dist/messages/content/data.d.ts +2 -7
  58. package/dist/messages/content/index.d.cts +1 -4
  59. package/dist/messages/content/index.d.ts +1 -4
  60. package/dist/messages/content/multimodal.d.cts +0 -1
  61. package/dist/messages/content/multimodal.d.ts +0 -1
  62. package/dist/messages/content/tools.d.cts +0 -1
  63. package/dist/messages/content/tools.d.ts +0 -1
  64. package/dist/messages/index.cjs +4 -2
  65. package/dist/messages/index.d.cts +2 -2
  66. package/dist/messages/index.d.ts +2 -2
  67. package/dist/messages/index.js +5 -4
  68. package/dist/messages/tool.d.cts +2 -9
  69. package/dist/messages/tool.d.ts +2 -9
  70. package/dist/messages/transformers.cjs +2 -2
  71. package/dist/messages/transformers.d.cts +0 -3
  72. package/dist/messages/transformers.d.ts +0 -3
  73. package/dist/messages/transformers.js +2 -2
  74. package/dist/messages/utils.cjs +77 -4
  75. package/dist/messages/utils.cjs.map +1 -1
  76. package/dist/messages/utils.d.cts +35 -7
  77. package/dist/messages/utils.d.ts +35 -7
  78. package/dist/messages/utils.js +77 -5
  79. package/dist/messages/utils.js.map +1 -1
  80. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.cjs +169 -0
  81. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.cjs.map +1 -0
  82. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js +168 -0
  83. package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js.map +1 -0
  84. package/dist/node_modules/.pnpm/camelcase@9.0.0/node_modules/camelcase/index.cjs +122 -0
  85. package/dist/node_modules/.pnpm/camelcase@9.0.0/node_modules/camelcase/index.cjs.map +1 -0
  86. package/dist/node_modules/.pnpm/camelcase@9.0.0/node_modules/camelcase/index.js +121 -0
  87. package/dist/node_modules/.pnpm/camelcase@9.0.0/node_modules/camelcase/index.js.map +1 -0
  88. package/dist/node_modules/.pnpm/decamelize@6.0.1/node_modules/decamelize/index.cjs +18 -0
  89. package/dist/node_modules/.pnpm/decamelize@6.0.1/node_modules/decamelize/index.cjs.map +1 -0
  90. package/dist/node_modules/.pnpm/decamelize@6.0.1/node_modules/decamelize/index.js +17 -0
  91. package/dist/node_modules/.pnpm/decamelize@6.0.1/node_modules/decamelize/index.js.map +1 -0
  92. package/dist/node_modules/.pnpm/is-network-error@1.3.0/node_modules/is-network-error/index.cjs +27 -0
  93. package/dist/node_modules/.pnpm/is-network-error@1.3.0/node_modules/is-network-error/index.cjs.map +1 -0
  94. package/dist/node_modules/.pnpm/is-network-error@1.3.0/node_modules/is-network-error/index.js +26 -0
  95. package/dist/node_modules/.pnpm/is-network-error@1.3.0/node_modules/is-network-error/index.js.map +1 -0
  96. package/dist/node_modules/.pnpm/p-retry@7.1.0/node_modules/p-retry/index.cjs +141 -0
  97. package/dist/node_modules/.pnpm/p-retry@7.1.0/node_modules/p-retry/index.cjs.map +1 -0
  98. package/dist/node_modules/.pnpm/p-retry@7.1.0/node_modules/p-retry/index.js +141 -0
  99. package/dist/node_modules/.pnpm/p-retry@7.1.0/node_modules/p-retry/index.js.map +1 -0
  100. package/dist/output_parsers/json.cjs.map +1 -1
  101. package/dist/output_parsers/json.d.cts +1 -5
  102. package/dist/output_parsers/json.d.ts +1 -5
  103. package/dist/output_parsers/json.js.map +1 -1
  104. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts +2 -6
  105. package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts +2 -6
  106. package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts +10 -34
  107. package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts +10 -34
  108. package/dist/output_parsers/transform.d.cts +0 -1
  109. package/dist/output_parsers/transform.d.ts +0 -1
  110. package/dist/outputs.d.cts +0 -6
  111. package/dist/outputs.d.ts +0 -6
  112. package/dist/prompts/base.d.cts +2 -10
  113. package/dist/prompts/base.d.ts +2 -10
  114. package/dist/prompts/chat.cjs +2 -2
  115. package/dist/prompts/chat.d.cts +13 -51
  116. package/dist/prompts/chat.d.ts +13 -51
  117. package/dist/prompts/chat.js +2 -2
  118. package/dist/prompts/few_shot.d.cts +1 -5
  119. package/dist/prompts/few_shot.d.ts +1 -5
  120. package/dist/prompts/image.d.cts +2 -10
  121. package/dist/prompts/image.d.ts +2 -10
  122. package/dist/prompts/prompt.d.cts +4 -15
  123. package/dist/prompts/prompt.d.ts +4 -16
  124. package/dist/prompts/serde.d.cts +0 -1
  125. package/dist/prompts/serde.d.ts +0 -1
  126. package/dist/prompts/string.d.cts +1 -5
  127. package/dist/prompts/string.d.ts +1 -5
  128. package/dist/prompts/structured.d.cts +3 -16
  129. package/dist/prompts/structured.d.ts +3 -16
  130. package/dist/retrievers/document_compressors/index.d.cts +0 -1
  131. package/dist/retrievers/document_compressors/index.d.ts +0 -1
  132. package/dist/retrievers/index.d.cts +2 -6
  133. package/dist/retrievers/index.d.ts +2 -6
  134. package/dist/runnables/base.cjs +7 -7
  135. package/dist/runnables/base.cjs.map +1 -1
  136. package/dist/runnables/base.d.cts +12 -64
  137. package/dist/runnables/base.d.ts +12 -64
  138. package/dist/runnables/base.js +1 -1
  139. package/dist/runnables/branch.d.cts +0 -2
  140. package/dist/runnables/branch.d.ts +0 -2
  141. package/dist/runnables/config.d.cts +0 -1
  142. package/dist/runnables/config.d.ts +0 -1
  143. package/dist/runnables/graph.d.cts +1 -5
  144. package/dist/runnables/graph.d.ts +1 -5
  145. package/dist/runnables/graph_mermaid.cjs +2 -1
  146. package/dist/runnables/graph_mermaid.cjs.map +1 -1
  147. package/dist/runnables/graph_mermaid.js +3 -1
  148. package/dist/runnables/graph_mermaid.js.map +1 -1
  149. package/dist/runnables/history.cjs +1 -1
  150. package/dist/runnables/history.d.cts +4 -12
  151. package/dist/runnables/history.d.ts +4 -12
  152. package/dist/runnables/history.js +1 -1
  153. package/dist/runnables/passthrough.d.cts +0 -2
  154. package/dist/runnables/passthrough.d.ts +0 -2
  155. package/dist/runnables/router.d.cts +0 -1
  156. package/dist/runnables/router.d.ts +0 -1
  157. package/dist/runnables/types.d.cts +2 -9
  158. package/dist/runnables/types.d.ts +2 -9
  159. package/dist/runnables/utils.cjs +5 -0
  160. package/dist/runnables/utils.cjs.map +1 -1
  161. package/dist/runnables/utils.js +5 -1
  162. package/dist/runnables/utils.js.map +1 -1
  163. package/dist/singletons/async_local_storage/context.d.cts +0 -2
  164. package/dist/singletons/async_local_storage/context.d.ts +0 -2
  165. package/dist/singletons/async_local_storage/globals.d.cts +0 -1
  166. package/dist/singletons/async_local_storage/globals.d.ts +0 -1
  167. package/dist/singletons/callbacks.cjs.map +1 -1
  168. package/dist/singletons/callbacks.js.map +1 -1
  169. package/dist/stores.d.cts +0 -1
  170. package/dist/stores.d.ts +0 -1
  171. package/dist/structured_query/utils.d.cts +1 -4
  172. package/dist/structured_query/utils.d.ts +1 -4
  173. package/dist/tools/index.d.cts +1 -6
  174. package/dist/tools/index.d.ts +1 -6
  175. package/dist/tools/types.d.cts +3 -13
  176. package/dist/tools/types.d.ts +3 -13
  177. package/dist/tracers/base.d.cts +1 -20
  178. package/dist/tracers/base.d.ts +1 -20
  179. package/dist/tracers/console.cjs +3 -3
  180. package/dist/tracers/console.cjs.map +1 -1
  181. package/dist/tracers/console.d.cts +0 -2
  182. package/dist/tracers/console.d.ts +0 -2
  183. package/dist/tracers/console.js +3 -3
  184. package/dist/tracers/console.js.map +1 -1
  185. package/dist/tracers/event_stream.d.cts +0 -4
  186. package/dist/tracers/event_stream.d.ts +0 -4
  187. package/dist/tracers/log_stream.d.cts +0 -6
  188. package/dist/tracers/log_stream.d.ts +0 -6
  189. package/dist/types/_internal.d.cts +0 -3
  190. package/dist/types/_internal.d.ts +0 -3
  191. package/dist/types/type-utils.d.cts +0 -2
  192. package/dist/types/type-utils.d.ts +0 -2
  193. package/dist/utils/async_caller.cjs +2 -7
  194. package/dist/utils/async_caller.cjs.map +1 -1
  195. package/dist/utils/async_caller.d.cts +0 -3
  196. package/dist/utils/async_caller.d.ts +0 -3
  197. package/dist/utils/async_caller.js +1 -6
  198. package/dist/utils/async_caller.js.map +1 -1
  199. package/dist/utils/env.d.cts +0 -4
  200. package/dist/utils/env.d.ts +0 -4
  201. package/dist/utils/event_source_parse.d.cts +1 -4
  202. package/dist/utils/event_source_parse.d.ts +1 -4
  203. package/dist/utils/function_calling.d.cts +1 -3
  204. package/dist/utils/function_calling.d.ts +1 -3
  205. package/dist/utils/json.cjs +182 -22
  206. package/dist/utils/json.cjs.map +1 -1
  207. package/dist/utils/json.d.cts +1 -3
  208. package/dist/utils/json.d.ts +1 -3
  209. package/dist/utils/json.js +182 -22
  210. package/dist/utils/json.js.map +1 -1
  211. package/dist/utils/stream.d.cts +1 -13
  212. package/dist/utils/stream.d.ts +1 -13
  213. package/dist/utils/testing/chat_models.d.cts +3 -11
  214. package/dist/utils/testing/chat_models.d.ts +3 -11
  215. package/dist/utils/testing/message_history.cjs +1 -1
  216. package/dist/utils/testing/message_history.js +1 -1
  217. package/dist/utils/testing/retrievers.d.cts +1 -3
  218. package/dist/utils/testing/retrievers.d.ts +1 -3
  219. package/dist/utils/testing/vectorstores.d.cts +0 -1
  220. package/dist/utils/testing/vectorstores.d.ts +0 -1
  221. package/dist/utils/types/index.cjs +4 -0
  222. package/dist/utils/types/index.d.cts +2 -4
  223. package/dist/utils/types/index.d.ts +2 -4
  224. package/dist/utils/types/index.js +4 -2
  225. package/dist/utils/types/zod.cjs +24 -0
  226. package/dist/utils/types/zod.cjs.map +1 -1
  227. package/dist/utils/types/zod.d.cts +4 -4
  228. package/dist/utils/types/zod.d.ts +4 -4
  229. package/dist/utils/types/zod.js +23 -1
  230. package/dist/utils/types/zod.js.map +1 -1
  231. package/dist/vectorstores.d.cts +5 -17
  232. package/dist/vectorstores.d.ts +5 -17
  233. package/package.json +6 -6
@@ -9,7 +9,6 @@ import { BaseRetriever, BaseRetrieverInput, BaseRetrieverInterface } from "./ret
9
9
  /**
10
10
  * Type for options when adding a document to the VectorStore.
11
11
  */
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
12
  type AddDocumentOptions = Record<string, any>;
14
13
  /**
15
14
  * Options for configuring a maximal marginal relevance (MMR) search.
@@ -340,7 +339,6 @@ interface VectorStoreInterface extends Serializable {
340
339
  * the conditions for selecting documents to delete.
341
340
  * @returns A promise that resolves once the deletion operation is complete.
342
341
  */
343
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
344
342
  delete(_params?: Record<string, any>): Promise<void>;
345
343
  /**
346
344
  * Searches for documents similar to a given vector query and returns them
@@ -432,7 +430,6 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
432
430
  *
433
431
  * @internal
434
432
  */
435
- // Only ever instantiated in main LangChain
436
433
  lc_namespace: string[];
437
434
  /**
438
435
  * Embeddings interface for generating vector embeddings from text queries,
@@ -445,7 +442,6 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
445
442
  * @param embeddings - Instance of `EmbeddingsInterface` used to embed queries.
446
443
  * @param dbConfig - Configuration settings for the database or storage system.
447
444
  */
448
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
449
445
  constructor(embeddings: EmbeddingsInterface, dbConfig: Record<string, any>);
450
446
  /**
451
447
  * Returns a string representing the type of vector store, which subclasses
@@ -481,7 +477,6 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
481
477
  * @param _params - Flexible key-value pairs defining conditions for document deletion.
482
478
  * @returns A promise that resolves once the deletion is complete.
483
479
  */
484
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
485
480
  delete(_params?: Record<string, any>): Promise<void>;
486
481
  /**
487
482
  * Performs a similarity search using a vector query and returns results
@@ -504,8 +499,7 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
504
499
  * @param _callbacks - Optional callbacks for monitoring search progress
505
500
  * @returns A promise resolving to an array of `DocumentInterface` instances representing similar documents.
506
501
  */
507
- similaritySearch(query: string, k?: number, filter?: this["FilterType"] | undefined, _callbacks?: Callbacks | undefined // implement passing to embedQuery later
508
- ): Promise<DocumentInterface[]>;
502
+ similaritySearch(query: string, k?: number, filter?: this["FilterType"] | undefined, _callbacks?: Callbacks | undefined): Promise<DocumentInterface[]>;
509
503
  /**
510
504
  * Searches for documents similar to a text query by embedding the query,
511
505
  * and returns results with similarity scores.
@@ -517,8 +511,7 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
517
511
  * @returns A promise resolving to an array of tuples, each containing a
518
512
  * document and its similarity score.
519
513
  */
520
- similaritySearchWithScore(query: string, k?: number, filter?: this["FilterType"] | undefined, _callbacks?: Callbacks | undefined // implement passing to embedQuery later
521
- ): Promise<[DocumentInterface, number][]>;
514
+ similaritySearchWithScore(query: string, k?: number, filter?: this["FilterType"] | undefined, _callbacks?: Callbacks | undefined): Promise<[DocumentInterface, number][]>;
522
515
  /**
523
516
  * Return documents selected using the maximal marginal relevance.
524
517
  * Maximal marginal relevance optimizes for similarity to the query AND diversity
@@ -534,8 +527,7 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
534
527
  *
535
528
  * @returns {Promise<DocumentInterface[]>} - List of documents selected by maximal marginal relevance.
536
529
  */
537
- maxMarginalRelevanceSearch?(query: string, options: MaxMarginalRelevanceSearchOptions<this["FilterType"]>, _callbacks: Callbacks | undefined // implement passing to embedQuery later
538
- ): Promise<DocumentInterface[]>;
530
+ maxMarginalRelevanceSearch?(query: string, options: MaxMarginalRelevanceSearchOptions<this["FilterType"]>, _callbacks: Callbacks | undefined): Promise<DocumentInterface[]>;
539
531
  /**
540
532
  * Creates a `VectorStore` instance from an array of text strings and optional
541
533
  * metadata, using the specified embeddings and database configuration.
@@ -551,9 +543,7 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
551
543
  * @returns A promise that resolves to a new `VectorStore` instance.
552
544
  * @throws {Error} Throws an error if this method is not overridden by a subclass.
553
545
  */
554
- static fromTexts(_texts: string[], _metadatas: object[] | object, _embeddings: EmbeddingsInterface,
555
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
556
- _dbConfig: Record<string, any>): Promise<VectorStore>;
546
+ static fromTexts(_texts: string[], _metadatas: object[] | object, _embeddings: EmbeddingsInterface, _dbConfig: Record<string, any>): Promise<VectorStore>;
557
547
  /**
558
548
  * Creates a `VectorStore` instance from an array of documents, using the specified
559
549
  * embeddings and database configuration.
@@ -567,9 +557,7 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
567
557
  * @returns A promise that resolves to a new `VectorStore` instance.
568
558
  * @throws {Error} Throws an error if this method is not overridden by a subclass.
569
559
  */
570
- static fromDocuments(_docs: DocumentInterface[], _embeddings: EmbeddingsInterface,
571
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
572
- _dbConfig: Record<string, any>): Promise<VectorStore>;
560
+ static fromDocuments(_docs: DocumentInterface[], _embeddings: EmbeddingsInterface, _dbConfig: Record<string, any>): Promise<VectorStore>;
573
561
  /**
574
562
  * Creates a `VectorStoreRetriever` instance with flexible configuration options.
575
563
  *
@@ -9,7 +9,6 @@ import { BaseRetriever, BaseRetrieverInput, BaseRetrieverInterface } from "./ret
9
9
  /**
10
10
  * Type for options when adding a document to the VectorStore.
11
11
  */
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
12
  type AddDocumentOptions = Record<string, any>;
14
13
  /**
15
14
  * Options for configuring a maximal marginal relevance (MMR) search.
@@ -340,7 +339,6 @@ interface VectorStoreInterface extends Serializable {
340
339
  * the conditions for selecting documents to delete.
341
340
  * @returns A promise that resolves once the deletion operation is complete.
342
341
  */
343
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
344
342
  delete(_params?: Record<string, any>): Promise<void>;
345
343
  /**
346
344
  * Searches for documents similar to a given vector query and returns them
@@ -432,7 +430,6 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
432
430
  *
433
431
  * @internal
434
432
  */
435
- // Only ever instantiated in main LangChain
436
433
  lc_namespace: string[];
437
434
  /**
438
435
  * Embeddings interface for generating vector embeddings from text queries,
@@ -445,7 +442,6 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
445
442
  * @param embeddings - Instance of `EmbeddingsInterface` used to embed queries.
446
443
  * @param dbConfig - Configuration settings for the database or storage system.
447
444
  */
448
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
449
445
  constructor(embeddings: EmbeddingsInterface, dbConfig: Record<string, any>);
450
446
  /**
451
447
  * Returns a string representing the type of vector store, which subclasses
@@ -481,7 +477,6 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
481
477
  * @param _params - Flexible key-value pairs defining conditions for document deletion.
482
478
  * @returns A promise that resolves once the deletion is complete.
483
479
  */
484
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
485
480
  delete(_params?: Record<string, any>): Promise<void>;
486
481
  /**
487
482
  * Performs a similarity search using a vector query and returns results
@@ -504,8 +499,7 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
504
499
  * @param _callbacks - Optional callbacks for monitoring search progress
505
500
  * @returns A promise resolving to an array of `DocumentInterface` instances representing similar documents.
506
501
  */
507
- similaritySearch(query: string, k?: number, filter?: this["FilterType"] | undefined, _callbacks?: Callbacks | undefined // implement passing to embedQuery later
508
- ): Promise<DocumentInterface[]>;
502
+ similaritySearch(query: string, k?: number, filter?: this["FilterType"] | undefined, _callbacks?: Callbacks | undefined): Promise<DocumentInterface[]>;
509
503
  /**
510
504
  * Searches for documents similar to a text query by embedding the query,
511
505
  * and returns results with similarity scores.
@@ -517,8 +511,7 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
517
511
  * @returns A promise resolving to an array of tuples, each containing a
518
512
  * document and its similarity score.
519
513
  */
520
- similaritySearchWithScore(query: string, k?: number, filter?: this["FilterType"] | undefined, _callbacks?: Callbacks | undefined // implement passing to embedQuery later
521
- ): Promise<[DocumentInterface, number][]>;
514
+ similaritySearchWithScore(query: string, k?: number, filter?: this["FilterType"] | undefined, _callbacks?: Callbacks | undefined): Promise<[DocumentInterface, number][]>;
522
515
  /**
523
516
  * Return documents selected using the maximal marginal relevance.
524
517
  * Maximal marginal relevance optimizes for similarity to the query AND diversity
@@ -534,8 +527,7 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
534
527
  *
535
528
  * @returns {Promise<DocumentInterface[]>} - List of documents selected by maximal marginal relevance.
536
529
  */
537
- maxMarginalRelevanceSearch?(query: string, options: MaxMarginalRelevanceSearchOptions<this["FilterType"]>, _callbacks: Callbacks | undefined // implement passing to embedQuery later
538
- ): Promise<DocumentInterface[]>;
530
+ maxMarginalRelevanceSearch?(query: string, options: MaxMarginalRelevanceSearchOptions<this["FilterType"]>, _callbacks: Callbacks | undefined): Promise<DocumentInterface[]>;
539
531
  /**
540
532
  * Creates a `VectorStore` instance from an array of text strings and optional
541
533
  * metadata, using the specified embeddings and database configuration.
@@ -551,9 +543,7 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
551
543
  * @returns A promise that resolves to a new `VectorStore` instance.
552
544
  * @throws {Error} Throws an error if this method is not overridden by a subclass.
553
545
  */
554
- static fromTexts(_texts: string[], _metadatas: object[] | object, _embeddings: EmbeddingsInterface,
555
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
556
- _dbConfig: Record<string, any>): Promise<VectorStore>;
546
+ static fromTexts(_texts: string[], _metadatas: object[] | object, _embeddings: EmbeddingsInterface, _dbConfig: Record<string, any>): Promise<VectorStore>;
557
547
  /**
558
548
  * Creates a `VectorStore` instance from an array of documents, using the specified
559
549
  * embeddings and database configuration.
@@ -567,9 +557,7 @@ declare abstract class VectorStore extends Serializable implements VectorStoreIn
567
557
  * @returns A promise that resolves to a new `VectorStore` instance.
568
558
  * @throws {Error} Throws an error if this method is not overridden by a subclass.
569
559
  */
570
- static fromDocuments(_docs: DocumentInterface[], _embeddings: EmbeddingsInterface,
571
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
572
- _dbConfig: Record<string, any>): Promise<VectorStore>;
560
+ static fromDocuments(_docs: DocumentInterface[], _embeddings: EmbeddingsInterface, _dbConfig: Record<string, any>): Promise<VectorStore>;
573
561
  /**
574
562
  * Creates a `VectorStoreRetriever` instance with flexible configuration options.
575
563
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/core",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Core LangChain.js abstractions and schemas",
5
5
  "type": "module",
6
6
  "engines": {
@@ -17,14 +17,10 @@
17
17
  "license": "MIT",
18
18
  "dependencies": {
19
19
  "@cfworker/json-schema": "^4.0.2",
20
- "ansi-styles": "^5.0.0",
21
- "camelcase": "6",
22
- "decamelize": "1.2.0",
23
20
  "js-tiktoken": "^1.0.12",
24
21
  "langsmith": "^0.3.64",
25
22
  "mustache": "^4.2.0",
26
- "p-queue": "^6.6.2",
27
- "p-retry": "^7.0.0",
23
+ "p-queue": "^9.0.1",
28
24
  "uuid": "^10.0.0",
29
25
  "zod": "^3.25.76 || ^4"
30
26
  },
@@ -32,10 +28,14 @@
32
28
  "@types/decamelize": "^1.2.0",
33
29
  "@types/mustache": "^4",
34
30
  "@types/uuid": "^10.0.0",
31
+ "ansi-styles": "^6.2.3",
32
+ "camelcase": "^9.0.0",
33
+ "decamelize": "^6.0.1",
35
34
  "dotenv": "^17.2.1",
36
35
  "dpdm": "^3.14.0",
37
36
  "eslint": "^9.34.0",
38
37
  "ml-matrix": "^6.10.4",
38
+ "p-retry": "^7.0.0",
39
39
  "prettier": "^2.8.3",
40
40
  "rimraf": "^5.0.1",
41
41
  "typescript": "~5.8.3",