@langchain/core 0.1.30 → 0.1.31

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/README.md CHANGED
@@ -85,7 +85,7 @@ Rather than having to write multiple implementations for all of those, LCEL allo
85
85
 
86
86
  For more check out the [LCEL docs](https://js.langchain.com/docs/expression_language/).
87
87
 
88
- ![LangChain Stack](../docs/core_docs/static/img/langchain_stack.png)
88
+ ![LangChain Stack](../docs/core_docs/static/img/langchain_stack_feb_2024.webp)
89
89
 
90
90
  ## 📕 Releases & Versioning
91
91
 
@@ -308,7 +308,7 @@ class _StringImageMessagePromptTemplate extends BaseMessagePromptTemplate {
308
308
  if (typeof imgTemplate === "string") {
309
309
  const parsedTemplate = (0, template_js_1.parseFString)(imgTemplate);
310
310
  const variables = parsedTemplate.flatMap((item) => item.type === "variable" ? [item.name] : []);
311
- if (variables) {
311
+ if ((variables?.length ?? 0) > 0) {
312
312
  if (variables.length > 1) {
313
313
  throw new Error(`Only one format variable allowed per image template.\nGot: ${variables}\nFrom: ${imgTemplate}`);
314
314
  }
@@ -300,7 +300,7 @@ class _StringImageMessagePromptTemplate extends BaseMessagePromptTemplate {
300
300
  if (typeof imgTemplate === "string") {
301
301
  const parsedTemplate = parseFString(imgTemplate);
302
302
  const variables = parsedTemplate.flatMap((item) => item.type === "variable" ? [item.name] : []);
303
- if (variables) {
303
+ if ((variables?.length ?? 0) > 0) {
304
304
  if (variables.length > 1) {
305
305
  throw new Error(`Only one format variable allowed per image template.\nGot: ${variables}\nFrom: ${imgTemplate}`);
306
306
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/core",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "Core LangChain.js abstractions and schemas",
5
5
  "type": "module",
6
6
  "engines": {