@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 +1 -1
- package/dist/prompts/chat.cjs +1 -1
- package/dist/prompts/chat.js +1 -1
- package/package.json +1 -1
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
|
-

|
|
89
89
|
|
|
90
90
|
## 📕 Releases & Versioning
|
|
91
91
|
|
package/dist/prompts/chat.cjs
CHANGED
|
@@ -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
|
}
|
package/dist/prompts/chat.js
CHANGED
|
@@ -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
|
}
|