langchain 0.0.195 → 0.0.197-rc.0
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/LICENSE +21 -0
- package/dist/agents/openai/index.cjs +6 -2
- package/dist/agents/openai/index.js +6 -2
- package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.ts +1 -1
- package/dist/base_language/count_tokens.cjs +5 -70
- package/dist/base_language/count_tokens.d.ts +1 -10
- package/dist/base_language/count_tokens.js +1 -65
- package/dist/base_language/index.cjs +6 -196
- package/dist/base_language/index.d.ts +1 -111
- package/dist/base_language/index.js +1 -191
- package/dist/cache/base.cjs +15 -37
- package/dist/cache/base.d.ts +1 -20
- package/dist/cache/base.js +1 -33
- package/dist/cache/index.cjs +2 -46
- package/dist/cache/index.d.ts +1 -29
- package/dist/cache/index.js +1 -45
- package/dist/callbacks/base.cjs +3 -139
- package/dist/callbacks/base.d.ts +1 -266
- package/dist/callbacks/base.js +1 -126
- package/dist/callbacks/handlers/console.cjs +14 -221
- package/dist/callbacks/handlers/console.d.ts +1 -117
- package/dist/callbacks/handlers/console.js +1 -217
- package/dist/callbacks/handlers/initialize.cjs +15 -30
- package/dist/callbacks/handlers/initialize.d.ts +1 -16
- package/dist/callbacks/handlers/initialize.js +1 -27
- package/dist/callbacks/handlers/log_stream.cjs +15 -293
- package/dist/callbacks/handlers/log_stream.d.ts +1 -100
- package/dist/callbacks/handlers/log_stream.js +1 -289
- package/dist/callbacks/handlers/run_collector.cjs +15 -48
- package/dist/callbacks/handlers/run_collector.d.ts +1 -26
- package/dist/callbacks/handlers/run_collector.js +1 -46
- package/dist/callbacks/handlers/tracer.cjs +15 -375
- package/dist/callbacks/handlers/tracer.d.ts +1 -70
- package/dist/callbacks/handlers/tracer.js +1 -373
- package/dist/callbacks/handlers/tracer_langchain.cjs +15 -104
- package/dist/callbacks/handlers/tracer_langchain.d.ts +1 -41
- package/dist/callbacks/handlers/tracer_langchain.js +1 -102
- package/dist/callbacks/handlers/tracer_langchain_v1.cjs +15 -197
- package/dist/callbacks/handlers/tracer_langchain_v1.d.ts +1 -57
- package/dist/callbacks/handlers/tracer_langchain_v1.js +1 -195
- package/dist/callbacks/manager.cjs +15 -676
- package/dist/callbacks/manager.d.ts +1 -180
- package/dist/callbacks/manager.js +1 -666
- package/dist/callbacks/promises.cjs +14 -42
- package/dist/callbacks/promises.d.ts +1 -11
- package/dist/callbacks/promises.js +1 -37
- package/dist/chains/graph_qa/prompts.d.ts +1 -1
- package/dist/chains/openai_functions/structured_output.cjs +2 -2
- package/dist/chains/openai_functions/structured_output.d.ts +1 -1
- package/dist/chains/openai_functions/structured_output.js +1 -1
- package/dist/chat_models/anthropic.cjs +15 -348
- package/dist/chat_models/anthropic.d.ts +1 -156
- package/dist/chat_models/anthropic.js +1 -346
- package/dist/chat_models/baiduwenxin.d.ts +1 -1
- package/dist/chat_models/base.cjs +15 -296
- package/dist/chat_models/base.d.ts +1 -122
- package/dist/chat_models/base.js +1 -292
- package/dist/chat_models/bedrock/web.cjs +21 -1
- package/dist/chat_models/bedrock/web.d.ts +2 -2
- package/dist/chat_models/bedrock/web.js +21 -1
- package/dist/chat_models/fireworks.d.ts +1 -1
- package/dist/document.cjs +2 -24
- package/dist/document.d.ts +1 -12
- package/dist/document.js +1 -23
- package/dist/document_loaders/web/azure_blob_storage_file.d.ts +1 -1
- package/dist/document_loaders/web/github.cjs +105 -0
- package/dist/document_loaders/web/github.d.ts +26 -0
- package/dist/document_loaders/web/github.js +105 -0
- package/dist/document_loaders/web/s3.d.ts +1 -1
- package/dist/embeddings/base.cjs +15 -22
- package/dist/embeddings/base.d.ts +1 -33
- package/dist/embeddings/base.js +1 -20
- package/dist/embeddings/cache_backed.cjs +2 -2
- package/dist/embeddings/cache_backed.js +1 -1
- package/dist/evaluation/agents/trajectory.d.ts +1 -1
- package/dist/evaluation/criteria/prompt.d.ts +2 -2
- package/dist/evaluation/qa/prompt.d.ts +2 -2
- package/dist/experimental/hubs/makersuite/googlemakersuitehub.d.ts +1 -1
- package/dist/experimental/plan_and_execute/prompt.d.ts +1 -1
- package/dist/llms/base.cjs +15 -278
- package/dist/llms/base.d.ts +1 -115
- package/dist/llms/base.js +1 -275
- package/dist/llms/bedrock/web.cjs +21 -1
- package/dist/llms/bedrock/web.d.ts +2 -2
- package/dist/llms/bedrock/web.js +21 -1
- package/dist/llms/fireworks.d.ts +1 -1
- package/dist/load/import_map.cjs +2 -1
- package/dist/load/import_map.d.ts +1 -0
- package/dist/load/import_map.js +1 -0
- package/dist/load/index.cjs +7 -148
- package/dist/load/index.js +7 -148
- package/dist/load/map_keys.cjs +0 -24
- package/dist/load/map_keys.d.ts +0 -6
- package/dist/load/map_keys.js +1 -17
- package/dist/load/serializable.cjs +15 -178
- package/dist/load/serializable.d.ts +1 -66
- package/dist/load/serializable.js +1 -175
- package/dist/memory/base.cjs +17 -92
- package/dist/memory/base.d.ts +2 -68
- package/dist/memory/base.js +2 -87
- package/dist/output_parsers/list.cjs +4 -122
- package/dist/output_parsers/list.d.ts +1 -57
- package/dist/output_parsers/list.js +1 -119
- package/dist/output_parsers/openai_functions.cjs +2 -2
- package/dist/output_parsers/openai_functions.d.ts +1 -1
- package/dist/output_parsers/openai_functions.js +1 -1
- package/dist/output_parsers/regex.d.ts +1 -1
- package/dist/output_parsers/structured.d.ts +1 -1
- package/dist/prompts/base.cjs +8 -183
- package/dist/prompts/base.d.ts +3 -132
- package/dist/prompts/base.js +3 -178
- package/dist/prompts/chat.cjs +13 -477
- package/dist/prompts/chat.d.ts +2 -219
- package/dist/prompts/chat.js +2 -466
- package/dist/prompts/few_shot.cjs +3 -352
- package/dist/prompts/few_shot.d.ts +1 -192
- package/dist/prompts/few_shot.js +1 -350
- package/dist/prompts/index.cjs +3 -2
- package/dist/prompts/index.d.ts +2 -1
- package/dist/prompts/index.js +2 -1
- package/dist/prompts/pipeline.cjs +2 -141
- package/dist/prompts/pipeline.d.ts +1 -98
- package/dist/prompts/pipeline.js +1 -140
- package/dist/prompts/prompt.cjs +2 -145
- package/dist/prompts/prompt.d.ts +1 -92
- package/dist/prompts/prompt.js +1 -144
- package/dist/prompts/selectors/LengthBasedExampleSelector.cjs +2 -147
- package/dist/prompts/selectors/LengthBasedExampleSelector.d.ts +1 -89
- package/dist/prompts/selectors/LengthBasedExampleSelector.js +1 -146
- package/dist/prompts/selectors/SemanticSimilarityExampleSelector.cjs +15 -137
- package/dist/prompts/selectors/SemanticSimilarityExampleSelector.d.ts +1 -91
- package/dist/prompts/selectors/SemanticSimilarityExampleSelector.js +1 -135
- package/dist/prompts/selectors/conditional.cjs +5 -73
- package/dist/prompts/selectors/conditional.d.ts +1 -63
- package/dist/prompts/selectors/conditional.js +1 -69
- package/dist/prompts/serde.d.ts +1 -43
- package/dist/prompts/template.cjs +8 -88
- package/dist/prompts/template.d.ts +1 -36
- package/dist/prompts/template.js +1 -83
- package/dist/{util/@cfworker/json-schema → runnables}/index.cjs +1 -1
- package/dist/runnables/index.d.ts +1 -0
- package/dist/runnables/index.js +1 -0
- package/dist/schema/document.cjs +3 -34
- package/dist/schema/document.d.ts +2 -29
- package/dist/schema/document.js +2 -32
- package/dist/schema/index.cjs +37 -612
- package/dist/schema/index.d.ts +11 -311
- package/dist/schema/index.js +8 -583
- package/dist/schema/output_parser.cjs +15 -309
- package/dist/schema/output_parser.d.ts +1 -173
- package/dist/schema/output_parser.js +1 -301
- package/dist/schema/retriever.cjs +15 -77
- package/dist/schema/retriever.d.ts +1 -43
- package/dist/schema/retriever.js +1 -75
- package/dist/schema/runnable/base.cjs +10 -1072
- package/dist/schema/runnable/base.d.ts +1 -356
- package/dist/schema/runnable/base.js +1 -1060
- package/dist/schema/runnable/branch.cjs +2 -131
- package/dist/schema/runnable/branch.d.ts +1 -94
- package/dist/schema/runnable/branch.js +1 -130
- package/dist/schema/runnable/config.cjs +0 -6
- package/dist/schema/runnable/config.d.ts +1 -3
- package/dist/schema/runnable/config.js +1 -4
- package/dist/schema/runnable/index.cjs +15 -16
- package/dist/schema/runnable/index.d.ts +1 -5
- package/dist/schema/runnable/index.js +1 -4
- package/dist/schema/runnable/passthrough.cjs +3 -113
- package/dist/schema/runnable/passthrough.d.ts +1 -72
- package/dist/schema/runnable/passthrough.js +1 -111
- package/dist/schema/runnable/router.cjs +2 -71
- package/dist/schema/runnable/router.d.ts +1 -29
- package/dist/schema/runnable/router.js +1 -70
- package/dist/schema/storage.cjs +15 -8
- package/dist/schema/storage.d.ts +1 -57
- package/dist/schema/storage.js +1 -6
- package/dist/tools/bingserpapi.d.ts +1 -1
- package/dist/tools/searchapi.d.ts +1 -1
- package/dist/tools/serpapi.d.ts +1 -1
- package/dist/tools/serper.d.ts +1 -1
- package/dist/util/async_caller.cjs +14 -128
- package/dist/util/async_caller.d.ts +1 -45
- package/dist/util/async_caller.js +1 -124
- package/dist/vectorstores/momento_vector_index.cjs +39 -0
- package/dist/vectorstores/momento_vector_index.d.ts +17 -1
- package/dist/vectorstores/momento_vector_index.js +40 -1
- package/dist/vectorstores/mongodb_atlas.cjs +22 -2
- package/dist/vectorstores/mongodb_atlas.d.ts +13 -0
- package/dist/vectorstores/mongodb_atlas.js +22 -2
- package/package.json +18 -11
- package/runnables.cjs +1 -0
- package/runnables.d.ts +1 -0
- package/runnables.js +1 -0
- package/dist/util/@cfworker/json-schema/index.d.ts +0 -1
- package/dist/util/@cfworker/json-schema/index.js +0 -1
- package/dist/util/@cfworker/json-schema/src/deep-compare-strict.cjs +0 -43
- package/dist/util/@cfworker/json-schema/src/deep-compare-strict.d.ts +0 -1
- package/dist/util/@cfworker/json-schema/src/deep-compare-strict.js +0 -39
- package/dist/util/@cfworker/json-schema/src/dereference.cjs +0 -169
- package/dist/util/@cfworker/json-schema/src/dereference.d.ts +0 -12
- package/dist/util/@cfworker/json-schema/src/dereference.js +0 -165
- package/dist/util/@cfworker/json-schema/src/format.cjs +0 -139
- package/dist/util/@cfworker/json-schema/src/format.d.ts +0 -2
- package/dist/util/@cfworker/json-schema/src/format.js +0 -136
- package/dist/util/@cfworker/json-schema/src/index.cjs +0 -24
- package/dist/util/@cfworker/json-schema/src/index.d.ts +0 -8
- package/dist/util/@cfworker/json-schema/src/index.js +0 -8
- package/dist/util/@cfworker/json-schema/src/pointer.cjs +0 -11
- package/dist/util/@cfworker/json-schema/src/pointer.d.ts +0 -2
- package/dist/util/@cfworker/json-schema/src/pointer.js +0 -6
- package/dist/util/@cfworker/json-schema/src/types.cjs +0 -2
- package/dist/util/@cfworker/json-schema/src/types.d.ts +0 -72
- package/dist/util/@cfworker/json-schema/src/types.js +0 -1
- package/dist/util/@cfworker/json-schema/src/ucs2-length.cjs +0 -28
- package/dist/util/@cfworker/json-schema/src/ucs2-length.d.ts +0 -6
- package/dist/util/@cfworker/json-schema/src/ucs2-length.js +0 -24
- package/dist/util/@cfworker/json-schema/src/validate.cjs +0 -808
- package/dist/util/@cfworker/json-schema/src/validate.d.ts +0 -3
- package/dist/util/@cfworker/json-schema/src/validate.js +0 -804
- package/dist/util/@cfworker/json-schema/src/validator.cjs +0 -44
- package/dist/util/@cfworker/json-schema/src/validator.d.ts +0 -10
- package/dist/util/@cfworker/json-schema/src/validator.js +0 -40
- package/dist/util/fast-json-patch/index.cjs +0 -49
- package/dist/util/fast-json-patch/index.d.ts +0 -22
- package/dist/util/fast-json-patch/index.js +0 -16
- package/dist/util/fast-json-patch/src/core.cjs +0 -469
- package/dist/util/fast-json-patch/src/core.d.ts +0 -111
- package/dist/util/fast-json-patch/src/core.js +0 -459
- package/dist/util/fast-json-patch/src/duplex.cjs +0 -237
- package/dist/util/fast-json-patch/src/duplex.d.ts +0 -23
- package/dist/util/fast-json-patch/src/duplex.js +0 -230
- package/dist/util/fast-json-patch/src/helpers.cjs +0 -194
- package/dist/util/fast-json-patch/src/helpers.d.ts +0 -36
- package/dist/util/fast-json-patch/src/helpers.js +0 -181
- package/dist/util/js-sha1/hash.cjs +0 -358
- package/dist/util/js-sha1/hash.d.ts +0 -1
- package/dist/util/js-sha1/hash.js +0 -355
package/dist/memory/base.js
CHANGED
|
@@ -1,87 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* the state in Chains. It can be used to store information about past
|
|
4
|
-
* executions of a Chain and inject that information into the inputs of
|
|
5
|
-
* future executions of the Chain.
|
|
6
|
-
*/
|
|
7
|
-
export class BaseMemory {
|
|
8
|
-
}
|
|
9
|
-
const getValue = (values, key) => {
|
|
10
|
-
if (key !== undefined) {
|
|
11
|
-
return values[key];
|
|
12
|
-
}
|
|
13
|
-
const keys = Object.keys(values);
|
|
14
|
-
if (keys.length === 1) {
|
|
15
|
-
return values[keys[0]];
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* This function is used by memory classes to select the input value
|
|
20
|
-
* to use for the memory. If there is only one input value, it is used.
|
|
21
|
-
* If there are multiple input values, the inputKey must be specified.
|
|
22
|
-
*/
|
|
23
|
-
export const getInputValue = (inputValues, inputKey) => {
|
|
24
|
-
const value = getValue(inputValues, inputKey);
|
|
25
|
-
if (!value) {
|
|
26
|
-
const keys = Object.keys(inputValues);
|
|
27
|
-
throw new Error(`input values have ${keys.length} keys, you must specify an input key or pass only 1 key as input`);
|
|
28
|
-
}
|
|
29
|
-
return value;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* This function is used by memory classes to select the output value
|
|
33
|
-
* to use for the memory. If there is only one output value, it is used.
|
|
34
|
-
* If there are multiple output values, the outputKey must be specified.
|
|
35
|
-
* If no outputKey is specified, an error is thrown.
|
|
36
|
-
*/
|
|
37
|
-
export const getOutputValue = (outputValues, outputKey) => {
|
|
38
|
-
const value = getValue(outputValues, outputKey);
|
|
39
|
-
if (!value) {
|
|
40
|
-
const keys = Object.keys(outputValues);
|
|
41
|
-
throw new Error(`output values have ${keys.length} keys, you must specify an output key or pass only 1 key as output`);
|
|
42
|
-
}
|
|
43
|
-
return value;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* This function is used by memory classes to get a string representation
|
|
47
|
-
* of the chat message history, based on the message content and role.
|
|
48
|
-
*/
|
|
49
|
-
export function getBufferString(messages, humanPrefix = "Human", aiPrefix = "AI") {
|
|
50
|
-
const string_messages = [];
|
|
51
|
-
for (const m of messages) {
|
|
52
|
-
let role;
|
|
53
|
-
if (m._getType() === "human") {
|
|
54
|
-
role = humanPrefix;
|
|
55
|
-
}
|
|
56
|
-
else if (m._getType() === "ai") {
|
|
57
|
-
role = aiPrefix;
|
|
58
|
-
}
|
|
59
|
-
else if (m._getType() === "system") {
|
|
60
|
-
role = "System";
|
|
61
|
-
}
|
|
62
|
-
else if (m._getType() === "function") {
|
|
63
|
-
role = "Function";
|
|
64
|
-
}
|
|
65
|
-
else if (m._getType() === "generic") {
|
|
66
|
-
role = m.role;
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
throw new Error(`Got unsupported message type: ${m}`);
|
|
70
|
-
}
|
|
71
|
-
const nameStr = m.name ? `${m.name}, ` : "";
|
|
72
|
-
string_messages.push(`${role}: ${nameStr}${m.content}`);
|
|
73
|
-
}
|
|
74
|
-
return string_messages.join("\n");
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Function used by memory classes to get the key of the prompt input,
|
|
78
|
-
* excluding any keys that are memory variables or the "stop" key. If
|
|
79
|
-
* there is not exactly one prompt input key, an error is thrown.
|
|
80
|
-
*/
|
|
81
|
-
export function getPromptInputKey(inputs, memoryVariables) {
|
|
82
|
-
const promptInputKeys = Object.keys(inputs).filter((key) => !memoryVariables.includes(key) && key !== "stop");
|
|
83
|
-
if (promptInputKeys.length !== 1) {
|
|
84
|
-
throw new Error(`One input key expected, but got ${promptInputKeys.length}`);
|
|
85
|
-
}
|
|
86
|
-
return promptInputKeys[0];
|
|
87
|
-
}
|
|
1
|
+
export * from "langchain-core/memory";
|
|
2
|
+
export { getBufferString } from "langchain-core/messages";
|
|
@@ -1,125 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CustomListOutputParser = exports.CommaSeparatedListOutputParser = exports.ListOutputParser = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
class ListOutputParser extends output_parser_js_1.BaseOutputParser {
|
|
10
|
-
}
|
|
11
|
-
exports.ListOutputParser = ListOutputParser;
|
|
12
|
-
/**
|
|
13
|
-
* Class to parse the output of an LLM call as a comma-separated list.
|
|
14
|
-
* @augments ListOutputParser
|
|
15
|
-
*/
|
|
16
|
-
class CommaSeparatedListOutputParser extends ListOutputParser {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
Object.defineProperty(this, "lc_namespace", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true,
|
|
23
|
-
value: ["langchain", "output_parsers", "list"]
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(this, "lc_serializable", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
configurable: true,
|
|
28
|
-
writable: true,
|
|
29
|
-
value: true
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
static lc_name() {
|
|
33
|
-
return "CommaSeparatedListOutputParser";
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Parses the given text into an array of strings, using a comma as the
|
|
37
|
-
* separator. If the parsing fails, throws an OutputParserException.
|
|
38
|
-
* @param text The text to parse.
|
|
39
|
-
* @returns An array of strings obtained by splitting the input text at each comma.
|
|
40
|
-
*/
|
|
41
|
-
async parse(text) {
|
|
42
|
-
try {
|
|
43
|
-
return text
|
|
44
|
-
.trim()
|
|
45
|
-
.split(",")
|
|
46
|
-
.map((s) => s.trim());
|
|
47
|
-
}
|
|
48
|
-
catch (e) {
|
|
49
|
-
throw new output_parser_js_1.OutputParserException(`Could not parse output: ${text}`, text);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Provides instructions on the expected format of the response for the
|
|
54
|
-
* CommaSeparatedListOutputParser.
|
|
55
|
-
* @returns A string containing instructions on the expected format of the response.
|
|
56
|
-
*/
|
|
57
|
-
getFormatInstructions() {
|
|
58
|
-
return `Your response should be a list of comma separated values, eg: \`foo, bar, baz\``;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
exports.CommaSeparatedListOutputParser = CommaSeparatedListOutputParser;
|
|
62
|
-
/**
|
|
63
|
-
* Class to parse the output of an LLM call to a list with a specific length and separator.
|
|
64
|
-
* @augments ListOutputParser
|
|
65
|
-
*/
|
|
66
|
-
class CustomListOutputParser extends ListOutputParser {
|
|
67
|
-
constructor({ length, separator }) {
|
|
68
|
-
super(...arguments);
|
|
69
|
-
Object.defineProperty(this, "lc_namespace", {
|
|
70
|
-
enumerable: true,
|
|
71
|
-
configurable: true,
|
|
72
|
-
writable: true,
|
|
73
|
-
value: ["langchain", "output_parsers", "list"]
|
|
74
|
-
});
|
|
75
|
-
Object.defineProperty(this, "length", {
|
|
76
|
-
enumerable: true,
|
|
77
|
-
configurable: true,
|
|
78
|
-
writable: true,
|
|
79
|
-
value: void 0
|
|
80
|
-
});
|
|
81
|
-
Object.defineProperty(this, "separator", {
|
|
82
|
-
enumerable: true,
|
|
83
|
-
configurable: true,
|
|
84
|
-
writable: true,
|
|
85
|
-
value: void 0
|
|
86
|
-
});
|
|
87
|
-
this.length = length;
|
|
88
|
-
this.separator = separator || ",";
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Parses the given text into an array of strings, using the specified
|
|
92
|
-
* separator. If the parsing fails or the number of items in the list
|
|
93
|
-
* doesn't match the expected length, throws an OutputParserException.
|
|
94
|
-
* @param text The text to parse.
|
|
95
|
-
* @returns An array of strings obtained by splitting the input text at each occurrence of the specified separator.
|
|
96
|
-
*/
|
|
97
|
-
async parse(text) {
|
|
98
|
-
try {
|
|
99
|
-
const items = text
|
|
100
|
-
.trim()
|
|
101
|
-
.split(this.separator)
|
|
102
|
-
.map((s) => s.trim());
|
|
103
|
-
if (this.length !== undefined && items.length !== this.length) {
|
|
104
|
-
throw new output_parser_js_1.OutputParserException(`Incorrect number of items. Expected ${this.length}, got ${items.length}.`);
|
|
105
|
-
}
|
|
106
|
-
return items;
|
|
107
|
-
}
|
|
108
|
-
catch (e) {
|
|
109
|
-
if (Object.getPrototypeOf(e) === output_parser_js_1.OutputParserException.prototype) {
|
|
110
|
-
throw e;
|
|
111
|
-
}
|
|
112
|
-
throw new output_parser_js_1.OutputParserException(`Could not parse output: ${text}`);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Provides instructions on the expected format of the response for the
|
|
117
|
-
* CustomListOutputParser, including the number of items and the
|
|
118
|
-
* separator.
|
|
119
|
-
* @returns A string containing instructions on the expected format of the response.
|
|
120
|
-
*/
|
|
121
|
-
getFormatInstructions() {
|
|
122
|
-
return `Your response should be a list of ${this.length === undefined ? "" : `${this.length} `}items separated by "${this.separator}" (eg: \`foo${this.separator} bar${this.separator} baz\`)`;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
exports.CustomListOutputParser = CustomListOutputParser;
|
|
4
|
+
var output_parsers_1 = require("langchain-core/output_parsers");
|
|
5
|
+
Object.defineProperty(exports, "ListOutputParser", { enumerable: true, get: function () { return output_parsers_1.ListOutputParser; } });
|
|
6
|
+
Object.defineProperty(exports, "CommaSeparatedListOutputParser", { enumerable: true, get: function () { return output_parsers_1.CommaSeparatedListOutputParser; } });
|
|
7
|
+
Object.defineProperty(exports, "CustomListOutputParser", { enumerable: true, get: function () { return output_parsers_1.CustomListOutputParser; } });
|
|
@@ -1,57 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Class to parse the output of an LLM call to a list.
|
|
4
|
-
* @augments BaseOutputParser
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class ListOutputParser extends BaseOutputParser<string[]> {
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Class to parse the output of an LLM call as a comma-separated list.
|
|
10
|
-
* @augments ListOutputParser
|
|
11
|
-
*/
|
|
12
|
-
export declare class CommaSeparatedListOutputParser extends ListOutputParser {
|
|
13
|
-
static lc_name(): string;
|
|
14
|
-
lc_namespace: string[];
|
|
15
|
-
lc_serializable: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Parses the given text into an array of strings, using a comma as the
|
|
18
|
-
* separator. If the parsing fails, throws an OutputParserException.
|
|
19
|
-
* @param text The text to parse.
|
|
20
|
-
* @returns An array of strings obtained by splitting the input text at each comma.
|
|
21
|
-
*/
|
|
22
|
-
parse(text: string): Promise<string[]>;
|
|
23
|
-
/**
|
|
24
|
-
* Provides instructions on the expected format of the response for the
|
|
25
|
-
* CommaSeparatedListOutputParser.
|
|
26
|
-
* @returns A string containing instructions on the expected format of the response.
|
|
27
|
-
*/
|
|
28
|
-
getFormatInstructions(): string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Class to parse the output of an LLM call to a list with a specific length and separator.
|
|
32
|
-
* @augments ListOutputParser
|
|
33
|
-
*/
|
|
34
|
-
export declare class CustomListOutputParser extends ListOutputParser {
|
|
35
|
-
lc_namespace: string[];
|
|
36
|
-
private length;
|
|
37
|
-
private separator;
|
|
38
|
-
constructor({ length, separator }: {
|
|
39
|
-
length?: number;
|
|
40
|
-
separator?: string;
|
|
41
|
-
});
|
|
42
|
-
/**
|
|
43
|
-
* Parses the given text into an array of strings, using the specified
|
|
44
|
-
* separator. If the parsing fails or the number of items in the list
|
|
45
|
-
* doesn't match the expected length, throws an OutputParserException.
|
|
46
|
-
* @param text The text to parse.
|
|
47
|
-
* @returns An array of strings obtained by splitting the input text at each occurrence of the specified separator.
|
|
48
|
-
*/
|
|
49
|
-
parse(text: string): Promise<string[]>;
|
|
50
|
-
/**
|
|
51
|
-
* Provides instructions on the expected format of the response for the
|
|
52
|
-
* CustomListOutputParser, including the number of items and the
|
|
53
|
-
* separator.
|
|
54
|
-
* @returns A string containing instructions on the expected format of the response.
|
|
55
|
-
*/
|
|
56
|
-
getFormatInstructions(): string;
|
|
57
|
-
}
|
|
1
|
+
export { ListOutputParser, CommaSeparatedListOutputParser, CustomListOutputParser, } from "langchain-core/output_parsers";
|
|
@@ -1,119 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Class to parse the output of an LLM call to a list.
|
|
4
|
-
* @augments BaseOutputParser
|
|
5
|
-
*/
|
|
6
|
-
export class ListOutputParser extends BaseOutputParser {
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Class to parse the output of an LLM call as a comma-separated list.
|
|
10
|
-
* @augments ListOutputParser
|
|
11
|
-
*/
|
|
12
|
-
export class CommaSeparatedListOutputParser extends ListOutputParser {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
Object.defineProperty(this, "lc_namespace", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
configurable: true,
|
|
18
|
-
writable: true,
|
|
19
|
-
value: ["langchain", "output_parsers", "list"]
|
|
20
|
-
});
|
|
21
|
-
Object.defineProperty(this, "lc_serializable", {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
configurable: true,
|
|
24
|
-
writable: true,
|
|
25
|
-
value: true
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
static lc_name() {
|
|
29
|
-
return "CommaSeparatedListOutputParser";
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Parses the given text into an array of strings, using a comma as the
|
|
33
|
-
* separator. If the parsing fails, throws an OutputParserException.
|
|
34
|
-
* @param text The text to parse.
|
|
35
|
-
* @returns An array of strings obtained by splitting the input text at each comma.
|
|
36
|
-
*/
|
|
37
|
-
async parse(text) {
|
|
38
|
-
try {
|
|
39
|
-
return text
|
|
40
|
-
.trim()
|
|
41
|
-
.split(",")
|
|
42
|
-
.map((s) => s.trim());
|
|
43
|
-
}
|
|
44
|
-
catch (e) {
|
|
45
|
-
throw new OutputParserException(`Could not parse output: ${text}`, text);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Provides instructions on the expected format of the response for the
|
|
50
|
-
* CommaSeparatedListOutputParser.
|
|
51
|
-
* @returns A string containing instructions on the expected format of the response.
|
|
52
|
-
*/
|
|
53
|
-
getFormatInstructions() {
|
|
54
|
-
return `Your response should be a list of comma separated values, eg: \`foo, bar, baz\``;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Class to parse the output of an LLM call to a list with a specific length and separator.
|
|
59
|
-
* @augments ListOutputParser
|
|
60
|
-
*/
|
|
61
|
-
export class CustomListOutputParser extends ListOutputParser {
|
|
62
|
-
constructor({ length, separator }) {
|
|
63
|
-
super(...arguments);
|
|
64
|
-
Object.defineProperty(this, "lc_namespace", {
|
|
65
|
-
enumerable: true,
|
|
66
|
-
configurable: true,
|
|
67
|
-
writable: true,
|
|
68
|
-
value: ["langchain", "output_parsers", "list"]
|
|
69
|
-
});
|
|
70
|
-
Object.defineProperty(this, "length", {
|
|
71
|
-
enumerable: true,
|
|
72
|
-
configurable: true,
|
|
73
|
-
writable: true,
|
|
74
|
-
value: void 0
|
|
75
|
-
});
|
|
76
|
-
Object.defineProperty(this, "separator", {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
configurable: true,
|
|
79
|
-
writable: true,
|
|
80
|
-
value: void 0
|
|
81
|
-
});
|
|
82
|
-
this.length = length;
|
|
83
|
-
this.separator = separator || ",";
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Parses the given text into an array of strings, using the specified
|
|
87
|
-
* separator. If the parsing fails or the number of items in the list
|
|
88
|
-
* doesn't match the expected length, throws an OutputParserException.
|
|
89
|
-
* @param text The text to parse.
|
|
90
|
-
* @returns An array of strings obtained by splitting the input text at each occurrence of the specified separator.
|
|
91
|
-
*/
|
|
92
|
-
async parse(text) {
|
|
93
|
-
try {
|
|
94
|
-
const items = text
|
|
95
|
-
.trim()
|
|
96
|
-
.split(this.separator)
|
|
97
|
-
.map((s) => s.trim());
|
|
98
|
-
if (this.length !== undefined && items.length !== this.length) {
|
|
99
|
-
throw new OutputParserException(`Incorrect number of items. Expected ${this.length}, got ${items.length}.`);
|
|
100
|
-
}
|
|
101
|
-
return items;
|
|
102
|
-
}
|
|
103
|
-
catch (e) {
|
|
104
|
-
if (Object.getPrototypeOf(e) === OutputParserException.prototype) {
|
|
105
|
-
throw e;
|
|
106
|
-
}
|
|
107
|
-
throw new OutputParserException(`Could not parse output: ${text}`);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Provides instructions on the expected format of the response for the
|
|
112
|
-
* CustomListOutputParser, including the number of items and the
|
|
113
|
-
* separator.
|
|
114
|
-
* @returns A string containing instructions on the expected format of the response.
|
|
115
|
-
*/
|
|
116
|
-
getFormatInstructions() {
|
|
117
|
-
return `Your response should be a list of ${this.length === undefined ? "" : `${this.length} `}items separated by "${this.separator}" (eg: \`foo${this.separator} bar${this.separator} baz\`)`;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
1
|
+
export { ListOutputParser, CommaSeparatedListOutputParser, CustomListOutputParser, } from "langchain-core/output_parsers";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.JsonKeyOutputFunctionsParser = exports.JsonOutputFunctionsParser = exports.OutputFunctionsParser = void 0;
|
|
4
|
+
const json_patch_1 = require("langchain-core/utils/json_patch");
|
|
4
5
|
const output_parser_js_1 = require("../schema/output_parser.cjs");
|
|
5
|
-
const index_js_1 = require("../util/fast-json-patch/index.cjs");
|
|
6
6
|
const json_js_1 = require("./json.cjs");
|
|
7
7
|
/**
|
|
8
8
|
* Class for parsing the output of an LLM. Can be configured to return
|
|
@@ -102,7 +102,7 @@ class JsonOutputFunctionsParser extends output_parser_js_1.BaseCumulativeTransfo
|
|
|
102
102
|
if (!next) {
|
|
103
103
|
return undefined;
|
|
104
104
|
}
|
|
105
|
-
const ops = (0,
|
|
105
|
+
const ops = (0, json_patch_1.compare)(prev ?? {}, next);
|
|
106
106
|
return ops;
|
|
107
107
|
}
|
|
108
108
|
async parsePartialResult(generations) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JsonSchema7ObjectType } from "zod-to-json-schema/src/parsers/object.js";
|
|
2
|
+
import { type Operation as JSONPatchOperation } from "langchain-core/utils/json_patch";
|
|
2
3
|
import { ChatGeneration, Generation } from "../schema/index.js";
|
|
3
4
|
import { Optional } from "../types/type-utils.js";
|
|
4
5
|
import { BaseCumulativeTransformOutputParser, type BaseCumulativeTransformOutputParserInput, BaseLLMOutputParser } from "../schema/output_parser.js";
|
|
5
|
-
import { type Operation as JSONPatchOperation } from "../util/fast-json-patch/index.js";
|
|
6
6
|
/**
|
|
7
7
|
* Represents optional parameters for a function in a JSON Schema.
|
|
8
8
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { compare, } from "langchain-core/utils/json_patch";
|
|
1
2
|
import { BaseCumulativeTransformOutputParser, BaseLLMOutputParser, } from "../schema/output_parser.js";
|
|
2
|
-
import { compare, } from "../util/fast-json-patch/index.js";
|
|
3
3
|
import { parsePartialJson } from "./json.js";
|
|
4
4
|
/**
|
|
5
5
|
* Class for parsing the output of an LLM. Can be configured to return
|
|
@@ -10,7 +10,7 @@ export declare class StructuredOutputParser<T extends z.ZodTypeAny> extends Base
|
|
|
10
10
|
schema: T;
|
|
11
11
|
static lc_name(): string;
|
|
12
12
|
lc_namespace: string[];
|
|
13
|
-
toJSON(): import("
|
|
13
|
+
toJSON(): import("langchain-core/load/serializable").SerializedNotImplemented;
|
|
14
14
|
constructor(schema: T);
|
|
15
15
|
/**
|
|
16
16
|
* Creates a new StructuredOutputParser from a Zod schema.
|
package/dist/prompts/base.cjs
CHANGED
|
@@ -1,185 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Default generic "any" values are for backwards compatibility.
|
|
3
|
-
// Replace with "string" when we are comfortable with a breaking change.
|
|
4
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.BaseExampleSelector = exports.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class StringPromptValue extends index_js_1.BasePromptValue {
|
|
14
|
-
constructor(value) {
|
|
15
|
-
super({ value });
|
|
16
|
-
Object.defineProperty(this, "lc_namespace", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: ["langchain", "prompts", "base"]
|
|
21
|
-
});
|
|
22
|
-
Object.defineProperty(this, "value", {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
configurable: true,
|
|
25
|
-
writable: true,
|
|
26
|
-
value: void 0
|
|
27
|
-
});
|
|
28
|
-
this.value = value;
|
|
29
|
-
}
|
|
30
|
-
toString() {
|
|
31
|
-
return this.value;
|
|
32
|
-
}
|
|
33
|
-
toChatMessages() {
|
|
34
|
-
return [new index_js_1.HumanMessage(this.value)];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.StringPromptValue = StringPromptValue;
|
|
38
|
-
/**
|
|
39
|
-
* Base class for prompt templates. Exposes a format method that returns a
|
|
40
|
-
* string prompt given a set of input values.
|
|
41
|
-
*/
|
|
42
|
-
class BasePromptTemplate extends index_js_2.Runnable {
|
|
43
|
-
get lc_attributes() {
|
|
44
|
-
return {
|
|
45
|
-
partialVariables: undefined, // python doesn't support this yet
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
constructor(input) {
|
|
49
|
-
super(input);
|
|
50
|
-
Object.defineProperty(this, "lc_serializable", {
|
|
51
|
-
enumerable: true,
|
|
52
|
-
configurable: true,
|
|
53
|
-
writable: true,
|
|
54
|
-
value: true
|
|
55
|
-
});
|
|
56
|
-
Object.defineProperty(this, "lc_namespace", {
|
|
57
|
-
enumerable: true,
|
|
58
|
-
configurable: true,
|
|
59
|
-
writable: true,
|
|
60
|
-
value: ["langchain", "prompts", this._getPromptType()]
|
|
61
|
-
});
|
|
62
|
-
Object.defineProperty(this, "inputVariables", {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
configurable: true,
|
|
65
|
-
writable: true,
|
|
66
|
-
value: void 0
|
|
67
|
-
});
|
|
68
|
-
Object.defineProperty(this, "outputParser", {
|
|
69
|
-
enumerable: true,
|
|
70
|
-
configurable: true,
|
|
71
|
-
writable: true,
|
|
72
|
-
value: void 0
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(this, "partialVariables", {
|
|
75
|
-
enumerable: true,
|
|
76
|
-
configurable: true,
|
|
77
|
-
writable: true,
|
|
78
|
-
value: void 0
|
|
79
|
-
});
|
|
80
|
-
const { inputVariables } = input;
|
|
81
|
-
if (inputVariables.includes("stop")) {
|
|
82
|
-
throw new Error("Cannot have an input variable named 'stop', as it is used internally, please rename.");
|
|
83
|
-
}
|
|
84
|
-
Object.assign(this, input);
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Merges partial variables and user variables.
|
|
88
|
-
* @param userVariables The user variables to merge with the partial variables.
|
|
89
|
-
* @returns A Promise that resolves to an object containing the merged variables.
|
|
90
|
-
*/
|
|
91
|
-
async mergePartialAndUserVariables(userVariables) {
|
|
92
|
-
const partialVariables = this.partialVariables ?? {};
|
|
93
|
-
const partialValues = {};
|
|
94
|
-
for (const [key, value] of Object.entries(partialVariables)) {
|
|
95
|
-
if (typeof value === "string") {
|
|
96
|
-
partialValues[key] = value;
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
partialValues[key] = await value();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
const allKwargs = {
|
|
103
|
-
...partialValues,
|
|
104
|
-
...userVariables,
|
|
105
|
-
};
|
|
106
|
-
return allKwargs;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Invokes the prompt template with the given input and options.
|
|
110
|
-
* @param input The input to invoke the prompt template with.
|
|
111
|
-
* @param options Optional configuration for the callback.
|
|
112
|
-
* @returns A Promise that resolves to the output of the prompt template.
|
|
113
|
-
*/
|
|
114
|
-
async invoke(input, options) {
|
|
115
|
-
return this._callWithConfig((input) => this.formatPromptValue(input), input, { ...options, runType: "prompt" });
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Return a json-like object representing this prompt template.
|
|
119
|
-
* @deprecated
|
|
120
|
-
*/
|
|
121
|
-
serialize() {
|
|
122
|
-
throw new Error("Use .toJSON() instead");
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* @deprecated
|
|
126
|
-
* Load a prompt template from a json-like object describing it.
|
|
127
|
-
*
|
|
128
|
-
* @remarks
|
|
129
|
-
* Deserializing needs to be async because templates (e.g. {@link FewShotPromptTemplate}) can
|
|
130
|
-
* reference remote resources that we read asynchronously with a web
|
|
131
|
-
* request.
|
|
132
|
-
*/
|
|
133
|
-
static async deserialize(data) {
|
|
134
|
-
switch (data._type) {
|
|
135
|
-
case "prompt": {
|
|
136
|
-
const { PromptTemplate } = await import("./prompt.js");
|
|
137
|
-
return PromptTemplate.deserialize(data);
|
|
138
|
-
}
|
|
139
|
-
case undefined: {
|
|
140
|
-
const { PromptTemplate } = await import("./prompt.js");
|
|
141
|
-
return PromptTemplate.deserialize({ ...data, _type: "prompt" });
|
|
142
|
-
}
|
|
143
|
-
case "few_shot": {
|
|
144
|
-
const { FewShotPromptTemplate } = await import("./few_shot.js");
|
|
145
|
-
return FewShotPromptTemplate.deserialize(data);
|
|
146
|
-
}
|
|
147
|
-
default:
|
|
148
|
-
throw new Error(`Invalid prompt type in config: ${data._type}`);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
exports.BasePromptTemplate = BasePromptTemplate;
|
|
153
|
-
/**
|
|
154
|
-
* Base class for string prompt templates. It extends the
|
|
155
|
-
* BasePromptTemplate class and overrides the formatPromptValue method to
|
|
156
|
-
* return a StringPromptValue.
|
|
157
|
-
*/
|
|
158
|
-
class BaseStringPromptTemplate extends BasePromptTemplate {
|
|
159
|
-
/**
|
|
160
|
-
* Formats the prompt given the input values and returns a formatted
|
|
161
|
-
* prompt value.
|
|
162
|
-
* @param values The input values to format the prompt.
|
|
163
|
-
* @returns A Promise that resolves to a formatted prompt value.
|
|
164
|
-
*/
|
|
165
|
-
async formatPromptValue(values) {
|
|
166
|
-
const formattedPrompt = await this.format(values);
|
|
167
|
-
return new StringPromptValue(formattedPrompt);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
exports.BaseStringPromptTemplate = BaseStringPromptTemplate;
|
|
171
|
-
/**
|
|
172
|
-
* Base class for example selectors.
|
|
173
|
-
*/
|
|
174
|
-
class BaseExampleSelector extends serializable_js_1.Serializable {
|
|
175
|
-
constructor() {
|
|
176
|
-
super(...arguments);
|
|
177
|
-
Object.defineProperty(this, "lc_namespace", {
|
|
178
|
-
enumerable: true,
|
|
179
|
-
configurable: true,
|
|
180
|
-
writable: true,
|
|
181
|
-
value: ["langchain", "prompts", "selectors"]
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
exports.BaseExampleSelector = BaseExampleSelector;
|
|
3
|
+
exports.BaseExampleSelector = exports.StringPromptValue = exports.BasePromptTemplate = exports.BaseStringPromptTemplate = void 0;
|
|
4
|
+
var prompts_1 = require("langchain-core/prompts");
|
|
5
|
+
Object.defineProperty(exports, "BaseStringPromptTemplate", { enumerable: true, get: function () { return prompts_1.BaseStringPromptTemplate; } });
|
|
6
|
+
Object.defineProperty(exports, "BasePromptTemplate", { enumerable: true, get: function () { return prompts_1.BasePromptTemplate; } });
|
|
7
|
+
var prompt_values_1 = require("langchain-core/prompt_values");
|
|
8
|
+
Object.defineProperty(exports, "StringPromptValue", { enumerable: true, get: function () { return prompt_values_1.StringPromptValue; } });
|
|
9
|
+
var example_selectors_1 = require("langchain-core/example_selectors");
|
|
10
|
+
Object.defineProperty(exports, "BaseExampleSelector", { enumerable: true, get: function () { return example_selectors_1.BaseExampleSelector; } });
|