langchain 0.0.196 → 0.0.197-rc.1
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/executor.cjs +351 -1
- package/dist/agents/executor.d.ts +61 -3
- package/dist/agents/executor.js +350 -1
- 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 +4 -4
- package/dist/base_language/count_tokens.d.ts +1 -1
- package/dist/base_language/count_tokens.js +1 -1
- package/dist/base_language/index.cjs +3 -3
- package/dist/base_language/index.d.ts +1 -1
- package/dist/base_language/index.js +1 -1
- package/dist/cache/base.cjs +1 -1
- package/dist/cache/base.d.ts +1 -1
- package/dist/cache/base.js +1 -1
- package/dist/cache/index.cjs +2 -2
- package/dist/cache/index.d.ts +1 -1
- package/dist/cache/index.js +1 -1
- package/dist/callbacks/base.cjs +1 -1
- package/dist/callbacks/base.d.ts +1 -1
- package/dist/callbacks/base.js +1 -1
- package/dist/callbacks/handlers/console.cjs +1 -1
- package/dist/callbacks/handlers/console.d.ts +1 -1
- package/dist/callbacks/handlers/console.js +1 -1
- package/dist/callbacks/handlers/initialize.cjs +1 -1
- package/dist/callbacks/handlers/initialize.d.ts +1 -1
- package/dist/callbacks/handlers/initialize.js +1 -1
- package/dist/callbacks/handlers/log_stream.cjs +1 -1
- package/dist/callbacks/handlers/log_stream.d.ts +1 -1
- package/dist/callbacks/handlers/log_stream.js +1 -1
- package/dist/callbacks/handlers/run_collector.cjs +1 -1
- package/dist/callbacks/handlers/run_collector.d.ts +1 -1
- package/dist/callbacks/handlers/run_collector.js +1 -1
- package/dist/callbacks/handlers/tracer.cjs +1 -1
- package/dist/callbacks/handlers/tracer.d.ts +1 -1
- package/dist/callbacks/handlers/tracer.js +1 -1
- package/dist/callbacks/handlers/tracer_langchain.cjs +1 -1
- package/dist/callbacks/handlers/tracer_langchain.d.ts +1 -1
- package/dist/callbacks/handlers/tracer_langchain.js +1 -1
- package/dist/callbacks/handlers/tracer_langchain_v1.cjs +1 -1
- package/dist/callbacks/handlers/tracer_langchain_v1.d.ts +1 -1
- package/dist/callbacks/handlers/tracer_langchain_v1.js +1 -1
- package/dist/callbacks/manager.cjs +1 -1
- package/dist/callbacks/manager.d.ts +1 -1
- package/dist/callbacks/manager.js +1 -1
- package/dist/callbacks/promises.cjs +1 -1
- package/dist/callbacks/promises.d.ts +1 -1
- package/dist/callbacks/promises.js +1 -1
- package/dist/chains/base.cjs +16 -0
- package/dist/chains/base.d.ts +2 -0
- package/dist/chains/base.js +16 -0
- package/dist/chains/openai_functions/structured_output.cjs +1 -1
- package/dist/chains/openai_functions/structured_output.d.ts +1 -1
- package/dist/chains/openai_functions/structured_output.js +1 -1
- package/dist/chains/openai_moderation.cjs +2 -2
- package/dist/chains/openai_moderation.d.ts +1 -1
- package/dist/chains/openai_moderation.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/base.cjs +1 -1
- package/dist/chat_models/base.d.ts +1 -1
- package/dist/chat_models/base.js +1 -1
- package/dist/chat_models/bedrock/web.cjs +21 -1
- package/dist/chat_models/bedrock/web.d.ts +1 -1
- package/dist/chat_models/bedrock/web.js +21 -1
- package/dist/chat_models/fireworks.d.ts +2 -2
- package/dist/chat_models/iflytek_xinghuo/common.d.ts +1 -1
- package/dist/chat_models/minimax.d.ts +2 -2
- package/dist/chat_models/openai.cjs +4 -698
- package/dist/chat_models/openai.d.ts +4 -137
- package/dist/chat_models/openai.js +2 -695
- package/dist/document.cjs +2 -2
- package/dist/document.d.ts +1 -1
- package/dist/document.js +1 -1
- package/dist/document_loaders/fs/openai_whisper_audio.cjs +2 -2
- package/dist/document_loaders/fs/openai_whisper_audio.d.ts +1 -1
- package/dist/document_loaders/fs/openai_whisper_audio.js +1 -1
- 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 +1 -1
- package/dist/embeddings/base.d.ts +1 -1
- package/dist/embeddings/base.js +1 -1
- package/dist/embeddings/cache_backed.cjs +1 -1
- package/dist/embeddings/cache_backed.js +1 -1
- package/dist/embeddings/openai.cjs +2 -240
- package/dist/embeddings/openai.d.ts +1 -82
- package/dist/embeddings/openai.js +1 -239
- package/dist/experimental/openai_assistant/index.cjs +3 -3
- package/dist/experimental/openai_assistant/index.d.ts +1 -1
- package/dist/experimental/openai_assistant/index.js +1 -1
- package/dist/experimental/openai_assistant/schema.d.ts +1 -1
- package/dist/experimental/openai_files/index.cjs +2 -2
- package/dist/experimental/openai_files/index.d.ts +1 -1
- package/dist/experimental/openai_files/index.js +1 -1
- package/dist/experimental/plan_and_execute/prompt.d.ts +1 -1
- package/dist/llms/base.cjs +1 -1
- package/dist/llms/base.d.ts +1 -1
- package/dist/llms/base.js +1 -1
- package/dist/llms/bedrock/web.cjs +21 -1
- package/dist/llms/bedrock/web.d.ts +1 -1
- package/dist/llms/bedrock/web.js +21 -1
- package/dist/llms/fireworks.d.ts +2 -2
- package/dist/llms/openai-chat.cjs +3 -445
- package/dist/llms/openai-chat.d.ts +4 -123
- package/dist/llms/openai-chat.js +2 -443
- package/dist/llms/openai.cjs +6 -530
- package/dist/llms/openai.d.ts +4 -123
- package/dist/llms/openai.js +2 -525
- package/dist/load/index.cjs +4 -2
- package/dist/load/index.d.ts +2 -2
- package/dist/load/index.js +4 -2
- package/dist/load/serializable.cjs +1 -1
- package/dist/load/serializable.d.ts +1 -1
- package/dist/load/serializable.js +1 -1
- package/dist/memory/base.cjs +2 -2
- package/dist/memory/base.d.ts +2 -2
- package/dist/memory/base.js +2 -2
- 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 +1 -1
- package/dist/output_parsers/openai_functions.d.ts +1 -1
- package/dist/output_parsers/openai_functions.js +1 -1
- package/dist/output_parsers/structured.d.ts +1 -1
- package/dist/prompts/base.cjs +8 -8
- package/dist/prompts/base.d.ts +3 -3
- package/dist/prompts/base.js +3 -3
- package/dist/prompts/chat.cjs +13 -15
- package/dist/prompts/chat.d.ts +2 -1
- package/dist/prompts/chat.js +2 -1
- package/dist/prompts/few_shot.cjs +4 -15
- package/dist/prompts/few_shot.d.ts +1 -1
- package/dist/prompts/few_shot.js +1 -1
- package/dist/prompts/index.cjs +2 -2
- package/dist/prompts/index.d.ts +1 -1
- package/dist/prompts/index.js +1 -1
- package/dist/prompts/pipeline.cjs +3 -15
- package/dist/prompts/pipeline.d.ts +1 -1
- package/dist/prompts/pipeline.js +1 -1
- package/dist/prompts/prompt.cjs +3 -15
- package/dist/prompts/prompt.d.ts +1 -1
- package/dist/prompts/prompt.js +1 -1
- package/dist/prompts/selectors/LengthBasedExampleSelector.cjs +3 -15
- package/dist/prompts/selectors/LengthBasedExampleSelector.d.ts +1 -1
- package/dist/prompts/selectors/LengthBasedExampleSelector.js +1 -1
- package/dist/prompts/selectors/SemanticSimilarityExampleSelector.cjs +1 -1
- package/dist/prompts/selectors/SemanticSimilarityExampleSelector.d.ts +1 -1
- package/dist/prompts/selectors/SemanticSimilarityExampleSelector.js +1 -1
- package/dist/prompts/selectors/conditional.cjs +6 -15
- package/dist/prompts/selectors/conditional.d.ts +1 -1
- package/dist/prompts/selectors/conditional.js +1 -1
- package/dist/prompts/serde.cjs +0 -15
- package/dist/prompts/serde.d.ts +1 -1
- package/dist/prompts/serde.js +1 -1
- package/dist/prompts/template.cjs +9 -15
- package/dist/prompts/template.d.ts +1 -1
- package/dist/prompts/template.js +1 -1
- package/dist/runnables/index.cjs +1 -1
- package/dist/runnables/index.d.ts +1 -1
- package/dist/runnables/index.js +1 -1
- package/dist/schema/document.cjs +3 -3
- package/dist/schema/document.d.ts +1 -1
- package/dist/schema/document.js +1 -1
- package/dist/schema/index.cjs +12 -12
- package/dist/schema/index.d.ts +11 -11
- package/dist/schema/index.js +7 -7
- package/dist/schema/output_parser.cjs +1 -1
- package/dist/schema/output_parser.d.ts +1 -1
- package/dist/schema/output_parser.js +1 -1
- package/dist/schema/retriever.cjs +1 -1
- package/dist/schema/retriever.d.ts +1 -1
- package/dist/schema/retriever.js +1 -1
- package/dist/schema/runnable/base.cjs +1 -1
- package/dist/schema/runnable/base.d.ts +1 -1
- package/dist/schema/runnable/base.js +1 -1
- package/dist/schema/runnable/branch.cjs +1 -1
- package/dist/schema/runnable/branch.d.ts +1 -1
- package/dist/schema/runnable/branch.js +1 -1
- package/dist/schema/runnable/config.d.ts +1 -1
- package/dist/schema/runnable/index.cjs +1 -1
- package/dist/schema/runnable/index.d.ts +1 -1
- package/dist/schema/runnable/index.js +1 -1
- package/dist/schema/runnable/passthrough.cjs +1 -1
- package/dist/schema/runnable/passthrough.d.ts +1 -1
- package/dist/schema/runnable/passthrough.js +1 -1
- package/dist/schema/runnable/router.cjs +1 -1
- package/dist/schema/runnable/router.d.ts +1 -1
- package/dist/schema/runnable/router.js +1 -1
- package/dist/schema/storage.cjs +1 -1
- package/dist/schema/storage.d.ts +1 -1
- package/dist/schema/storage.js +1 -1
- package/dist/tools/base.cjs +4 -108
- package/dist/tools/base.d.ts +1 -72
- package/dist/tools/base.js +1 -105
- package/dist/tools/bingserpapi.d.ts +1 -1
- package/dist/tools/convert_to_openai.cjs +4 -38
- package/dist/tools/convert_to_openai.d.ts +1 -11
- package/dist/tools/convert_to_openai.js +1 -35
- 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/types/openai-types.d.ts +1 -133
- package/dist/util/async_caller.cjs +1 -1
- package/dist/util/async_caller.d.ts +1 -1
- package/dist/util/async_caller.js +1 -1
- package/dist/util/openai.cjs +2 -18
- package/dist/util/openai.d.ts +1 -1
- package/dist/util/openai.js +1 -17
- package/dist/util/openapi.d.ts +2 -2
- package/dist/util/prompt-layer.d.ts +1 -1
- 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 +12 -10
- package/dist/util/openai-format-fndef.cjs +0 -81
- package/dist/util/openai-format-fndef.d.ts +0 -44
- package/dist/util/openai-format-fndef.js +0 -77
|
@@ -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,7 +1,7 @@
|
|
|
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
|
|
4
|
+
const json_patch_1 = require("@langchain/core/utils/json_patch");
|
|
5
5
|
const output_parser_js_1 = require("../schema/output_parser.cjs");
|
|
6
6
|
const json_js_1 = require("./json.cjs");
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonSchema7ObjectType } from "zod-to-json-schema/src/parsers/object.js";
|
|
2
|
-
import { type Operation as JSONPatchOperation } from "langchain
|
|
2
|
+
import { type Operation as JSONPatchOperation } from "@langchain/core/utils/json_patch";
|
|
3
3
|
import { ChatGeneration, Generation } from "../schema/index.js";
|
|
4
4
|
import { Optional } from "../types/type-utils.js";
|
|
5
5
|
import { BaseCumulativeTransformOutputParser, type BaseCumulativeTransformOutputParserInput, BaseLLMOutputParser } from "../schema/output_parser.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { compare, } from "langchain
|
|
1
|
+
import { compare, } from "@langchain/core/utils/json_patch";
|
|
2
2
|
import { BaseCumulativeTransformOutputParser, BaseLLMOutputParser, } from "../schema/output_parser.js";
|
|
3
3
|
import { parsePartialJson } from "./json.js";
|
|
4
4
|
/**
|
|
@@ -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("langchain
|
|
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,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseExampleSelector = exports.
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
Object.defineProperty(exports, "
|
|
7
|
-
var
|
|
8
|
-
Object.defineProperty(exports, "
|
|
9
|
-
var
|
|
10
|
-
Object.defineProperty(exports, "BaseExampleSelector", { enumerable: true, get: function () { return
|
|
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; } });
|
package/dist/prompts/base.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { type TypedPromptInputValues,
|
|
2
|
-
export {
|
|
3
|
-
export { BaseExampleSelector } from "langchain
|
|
1
|
+
export { type TypedPromptInputValues, BaseStringPromptTemplate, type BasePromptTemplateInput, BasePromptTemplate, } from "@langchain/core/prompts";
|
|
2
|
+
export { StringPromptValue } from "@langchain/core/prompt_values";
|
|
3
|
+
export { BaseExampleSelector } from "@langchain/core/example_selectors";
|
package/dist/prompts/base.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { BaseExampleSelector } from "langchain
|
|
1
|
+
export { BaseStringPromptTemplate, BasePromptTemplate, } from "@langchain/core/prompts";
|
|
2
|
+
export { StringPromptValue } from "@langchain/core/prompt_values";
|
|
3
|
+
export { BaseExampleSelector } from "@langchain/core/example_selectors";
|
package/dist/prompts/chat.cjs
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
exports.ChatPromptValue = exports.ChatPromptTemplate = exports.SystemMessagePromptTemplate = exports.AIMessagePromptTemplate = exports.HumanMessagePromptTemplate = exports.ChatMessagePromptTemplate = exports.BaseChatPromptTemplate = exports.BaseMessageStringPromptTemplate = exports.MessagesPlaceholder = exports.BaseMessagePromptTemplate = void 0;
|
|
4
|
+
var prompts_1 = require("@langchain/core/prompts");
|
|
5
|
+
Object.defineProperty(exports, "BaseMessagePromptTemplate", { enumerable: true, get: function () { return prompts_1.BaseMessagePromptTemplate; } });
|
|
6
|
+
Object.defineProperty(exports, "MessagesPlaceholder", { enumerable: true, get: function () { return prompts_1.MessagesPlaceholder; } });
|
|
7
|
+
Object.defineProperty(exports, "BaseMessageStringPromptTemplate", { enumerable: true, get: function () { return prompts_1.BaseMessageStringPromptTemplate; } });
|
|
8
|
+
Object.defineProperty(exports, "BaseChatPromptTemplate", { enumerable: true, get: function () { return prompts_1.BaseChatPromptTemplate; } });
|
|
9
|
+
Object.defineProperty(exports, "ChatMessagePromptTemplate", { enumerable: true, get: function () { return prompts_1.ChatMessagePromptTemplate; } });
|
|
10
|
+
Object.defineProperty(exports, "HumanMessagePromptTemplate", { enumerable: true, get: function () { return prompts_1.HumanMessagePromptTemplate; } });
|
|
11
|
+
Object.defineProperty(exports, "AIMessagePromptTemplate", { enumerable: true, get: function () { return prompts_1.AIMessagePromptTemplate; } });
|
|
12
|
+
Object.defineProperty(exports, "SystemMessagePromptTemplate", { enumerable: true, get: function () { return prompts_1.SystemMessagePromptTemplate; } });
|
|
13
|
+
Object.defineProperty(exports, "ChatPromptTemplate", { enumerable: true, get: function () { return prompts_1.ChatPromptTemplate; } });
|
|
14
|
+
var prompt_values_1 = require("@langchain/core/prompt_values");
|
|
15
|
+
Object.defineProperty(exports, "ChatPromptValue", { enumerable: true, get: function () { return prompt_values_1.ChatPromptValue; } });
|
package/dist/prompts/chat.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { BaseMessagePromptTemplate, type MessagesPlaceholderFields as MessagePlaceholderFields, MessagesPlaceholder, type MessageStringPromptTemplateFields, BaseMessageStringPromptTemplate, BaseChatPromptTemplate, type ChatMessagePromptTemplateFields, ChatMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate, SystemMessagePromptTemplate, type ChatPromptTemplateInput, type BaseMessagePromptTemplateLike, ChatPromptTemplate, } from "@langchain/core/prompts";
|
|
2
|
+
export { type ChatPromptValueFields, ChatPromptValue, } from "@langchain/core/prompt_values";
|
package/dist/prompts/chat.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { BaseMessagePromptTemplate, MessagesPlaceholder, BaseMessageStringPromptTemplate, BaseChatPromptTemplate, ChatMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate, SystemMessagePromptTemplate, ChatPromptTemplate, } from "@langchain/core/prompts";
|
|
2
|
+
export { ChatPromptValue, } from "@langchain/core/prompt_values";
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
exports.FewShotChatMessagePromptTemplate = exports.FewShotPromptTemplate = void 0;
|
|
4
|
+
var prompts_1 = require("@langchain/core/prompts");
|
|
5
|
+
Object.defineProperty(exports, "FewShotPromptTemplate", { enumerable: true, get: function () { return prompts_1.FewShotPromptTemplate; } });
|
|
6
|
+
Object.defineProperty(exports, "FewShotChatMessagePromptTemplate", { enumerable: true, get: function () { return prompts_1.FewShotChatMessagePromptTemplate; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { type FewShotPromptTemplateInput, FewShotPromptTemplate, type FewShotChatMessagePromptTemplateInput, FewShotChatMessagePromptTemplate, } from "@langchain/core/prompts";
|
package/dist/prompts/few_shot.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { FewShotPromptTemplate, FewShotChatMessagePromptTemplate, } from "@langchain/core/prompts";
|
package/dist/prompts/index.cjs
CHANGED
|
@@ -5,8 +5,8 @@ var base_js_1 = require("./base.cjs");
|
|
|
5
5
|
Object.defineProperty(exports, "BasePromptTemplate", { enumerable: true, get: function () { return base_js_1.BasePromptTemplate; } });
|
|
6
6
|
Object.defineProperty(exports, "StringPromptValue", { enumerable: true, get: function () { return base_js_1.StringPromptValue; } });
|
|
7
7
|
Object.defineProperty(exports, "BaseStringPromptTemplate", { enumerable: true, get: function () { return base_js_1.BaseStringPromptTemplate; } });
|
|
8
|
-
var
|
|
9
|
-
Object.defineProperty(exports, "BaseExampleSelector", { enumerable: true, get: function () { return
|
|
8
|
+
var example_selectors_1 = require("@langchain/core/example_selectors");
|
|
9
|
+
Object.defineProperty(exports, "BaseExampleSelector", { enumerable: true, get: function () { return example_selectors_1.BaseExampleSelector; } });
|
|
10
10
|
var prompt_js_1 = require("./prompt.cjs");
|
|
11
11
|
Object.defineProperty(exports, "PromptTemplate", { enumerable: true, get: function () { return prompt_js_1.PromptTemplate; } });
|
|
12
12
|
var conditional_js_1 = require("./selectors/conditional.cjs");
|
package/dist/prompts/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { BasePromptTemplate, type BasePromptTemplateInput, StringPromptValue, BaseStringPromptTemplate, } from "./base.js";
|
|
2
|
-
export { BaseExampleSelector } from "langchain
|
|
2
|
+
export { BaseExampleSelector } from "@langchain/core/example_selectors";
|
|
3
3
|
export { PromptTemplate, type PromptTemplateInput } from "./prompt.js";
|
|
4
4
|
export { BasePromptSelector, ConditionalPromptSelector, isChatModel, isLLM, } from "./selectors/conditional.js";
|
|
5
5
|
export { LengthBasedExampleSelector, type LengthBasedExampleSelectorInput, } from "./selectors/LengthBasedExampleSelector.js";
|
package/dist/prompts/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { BasePromptTemplate, StringPromptValue, BaseStringPromptTemplate, } from "./base.js";
|
|
2
|
-
export { BaseExampleSelector } from "langchain
|
|
2
|
+
export { BaseExampleSelector } from "@langchain/core/example_selectors";
|
|
3
3
|
export { PromptTemplate } from "./prompt.js";
|
|
4
4
|
export { BasePromptSelector, ConditionalPromptSelector, isChatModel, isLLM, } from "./selectors/conditional.js";
|
|
5
5
|
export { LengthBasedExampleSelector, } from "./selectors/LengthBasedExampleSelector.js";
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
exports.PipelinePromptTemplate = void 0;
|
|
4
|
+
var prompts_1 = require("@langchain/core/prompts");
|
|
5
|
+
Object.defineProperty(exports, "PipelinePromptTemplate", { enumerable: true, get: function () { return prompts_1.PipelinePromptTemplate; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { type PipelinePromptParams, type PipelinePromptTemplateInput, PipelinePromptTemplate, } from "@langchain/core/prompts";
|
package/dist/prompts/pipeline.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { PipelinePromptTemplate, } from "@langchain/core/prompts";
|
package/dist/prompts/prompt.cjs
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
exports.PromptTemplate = void 0;
|
|
4
|
+
var prompts_1 = require("@langchain/core/prompts");
|
|
5
|
+
Object.defineProperty(exports, "PromptTemplate", { enumerable: true, get: function () { return prompts_1.PromptTemplate; } });
|
package/dist/prompts/prompt.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { type PromptTemplateInput, type ParamsFromFString, PromptTemplate, } from "@langchain/core/prompts";
|
package/dist/prompts/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { PromptTemplate, } from "@langchain/core/prompts";
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
exports.LengthBasedExampleSelector = void 0;
|
|
4
|
+
var example_selectors_1 = require("@langchain/core/example_selectors");
|
|
5
|
+
Object.defineProperty(exports, "LengthBasedExampleSelector", { enumerable: true, get: function () { return example_selectors_1.LengthBasedExampleSelector; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { type LengthBasedExampleSelectorInput, LengthBasedExampleSelector, } from "@langchain/core/example_selectors";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { LengthBasedExampleSelector, } from "@langchain/core/example_selectors";
|
|
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("langchain
|
|
17
|
+
__exportStar(require("@langchain/core/example_selectors"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "langchain
|
|
1
|
+
export * from "@langchain/core/example_selectors";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "langchain
|
|
1
|
+
export * from "@langchain/core/example_selectors";
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
exports.isChatModel = exports.isLLM = exports.ConditionalPromptSelector = exports.BasePromptSelector = void 0;
|
|
4
|
+
var example_selectors_1 = require("@langchain/core/example_selectors");
|
|
5
|
+
Object.defineProperty(exports, "BasePromptSelector", { enumerable: true, get: function () { return example_selectors_1.BasePromptSelector; } });
|
|
6
|
+
Object.defineProperty(exports, "ConditionalPromptSelector", { enumerable: true, get: function () { return example_selectors_1.ConditionalPromptSelector; } });
|
|
7
|
+
Object.defineProperty(exports, "isLLM", { enumerable: true, get: function () { return example_selectors_1.isLLM; } });
|
|
8
|
+
Object.defineProperty(exports, "isChatModel", { enumerable: true, get: function () { return example_selectors_1.isChatModel; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { type BaseGetPromptAsyncOptions, BasePromptSelector, ConditionalPromptSelector, isLLM, isChatModel, } from "@langchain/core/example_selectors";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { BasePromptSelector, ConditionalPromptSelector, isLLM, isChatModel, } from "@langchain/core/example_selectors";
|