langchain 0.0.129 → 0.0.131
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/dist/agents/chat/index.cjs +3 -0
- package/dist/agents/chat/index.d.ts +1 -0
- package/dist/agents/chat/index.js +3 -0
- package/dist/agents/chat_convo/index.cjs +3 -0
- package/dist/agents/chat_convo/index.d.ts +1 -0
- package/dist/agents/chat_convo/index.js +3 -0
- package/dist/agents/executor.cjs +3 -0
- package/dist/agents/executor.d.ts +1 -0
- package/dist/agents/executor.js +3 -0
- package/dist/agents/mrkl/index.cjs +3 -0
- package/dist/agents/mrkl/index.d.ts +1 -0
- package/dist/agents/mrkl/index.js +3 -0
- package/dist/agents/openai/index.cjs +3 -0
- package/dist/agents/openai/index.d.ts +1 -0
- package/dist/agents/openai/index.js +3 -0
- package/dist/agents/structured_chat/index.cjs +3 -0
- package/dist/agents/structured_chat/index.d.ts +1 -0
- package/dist/agents/structured_chat/index.js +3 -0
- package/dist/callbacks/base.cjs +18 -0
- package/dist/callbacks/base.d.ts +15 -0
- package/dist/callbacks/base.js +19 -1
- package/dist/callbacks/manager.cjs +1 -1
- package/dist/callbacks/manager.js +1 -1
- package/dist/chains/analyze_documents_chain.cjs +3 -0
- package/dist/chains/analyze_documents_chain.d.ts +1 -0
- package/dist/chains/analyze_documents_chain.js +3 -0
- package/dist/chains/combine_docs_chain.cjs +9 -0
- package/dist/chains/combine_docs_chain.d.ts +3 -0
- package/dist/chains/combine_docs_chain.js +9 -0
- package/dist/chains/constitutional_ai/constitutional_chain.cjs +3 -0
- package/dist/chains/constitutional_ai/constitutional_chain.d.ts +1 -0
- package/dist/chains/constitutional_ai/constitutional_chain.js +3 -0
- package/dist/chains/conversation.cjs +3 -0
- package/dist/chains/conversation.d.ts +1 -0
- package/dist/chains/conversation.js +3 -0
- package/dist/chains/conversational_retrieval_chain.cjs +3 -0
- package/dist/chains/conversational_retrieval_chain.d.ts +1 -0
- package/dist/chains/conversational_retrieval_chain.js +3 -0
- package/dist/chains/llm_chain.cjs +3 -0
- package/dist/chains/llm_chain.d.ts +1 -0
- package/dist/chains/llm_chain.js +3 -0
- package/dist/chains/openai_functions/openapi.cjs +3 -0
- package/dist/chains/openai_functions/openapi.js +3 -0
- package/dist/chains/openai_moderation.cjs +3 -0
- package/dist/chains/openai_moderation.d.ts +1 -0
- package/dist/chains/openai_moderation.js +3 -0
- package/dist/chains/retrieval_qa.cjs +3 -0
- package/dist/chains/retrieval_qa.d.ts +1 -0
- package/dist/chains/retrieval_qa.js +3 -0
- package/dist/chains/router/multi_route.cjs +3 -0
- package/dist/chains/router/multi_route.d.ts +1 -0
- package/dist/chains/router/multi_route.js +3 -0
- package/dist/chains/sequential_chain.cjs +6 -0
- package/dist/chains/sequential_chain.d.ts +2 -0
- package/dist/chains/sequential_chain.js +6 -0
- package/dist/chains/sql_db/sql_db_chain.cjs +3 -0
- package/dist/chains/sql_db/sql_db_chain.d.ts +1 -0
- package/dist/chains/sql_db/sql_db_chain.js +3 -0
- package/dist/chains/transform.cjs +3 -0
- package/dist/chains/transform.d.ts +1 -0
- package/dist/chains/transform.js +3 -0
- package/dist/chains/vector_db_qa.cjs +3 -0
- package/dist/chains/vector_db_qa.d.ts +1 -0
- package/dist/chains/vector_db_qa.js +3 -0
- package/dist/chat_models/anthropic.cjs +3 -0
- package/dist/chat_models/anthropic.d.ts +1 -0
- package/dist/chat_models/anthropic.js +3 -0
- package/dist/chat_models/baiduwenxin.cjs +3 -13
- package/dist/chat_models/baiduwenxin.d.ts +1 -3
- package/dist/chat_models/baiduwenxin.js +3 -13
- package/dist/chat_models/googlepalm.cjs +9 -0
- package/dist/chat_models/googlepalm.d.ts +2 -0
- package/dist/chat_models/googlepalm.js +9 -0
- package/dist/chat_models/googlevertexai.cjs +9 -0
- package/dist/chat_models/googlevertexai.d.ts +2 -0
- package/dist/chat_models/googlevertexai.js +9 -0
- package/dist/chat_models/ollama.cjs +3 -0
- package/dist/chat_models/ollama.d.ts +1 -0
- package/dist/chat_models/ollama.js +3 -0
- package/dist/chat_models/openai.cjs +19 -5
- package/dist/chat_models/openai.d.ts +7 -5
- package/dist/chat_models/openai.js +19 -5
- package/dist/document_loaders/web/youtube.cjs +77 -0
- package/dist/document_loaders/web/youtube.d.ts +17 -0
- package/dist/document_loaders/web/youtube.js +73 -0
- package/dist/document_transformers/html_to_text.cjs +3 -0
- package/dist/document_transformers/html_to_text.d.ts +1 -0
- package/dist/document_transformers/html_to_text.js +3 -0
- package/dist/document_transformers/mozilla_readability.cjs +3 -0
- package/dist/document_transformers/mozilla_readability.d.ts +1 -0
- package/dist/document_transformers/mozilla_readability.js +3 -0
- package/dist/document_transformers/openai_functions.cjs +3 -0
- package/dist/document_transformers/openai_functions.d.ts +1 -0
- package/dist/document_transformers/openai_functions.js +3 -0
- package/dist/embeddings/cohere.cjs +16 -13
- package/dist/embeddings/cohere.js +16 -13
- package/dist/embeddings/googlevertexai.cjs +1 -1
- package/dist/embeddings/googlevertexai.js +1 -1
- package/dist/embeddings/openai.cjs +27 -21
- package/dist/embeddings/openai.js +27 -21
- package/dist/evaluation/qa/eval_chain.cjs +3 -0
- package/dist/evaluation/qa/eval_chain.d.ts +1 -0
- package/dist/evaluation/qa/eval_chain.js +3 -0
- package/dist/experimental/babyagi/agent.cjs +3 -0
- package/dist/experimental/babyagi/agent.d.ts +1 -0
- package/dist/experimental/babyagi/agent.js +3 -0
- package/dist/experimental/babyagi/task_creation.cjs +3 -0
- package/dist/experimental/babyagi/task_creation.d.ts +1 -0
- package/dist/experimental/babyagi/task_creation.js +3 -0
- package/dist/experimental/babyagi/task_execution.cjs +3 -0
- package/dist/experimental/babyagi/task_execution.d.ts +1 -0
- package/dist/experimental/babyagi/task_execution.js +3 -0
- package/dist/experimental/babyagi/task_prioritization.cjs +3 -0
- package/dist/experimental/babyagi/task_prioritization.d.ts +1 -0
- package/dist/experimental/babyagi/task_prioritization.js +3 -0
- package/dist/experimental/generative_agents/generative_agent.cjs +3 -0
- package/dist/experimental/generative_agents/generative_agent.d.ts +1 -0
- package/dist/experimental/generative_agents/generative_agent.js +3 -0
- package/dist/experimental/generative_agents/generative_agent_memory.cjs +3 -0
- package/dist/experimental/generative_agents/generative_agent_memory.d.ts +1 -0
- package/dist/experimental/generative_agents/generative_agent_memory.js +3 -0
- package/dist/experimental/plan_and_execute/agent_executor.cjs +3 -0
- package/dist/experimental/plan_and_execute/agent_executor.d.ts +1 -0
- package/dist/experimental/plan_and_execute/agent_executor.js +3 -0
- package/dist/llms/cohere.cjs +3 -0
- package/dist/llms/cohere.d.ts +1 -0
- package/dist/llms/cohere.js +3 -0
- package/dist/llms/ollama.cjs +3 -0
- package/dist/llms/ollama.d.ts +1 -0
- package/dist/llms/ollama.js +3 -0
- package/dist/llms/openai-chat.cjs +18 -4
- package/dist/llms/openai-chat.d.ts +6 -4
- package/dist/llms/openai-chat.js +18 -4
- package/dist/llms/openai.cjs +20 -6
- package/dist/llms/openai.d.ts +5 -3
- package/dist/llms/openai.js +20 -6
- package/dist/llms/replicate.cjs +3 -0
- package/dist/llms/replicate.d.ts +1 -0
- package/dist/llms/replicate.js +3 -0
- package/dist/load/import_constants.cjs +1 -0
- package/dist/load/import_constants.js +1 -0
- package/dist/load/index.cjs +7 -1
- package/dist/load/index.js +7 -1
- package/dist/load/serializable.cjs +42 -3
- package/dist/load/serializable.d.ts +16 -0
- package/dist/load/serializable.js +40 -2
- package/dist/output_parsers/combining.cjs +3 -0
- package/dist/output_parsers/combining.d.ts +1 -0
- package/dist/output_parsers/combining.js +3 -0
- package/dist/output_parsers/fix.cjs +3 -0
- package/dist/output_parsers/fix.d.ts +1 -0
- package/dist/output_parsers/fix.js +3 -0
- package/dist/output_parsers/list.cjs +3 -0
- package/dist/output_parsers/list.d.ts +1 -0
- package/dist/output_parsers/list.js +3 -0
- package/dist/output_parsers/noop.cjs +3 -0
- package/dist/output_parsers/noop.d.ts +1 -0
- package/dist/output_parsers/noop.js +3 -0
- package/dist/output_parsers/openai_functions.cjs +9 -0
- package/dist/output_parsers/openai_functions.d.ts +3 -0
- package/dist/output_parsers/openai_functions.js +9 -0
- package/dist/output_parsers/regex.cjs +3 -0
- package/dist/output_parsers/regex.d.ts +1 -0
- package/dist/output_parsers/regex.js +3 -0
- package/dist/output_parsers/structured.cjs +6 -0
- package/dist/output_parsers/structured.d.ts +2 -0
- package/dist/output_parsers/structured.js +6 -0
- package/dist/prompts/chat.cjs +21 -0
- package/dist/prompts/chat.d.ts +7 -0
- package/dist/prompts/chat.js +21 -0
- package/dist/prompts/pipeline.cjs +3 -0
- package/dist/prompts/pipeline.d.ts +1 -0
- package/dist/prompts/pipeline.js +3 -0
- package/dist/prompts/prompt.cjs +3 -0
- package/dist/prompts/prompt.d.ts +1 -0
- package/dist/prompts/prompt.js +3 -0
- package/dist/retrievers/amazon_kendra.cjs +3 -0
- package/dist/retrievers/amazon_kendra.d.ts +1 -0
- package/dist/retrievers/amazon_kendra.js +3 -0
- package/dist/retrievers/contextual_compression.cjs +3 -0
- package/dist/retrievers/contextual_compression.d.ts +1 -0
- package/dist/retrievers/contextual_compression.js +3 -0
- package/dist/retrievers/databerry.cjs +3 -0
- package/dist/retrievers/databerry.d.ts +1 -0
- package/dist/retrievers/databerry.js +3 -0
- package/dist/retrievers/hyde.cjs +3 -0
- package/dist/retrievers/hyde.d.ts +1 -0
- package/dist/retrievers/hyde.js +3 -0
- package/dist/retrievers/metal.cjs +3 -0
- package/dist/retrievers/metal.d.ts +1 -0
- package/dist/retrievers/metal.js +3 -0
- package/dist/retrievers/parent_document.cjs +3 -0
- package/dist/retrievers/parent_document.d.ts +1 -0
- package/dist/retrievers/parent_document.js +3 -0
- package/dist/retrievers/self_query/index.cjs +3 -0
- package/dist/retrievers/self_query/index.d.ts +1 -0
- package/dist/retrievers/self_query/index.js +3 -0
- package/dist/retrievers/self_query/supabase.cjs +28 -7
- package/dist/retrievers/self_query/supabase.d.ts +2 -2
- package/dist/retrievers/self_query/supabase.js +29 -8
- package/dist/retrievers/self_query/supabase_utils.cjs +177 -0
- package/dist/retrievers/self_query/supabase_utils.d.ts +24 -0
- package/dist/retrievers/self_query/supabase_utils.js +172 -0
- package/dist/retrievers/self_query/utils.cjs +19 -3
- package/dist/retrievers/self_query/utils.d.ts +3 -0
- package/dist/retrievers/self_query/utils.js +15 -2
- package/dist/retrievers/self_query/weaviate.cjs +3 -14
- package/dist/retrievers/self_query/weaviate.js +1 -12
- package/dist/retrievers/supabase.cjs +3 -0
- package/dist/retrievers/supabase.d.ts +1 -0
- package/dist/retrievers/supabase.js +3 -0
- package/dist/retrievers/time_weighted.cjs +3 -0
- package/dist/retrievers/time_weighted.d.ts +1 -0
- package/dist/retrievers/time_weighted.js +3 -0
- package/dist/retrievers/vespa.cjs +3 -0
- package/dist/retrievers/vespa.d.ts +1 -0
- package/dist/retrievers/vespa.js +3 -0
- package/dist/retrievers/zep.cjs +3 -0
- package/dist/retrievers/zep.d.ts +1 -0
- package/dist/retrievers/zep.js +3 -0
- package/dist/schema/index.cjs +32 -2
- package/dist/schema/index.d.ts +14 -0
- package/dist/schema/index.js +32 -2
- package/dist/schema/output_parser.cjs +6 -0
- package/dist/schema/output_parser.d.ts +2 -0
- package/dist/schema/output_parser.js +6 -0
- package/dist/schema/runnable.cjs +25 -7
- package/dist/schema/runnable.d.ts +6 -0
- package/dist/schema/runnable.js +25 -7
- package/dist/stores/message/utils.cjs +5 -0
- package/dist/stores/message/utils.js +6 -1
- package/dist/text_splitter.cjs +9 -0
- package/dist/text_splitter.d.ts +3 -0
- package/dist/text_splitter.js +9 -0
- package/dist/tools/IFTTTWebhook.cjs +3 -0
- package/dist/tools/IFTTTWebhook.d.ts +1 -0
- package/dist/tools/IFTTTWebhook.js +3 -0
- package/dist/tools/aiplugin.cjs +3 -0
- package/dist/tools/aiplugin.d.ts +1 -0
- package/dist/tools/aiplugin.js +3 -0
- package/dist/tools/aws_sfn.cjs +9 -0
- package/dist/tools/aws_sfn.d.ts +3 -0
- package/dist/tools/aws_sfn.js +9 -0
- package/dist/tools/bingserpapi.cjs +3 -0
- package/dist/tools/bingserpapi.d.ts +1 -0
- package/dist/tools/bingserpapi.js +3 -0
- package/dist/tools/brave_search.cjs +3 -0
- package/dist/tools/brave_search.d.ts +1 -0
- package/dist/tools/brave_search.js +3 -0
- package/dist/tools/calculator.cjs +3 -0
- package/dist/tools/calculator.d.ts +1 -0
- package/dist/tools/calculator.js +3 -0
- package/dist/tools/chain.cjs +3 -0
- package/dist/tools/chain.d.ts +1 -0
- package/dist/tools/chain.js +3 -0
- package/dist/tools/dadjokeapi.cjs +3 -0
- package/dist/tools/dadjokeapi.d.ts +1 -0
- package/dist/tools/dadjokeapi.js +3 -0
- package/dist/tools/dataforseo_api_search.cjs +3 -0
- package/dist/tools/dataforseo_api_search.d.ts +1 -0
- package/dist/tools/dataforseo_api_search.js +3 -0
- package/dist/tools/dynamic.cjs +6 -0
- package/dist/tools/dynamic.d.ts +2 -0
- package/dist/tools/dynamic.js +6 -0
- package/dist/tools/fs.cjs +6 -0
- package/dist/tools/fs.d.ts +2 -0
- package/dist/tools/fs.js +6 -0
- package/dist/tools/google_custom_search.cjs +3 -0
- package/dist/tools/google_custom_search.d.ts +1 -0
- package/dist/tools/google_custom_search.js +3 -0
- package/dist/tools/json.cjs +7 -1
- package/dist/tools/json.d.ts +2 -0
- package/dist/tools/json.js +7 -1
- package/dist/tools/requests.cjs +8 -2
- package/dist/tools/requests.d.ts +2 -0
- package/dist/tools/requests.js +8 -2
- package/dist/tools/searxng_search.cjs +3 -0
- package/dist/tools/searxng_search.d.ts +1 -0
- package/dist/tools/searxng_search.js +3 -0
- package/dist/tools/serpapi.cjs +3 -0
- package/dist/tools/serpapi.d.ts +1 -0
- package/dist/tools/serpapi.js +3 -0
- package/dist/tools/serper.cjs +3 -0
- package/dist/tools/serper.d.ts +1 -0
- package/dist/tools/serper.js +3 -0
- package/dist/tools/sql.cjs +12 -0
- package/dist/tools/sql.d.ts +4 -0
- package/dist/tools/sql.js +12 -0
- package/dist/tools/vectorstore.cjs +3 -0
- package/dist/tools/vectorstore.d.ts +1 -0
- package/dist/tools/vectorstore.js +3 -0
- package/dist/tools/webbrowser.cjs +3 -0
- package/dist/tools/webbrowser.d.ts +1 -0
- package/dist/tools/webbrowser.js +3 -0
- package/dist/tools/wikipedia_query_run.cjs +3 -0
- package/dist/tools/wikipedia_query_run.d.ts +1 -0
- package/dist/tools/wikipedia_query_run.js +3 -0
- package/dist/tools/zapier.cjs +3 -0
- package/dist/tools/zapier.d.ts +1 -0
- package/dist/tools/zapier.js +3 -0
- package/dist/vectorstores/base.cjs +3 -0
- package/dist/vectorstores/base.d.ts +1 -0
- package/dist/vectorstores/base.js +3 -0
- package/dist/vectorstores/elasticsearch.cjs +1 -0
- package/dist/vectorstores/elasticsearch.js +1 -0
- package/dist/vectorstores/hnswlib.cjs +19 -0
- package/dist/vectorstores/hnswlib.d.ts +3 -0
- package/dist/vectorstores/hnswlib.js +19 -0
- package/dist/vectorstores/myscale.cjs +1 -1
- package/dist/vectorstores/myscale.js +1 -1
- package/dist/vectorstores/supabase.d.ts +1 -2
- package/document_loaders/web/youtube.cjs +1 -0
- package/document_loaders/web/youtube.d.ts +1 -0
- package/document_loaders/web/youtube.js +1 -0
- package/package.json +27 -3
|
@@ -12,6 +12,9 @@ const DEFAULT_HUMAN_MESSAGE_TEMPLATE = "{input}\n\n{agent_scratchpad}";
|
|
|
12
12
|
* @augments Agent
|
|
13
13
|
*/
|
|
14
14
|
class ChatAgent extends agent_js_1.Agent {
|
|
15
|
+
static lc_name() {
|
|
16
|
+
return "ChatAgent";
|
|
17
|
+
}
|
|
15
18
|
constructor(input) {
|
|
16
19
|
const outputParser = input?.outputParser ?? ChatAgent.getDefaultOutputParser();
|
|
17
20
|
super({ ...input, outputParser });
|
|
@@ -9,6 +9,9 @@ const DEFAULT_HUMAN_MESSAGE_TEMPLATE = "{input}\n\n{agent_scratchpad}";
|
|
|
9
9
|
* @augments Agent
|
|
10
10
|
*/
|
|
11
11
|
export class ChatAgent extends Agent {
|
|
12
|
+
static lc_name() {
|
|
13
|
+
return "ChatAgent";
|
|
14
|
+
}
|
|
12
15
|
constructor(input) {
|
|
13
16
|
const outputParser = input?.outputParser ?? ChatAgent.getDefaultOutputParser();
|
|
14
17
|
super({ ...input, outputParser });
|
|
@@ -13,6 +13,9 @@ const prompt_js_1 = require("./prompt.cjs");
|
|
|
13
13
|
* @augments Agent
|
|
14
14
|
*/
|
|
15
15
|
class ChatConversationalAgent extends agent_js_1.Agent {
|
|
16
|
+
static lc_name() {
|
|
17
|
+
return "ChatConversationalAgent";
|
|
18
|
+
}
|
|
16
19
|
constructor(input) {
|
|
17
20
|
const outputParser = input.outputParser ?? ChatConversationalAgent.getDefaultOutputParser();
|
|
18
21
|
super({ ...input, outputParser });
|
|
@@ -21,6 +21,7 @@ export type ChatConversationalAgentInput = Optional<AgentInput, "outputParser">;
|
|
|
21
21
|
* @augments Agent
|
|
22
22
|
*/
|
|
23
23
|
export declare class ChatConversationalAgent extends Agent {
|
|
24
|
+
static lc_name(): string;
|
|
24
25
|
lc_namespace: string[];
|
|
25
26
|
ToolType: Tool;
|
|
26
27
|
constructor(input: ChatConversationalAgentInput);
|
|
@@ -10,6 +10,9 @@ import { PREFIX_END, DEFAULT_PREFIX, DEFAULT_SUFFIX, TEMPLATE_TOOL_RESPONSE, } f
|
|
|
10
10
|
* @augments Agent
|
|
11
11
|
*/
|
|
12
12
|
export class ChatConversationalAgent extends Agent {
|
|
13
|
+
static lc_name() {
|
|
14
|
+
return "ChatConversationalAgent";
|
|
15
|
+
}
|
|
13
16
|
constructor(input) {
|
|
14
17
|
const outputParser = input.outputParser ?? ChatConversationalAgent.getDefaultOutputParser();
|
|
15
18
|
super({ ...input, outputParser });
|
package/dist/agents/executor.cjs
CHANGED
|
@@ -16,6 +16,7 @@ export interface AgentExecutorInput extends ChainInputs {
|
|
|
16
16
|
* @augments BaseChain
|
|
17
17
|
*/
|
|
18
18
|
export declare class AgentExecutor extends BaseChain {
|
|
19
|
+
static lc_name(): string;
|
|
19
20
|
get lc_namespace(): string[];
|
|
20
21
|
agent: BaseSingleActionAgent | BaseMultiActionAgent;
|
|
21
22
|
tools: this["agent"]["ToolType"][];
|
package/dist/agents/executor.js
CHANGED
|
@@ -13,6 +13,9 @@ const prompt_js_2 = require("./prompt.cjs");
|
|
|
13
13
|
* @augments Agent
|
|
14
14
|
*/
|
|
15
15
|
class ZeroShotAgent extends agent_js_1.Agent {
|
|
16
|
+
static lc_name() {
|
|
17
|
+
return "ZeroShotAgent";
|
|
18
|
+
}
|
|
16
19
|
constructor(input) {
|
|
17
20
|
const outputParser = input?.outputParser ?? ZeroShotAgent.getDefaultOutputParser();
|
|
18
21
|
super({ ...input, outputParser });
|
|
@@ -19,6 +19,7 @@ export type ZeroShotAgentInput = Optional<AgentInput, "outputParser">;
|
|
|
19
19
|
* @augments Agent
|
|
20
20
|
*/
|
|
21
21
|
export declare class ZeroShotAgent extends Agent {
|
|
22
|
+
static lc_name(): string;
|
|
22
23
|
lc_namespace: string[];
|
|
23
24
|
ToolType: Tool;
|
|
24
25
|
constructor(input: ZeroShotAgentInput);
|
|
@@ -10,6 +10,9 @@ import { FORMAT_INSTRUCTIONS, PREFIX, SUFFIX } from "./prompt.js";
|
|
|
10
10
|
* @augments Agent
|
|
11
11
|
*/
|
|
12
12
|
export class ZeroShotAgent extends Agent {
|
|
13
|
+
static lc_name() {
|
|
14
|
+
return "ZeroShotAgent";
|
|
15
|
+
}
|
|
13
16
|
constructor(input) {
|
|
14
17
|
const outputParser = input?.outputParser ?? ZeroShotAgent.getDefaultOutputParser();
|
|
15
18
|
super({ ...input, outputParser });
|
|
@@ -46,6 +46,9 @@ function _formatIntermediateSteps(intermediateSteps) {
|
|
|
46
46
|
}
|
|
47
47
|
exports._formatIntermediateSteps = _formatIntermediateSteps;
|
|
48
48
|
class OpenAIAgent extends agent_js_1.Agent {
|
|
49
|
+
static lc_name() {
|
|
50
|
+
return "OpenAIAgent";
|
|
51
|
+
}
|
|
49
52
|
_agentType() {
|
|
50
53
|
return "openai-functions";
|
|
51
54
|
}
|
|
@@ -14,6 +14,7 @@ export interface OpenAIAgentCreatePromptArgs {
|
|
|
14
14
|
systemMessage?: SystemMessage;
|
|
15
15
|
}
|
|
16
16
|
export declare class OpenAIAgent extends Agent {
|
|
17
|
+
static lc_name(): string;
|
|
17
18
|
lc_namespace: string[];
|
|
18
19
|
_agentType(): "openai-functions";
|
|
19
20
|
observationPrefix(): string;
|
|
@@ -42,6 +42,9 @@ export function _formatIntermediateSteps(intermediateSteps) {
|
|
|
42
42
|
return intermediateSteps.flatMap(({ action, observation }) => _convertAgentStepToMessages(action, observation));
|
|
43
43
|
}
|
|
44
44
|
export class OpenAIAgent extends Agent {
|
|
45
|
+
static lc_name() {
|
|
46
|
+
return "OpenAIAgent";
|
|
47
|
+
}
|
|
45
48
|
_agentType() {
|
|
46
49
|
return "openai-functions";
|
|
47
50
|
}
|
|
@@ -13,6 +13,9 @@ const prompt_js_2 = require("./prompt.cjs");
|
|
|
13
13
|
* @augments Agent
|
|
14
14
|
*/
|
|
15
15
|
class StructuredChatAgent extends agent_js_1.Agent {
|
|
16
|
+
static lc_name() {
|
|
17
|
+
return "StructuredChatAgent";
|
|
18
|
+
}
|
|
16
19
|
constructor(input) {
|
|
17
20
|
const outputParser = input?.outputParser ?? StructuredChatAgent.getDefaultOutputParser();
|
|
18
21
|
super({ ...input, outputParser });
|
|
@@ -22,6 +22,7 @@ export type StructuredChatAgentInput = Optional<AgentInput, "outputParser">;
|
|
|
22
22
|
* @augments Agent
|
|
23
23
|
*/
|
|
24
24
|
export declare class StructuredChatAgent extends Agent {
|
|
25
|
+
static lc_name(): string;
|
|
25
26
|
lc_namespace: string[];
|
|
26
27
|
constructor(input: StructuredChatAgentInput);
|
|
27
28
|
_agentType(): "structured-chat-zero-shot-react-description";
|
|
@@ -10,6 +10,9 @@ import { FORMAT_INSTRUCTIONS, PREFIX, SUFFIX } from "./prompt.js";
|
|
|
10
10
|
* @augments Agent
|
|
11
11
|
*/
|
|
12
12
|
export class StructuredChatAgent extends Agent {
|
|
13
|
+
static lc_name() {
|
|
14
|
+
return "StructuredChatAgent";
|
|
15
|
+
}
|
|
13
16
|
constructor(input) {
|
|
14
17
|
const outputParser = input?.outputParser ?? StructuredChatAgent.getDefaultOutputParser();
|
|
15
18
|
super({ ...input, outputParser });
|
package/dist/callbacks/base.cjs
CHANGED
|
@@ -41,6 +41,24 @@ class BaseCallbackHandler extends BaseCallbackHandlerMethodsClass {
|
|
|
41
41
|
get lc_aliases() {
|
|
42
42
|
return undefined;
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* The name of the serializable. Override to provide an alias or
|
|
46
|
+
* to preserve the serialized module name in minified environments.
|
|
47
|
+
*
|
|
48
|
+
* Implemented as a static method to support loading logic.
|
|
49
|
+
*/
|
|
50
|
+
static lc_name() {
|
|
51
|
+
return this.name;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The final serialized identifier for the module.
|
|
55
|
+
*/
|
|
56
|
+
get lc_id() {
|
|
57
|
+
return [
|
|
58
|
+
...this.lc_namespace,
|
|
59
|
+
(0, serializable_js_1.get_lc_unique_name)(this.constructor),
|
|
60
|
+
];
|
|
61
|
+
}
|
|
44
62
|
constructor(input) {
|
|
45
63
|
super();
|
|
46
64
|
Object.defineProperty(this, "lc_serializable", {
|
package/dist/callbacks/base.d.ts
CHANGED
|
@@ -106,6 +106,17 @@ export declare abstract class BaseCallbackHandler extends BaseCallbackHandlerMet
|
|
|
106
106
|
get lc_aliases(): {
|
|
107
107
|
[key: string]: string;
|
|
108
108
|
} | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* The name of the serializable. Override to provide an alias or
|
|
111
|
+
* to preserve the serialized module name in minified environments.
|
|
112
|
+
*
|
|
113
|
+
* Implemented as a static method to support loading logic.
|
|
114
|
+
*/
|
|
115
|
+
static lc_name(): string;
|
|
116
|
+
/**
|
|
117
|
+
* The final serialized identifier for the module.
|
|
118
|
+
*/
|
|
119
|
+
get lc_id(): string[];
|
|
109
120
|
lc_kwargs: SerializedFields;
|
|
110
121
|
abstract name: string;
|
|
111
122
|
ignoreLLM: boolean;
|
|
@@ -130,6 +141,10 @@ export declare abstract class BaseCallbackHandler extends BaseCallbackHandlerMet
|
|
|
130
141
|
readonly lc_aliases: {
|
|
131
142
|
[key: string]: string;
|
|
132
143
|
} | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* The final serialized identifier for the module.
|
|
146
|
+
*/
|
|
147
|
+
readonly lc_id: string[];
|
|
133
148
|
lc_kwargs: SerializedFields;
|
|
134
149
|
ignoreLLM: boolean;
|
|
135
150
|
ignoreChain: boolean;
|
package/dist/callbacks/base.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as uuid from "uuid";
|
|
2
|
-
import { Serializable, } from "../load/serializable.js";
|
|
2
|
+
import { Serializable, get_lc_unique_name, } from "../load/serializable.js";
|
|
3
3
|
class BaseCallbackHandlerMethodsClass {
|
|
4
4
|
}
|
|
5
5
|
export class BaseCallbackHandler extends BaseCallbackHandlerMethodsClass {
|
|
@@ -15,6 +15,24 @@ export class BaseCallbackHandler extends BaseCallbackHandlerMethodsClass {
|
|
|
15
15
|
get lc_aliases() {
|
|
16
16
|
return undefined;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* The name of the serializable. Override to provide an alias or
|
|
20
|
+
* to preserve the serialized module name in minified environments.
|
|
21
|
+
*
|
|
22
|
+
* Implemented as a static method to support loading logic.
|
|
23
|
+
*/
|
|
24
|
+
static lc_name() {
|
|
25
|
+
return this.name;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The final serialized identifier for the module.
|
|
29
|
+
*/
|
|
30
|
+
get lc_id() {
|
|
31
|
+
return [
|
|
32
|
+
...this.lc_namespace,
|
|
33
|
+
get_lc_unique_name(this.constructor),
|
|
34
|
+
];
|
|
35
|
+
}
|
|
18
36
|
constructor(input) {
|
|
19
37
|
super();
|
|
20
38
|
Object.defineProperty(this, "lc_serializable", {
|
|
@@ -495,7 +495,7 @@ class CallbackManager extends BaseCallbackManager {
|
|
|
495
495
|
: localHandlers?.handlers, false);
|
|
496
496
|
}
|
|
497
497
|
const verboseEnabled = (0, env_js_1.getEnvironmentVariable)("LANGCHAIN_VERBOSE") || options?.verbose;
|
|
498
|
-
const tracingV2Enabled = (0, env_js_1.getEnvironmentVariable)("LANGCHAIN_TRACING_V2")
|
|
498
|
+
const tracingV2Enabled = (0, env_js_1.getEnvironmentVariable)("LANGCHAIN_TRACING_V2") === "true";
|
|
499
499
|
const tracingEnabled = tracingV2Enabled ||
|
|
500
500
|
((0, env_js_1.getEnvironmentVariable)("LANGCHAIN_TRACING") ?? false);
|
|
501
501
|
if (verboseEnabled || tracingEnabled) {
|
|
@@ -486,7 +486,7 @@ export class CallbackManager extends BaseCallbackManager {
|
|
|
486
486
|
: localHandlers?.handlers, false);
|
|
487
487
|
}
|
|
488
488
|
const verboseEnabled = getEnvironmentVariable("LANGCHAIN_VERBOSE") || options?.verbose;
|
|
489
|
-
const tracingV2Enabled = getEnvironmentVariable("LANGCHAIN_TRACING_V2")
|
|
489
|
+
const tracingV2Enabled = getEnvironmentVariable("LANGCHAIN_TRACING_V2") === "true";
|
|
490
490
|
const tracingEnabled = tracingV2Enabled ||
|
|
491
491
|
(getEnvironmentVariable("LANGCHAIN_TRACING") ?? false);
|
|
492
492
|
if (verboseEnabled || tracingEnabled) {
|
|
@@ -9,6 +9,9 @@ const text_splitter_js_1 = require("../text_splitter.cjs");
|
|
|
9
9
|
* @augments StuffDocumentsChainInput
|
|
10
10
|
*/
|
|
11
11
|
class AnalyzeDocumentChain extends base_js_1.BaseChain {
|
|
12
|
+
static lc_name() {
|
|
13
|
+
return "AnalyzeDocumentChain";
|
|
14
|
+
}
|
|
12
15
|
constructor(fields) {
|
|
13
16
|
super(fields);
|
|
14
17
|
Object.defineProperty(this, "inputKey", {
|
|
@@ -15,6 +15,7 @@ export interface AnalyzeDocumentChainInput extends Omit<ChainInputs, "memory"> {
|
|
|
15
15
|
* @augments StuffDocumentsChainInput
|
|
16
16
|
*/
|
|
17
17
|
export declare class AnalyzeDocumentChain extends BaseChain implements AnalyzeDocumentChainInput {
|
|
18
|
+
static lc_name(): string;
|
|
18
19
|
inputKey: string;
|
|
19
20
|
combineDocumentsChain: BaseChain;
|
|
20
21
|
textSplitter: TextSplitter;
|
|
@@ -6,6 +6,9 @@ import { RecursiveCharacterTextSplitter, } from "../text_splitter.js";
|
|
|
6
6
|
* @augments StuffDocumentsChainInput
|
|
7
7
|
*/
|
|
8
8
|
export class AnalyzeDocumentChain extends BaseChain {
|
|
9
|
+
static lc_name() {
|
|
10
|
+
return "AnalyzeDocumentChain";
|
|
11
|
+
}
|
|
9
12
|
constructor(fields) {
|
|
10
13
|
super(fields);
|
|
11
14
|
Object.defineProperty(this, "inputKey", {
|
|
@@ -10,6 +10,9 @@ const prompt_js_1 = require("../prompts/prompt.cjs");
|
|
|
10
10
|
* @augments StuffDocumentsChainInput
|
|
11
11
|
*/
|
|
12
12
|
class StuffDocumentsChain extends base_js_1.BaseChain {
|
|
13
|
+
static lc_name() {
|
|
14
|
+
return "StuffDocumentsChain";
|
|
15
|
+
}
|
|
13
16
|
get inputKeys() {
|
|
14
17
|
return [this.inputKey, ...this.llmChain.inputKeys].filter((key) => key !== this.documentVariableName);
|
|
15
18
|
}
|
|
@@ -84,6 +87,9 @@ exports.StuffDocumentsChain = StuffDocumentsChain;
|
|
|
84
87
|
* @augments StuffDocumentsChainInput
|
|
85
88
|
*/
|
|
86
89
|
class MapReduceDocumentsChain extends base_js_1.BaseChain {
|
|
90
|
+
static lc_name() {
|
|
91
|
+
return "MapReduceDocumentsChain";
|
|
92
|
+
}
|
|
87
93
|
get inputKeys() {
|
|
88
94
|
return [this.inputKey, ...this.combineDocumentChain.inputKeys];
|
|
89
95
|
}
|
|
@@ -238,6 +244,9 @@ exports.MapReduceDocumentsChain = MapReduceDocumentsChain;
|
|
|
238
244
|
* @augments RefineDocumentsChainInput
|
|
239
245
|
*/
|
|
240
246
|
class RefineDocumentsChain extends base_js_1.BaseChain {
|
|
247
|
+
static lc_name() {
|
|
248
|
+
return "RefineDocumentsChain";
|
|
249
|
+
}
|
|
241
250
|
get defaultDocumentPrompt() {
|
|
242
251
|
return new prompt_js_1.PromptTemplate({
|
|
243
252
|
inputVariables: ["page_content"],
|
|
@@ -18,6 +18,7 @@ export interface StuffDocumentsChainInput extends ChainInputs {
|
|
|
18
18
|
* @augments StuffDocumentsChainInput
|
|
19
19
|
*/
|
|
20
20
|
export declare class StuffDocumentsChain extends BaseChain implements StuffDocumentsChainInput {
|
|
21
|
+
static lc_name(): string;
|
|
21
22
|
llmChain: LLMChain;
|
|
22
23
|
inputKey: string;
|
|
23
24
|
documentVariableName: string;
|
|
@@ -50,6 +51,7 @@ export interface MapReduceDocumentsChainInput extends StuffDocumentsChainInput {
|
|
|
50
51
|
* @augments StuffDocumentsChainInput
|
|
51
52
|
*/
|
|
52
53
|
export declare class MapReduceDocumentsChain extends BaseChain implements MapReduceDocumentsChainInput {
|
|
54
|
+
static lc_name(): string;
|
|
53
55
|
llmChain: LLMChain;
|
|
54
56
|
inputKey: string;
|
|
55
57
|
documentVariableName: string;
|
|
@@ -80,6 +82,7 @@ export interface RefineDocumentsChainInput extends StuffDocumentsChainInput {
|
|
|
80
82
|
* @augments RefineDocumentsChainInput
|
|
81
83
|
*/
|
|
82
84
|
export declare class RefineDocumentsChain extends BaseChain implements RefineDocumentsChainInput {
|
|
85
|
+
static lc_name(): string;
|
|
83
86
|
llmChain: LLMChain;
|
|
84
87
|
inputKey: string;
|
|
85
88
|
outputKey: string;
|
|
@@ -7,6 +7,9 @@ import { PromptTemplate } from "../prompts/prompt.js";
|
|
|
7
7
|
* @augments StuffDocumentsChainInput
|
|
8
8
|
*/
|
|
9
9
|
export class StuffDocumentsChain extends BaseChain {
|
|
10
|
+
static lc_name() {
|
|
11
|
+
return "StuffDocumentsChain";
|
|
12
|
+
}
|
|
10
13
|
get inputKeys() {
|
|
11
14
|
return [this.inputKey, ...this.llmChain.inputKeys].filter((key) => key !== this.documentVariableName);
|
|
12
15
|
}
|
|
@@ -80,6 +83,9 @@ export class StuffDocumentsChain extends BaseChain {
|
|
|
80
83
|
* @augments StuffDocumentsChainInput
|
|
81
84
|
*/
|
|
82
85
|
export class MapReduceDocumentsChain extends BaseChain {
|
|
86
|
+
static lc_name() {
|
|
87
|
+
return "MapReduceDocumentsChain";
|
|
88
|
+
}
|
|
83
89
|
get inputKeys() {
|
|
84
90
|
return [this.inputKey, ...this.combineDocumentChain.inputKeys];
|
|
85
91
|
}
|
|
@@ -233,6 +239,9 @@ export class MapReduceDocumentsChain extends BaseChain {
|
|
|
233
239
|
* @augments RefineDocumentsChainInput
|
|
234
240
|
*/
|
|
235
241
|
export class RefineDocumentsChain extends BaseChain {
|
|
242
|
+
static lc_name() {
|
|
243
|
+
return "RefineDocumentsChain";
|
|
244
|
+
}
|
|
236
245
|
get defaultDocumentPrompt() {
|
|
237
246
|
return new PromptTemplate({
|
|
238
247
|
inputVariables: ["page_content"],
|
|
@@ -6,6 +6,9 @@ const llm_chain_js_1 = require("../llm_chain.cjs");
|
|
|
6
6
|
const constitutional_principle_js_1 = require("./constitutional_principle.cjs");
|
|
7
7
|
const constitutional_prompts_js_1 = require("./constitutional_prompts.cjs");
|
|
8
8
|
class ConstitutionalChain extends base_js_1.BaseChain {
|
|
9
|
+
static lc_name() {
|
|
10
|
+
return "ConstitutionalChain";
|
|
11
|
+
}
|
|
9
12
|
get inputKeys() {
|
|
10
13
|
return this.chain.inputKeys;
|
|
11
14
|
}
|
|
@@ -12,6 +12,7 @@ export interface ConstitutionalChainInput extends ChainInputs {
|
|
|
12
12
|
revisionChain: LLMChain;
|
|
13
13
|
}
|
|
14
14
|
export declare class ConstitutionalChain extends BaseChain implements ConstitutionalChainInput {
|
|
15
|
+
static lc_name(): string;
|
|
15
16
|
chain: LLMChain;
|
|
16
17
|
constitutionalPrinciples: ConstitutionalPrinciple[];
|
|
17
18
|
critiqueChain: LLMChain;
|
|
@@ -3,6 +3,9 @@ import { LLMChain } from "../llm_chain.js";
|
|
|
3
3
|
import { PRINCIPLES, } from "./constitutional_principle.js";
|
|
4
4
|
import { CRITIQUE_PROMPT, REVISION_PROMPT } from "./constitutional_prompts.js";
|
|
5
5
|
export class ConstitutionalChain extends BaseChain {
|
|
6
|
+
static lc_name() {
|
|
7
|
+
return "ConstitutionalChain";
|
|
8
|
+
}
|
|
6
9
|
get inputKeys() {
|
|
7
10
|
return this.chain.inputKeys;
|
|
8
11
|
}
|
|
@@ -2,5 +2,6 @@ import { LLMChain, LLMChainInput } from "./llm_chain.js";
|
|
|
2
2
|
import { Optional } from "../types/type-utils.js";
|
|
3
3
|
export declare const DEFAULT_TEMPLATE = "The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\n\nCurrent conversation:\n{history}\nHuman: {input}\nAI:";
|
|
4
4
|
export declare class ConversationChain extends LLMChain {
|
|
5
|
+
static lc_name(): string;
|
|
5
6
|
constructor({ prompt, outputKey, memory, ...rest }: Optional<LLMChainInput, "prompt">);
|
|
6
7
|
}
|
|
@@ -13,6 +13,9 @@ Chat History:
|
|
|
13
13
|
Follow Up Input: {question}
|
|
14
14
|
Standalone question:`;
|
|
15
15
|
class ConversationalRetrievalQAChain extends base_js_1.BaseChain {
|
|
16
|
+
static lc_name() {
|
|
17
|
+
return "ConversationalRetrievalQAChain";
|
|
18
|
+
}
|
|
16
19
|
get inputKeys() {
|
|
17
20
|
return [this.inputKey, this.chatHistoryKey];
|
|
18
21
|
}
|
|
@@ -15,6 +15,7 @@ export interface ConversationalRetrievalQAChainInput extends ChainInputs {
|
|
|
15
15
|
inputKey?: string;
|
|
16
16
|
}
|
|
17
17
|
export declare class ConversationalRetrievalQAChain extends BaseChain implements ConversationalRetrievalQAChainInput {
|
|
18
|
+
static lc_name(): string;
|
|
18
19
|
inputKey: string;
|
|
19
20
|
chatHistoryKey: string;
|
|
20
21
|
get inputKeys(): string[];
|
|
@@ -10,6 +10,9 @@ Chat History:
|
|
|
10
10
|
Follow Up Input: {question}
|
|
11
11
|
Standalone question:`;
|
|
12
12
|
export class ConversationalRetrievalQAChain extends BaseChain {
|
|
13
|
+
static lc_name() {
|
|
14
|
+
return "ConversationalRetrievalQAChain";
|
|
15
|
+
}
|
|
13
16
|
get inputKeys() {
|
|
14
17
|
return [this.inputKey, this.chatHistoryKey];
|
|
15
18
|
}
|
|
@@ -32,6 +32,7 @@ export interface LLMChainInput<T extends string | object = string, L extends Bas
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
export declare class LLMChain<T extends string | object = string, L extends BaseLanguageModel = BaseLanguageModel> extends BaseChain implements LLMChainInput<T> {
|
|
35
|
+
static lc_name(): string;
|
|
35
36
|
lc_serializable: boolean;
|
|
36
37
|
prompt: BasePromptTemplate;
|
|
37
38
|
llm: L;
|
package/dist/chains/llm_chain.js
CHANGED
|
@@ -272,6 +272,9 @@ function convertOpenAPISpecToOpenAIFunctions(spec) {
|
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
class SimpleRequestChain extends base_js_1.BaseChain {
|
|
275
|
+
static lc_name() {
|
|
276
|
+
return "SimpleRequestChain";
|
|
277
|
+
}
|
|
275
278
|
constructor(config) {
|
|
276
279
|
super();
|
|
277
280
|
Object.defineProperty(this, "requestMethod", {
|
|
@@ -269,6 +269,9 @@ function convertOpenAPISpecToOpenAIFunctions(spec) {
|
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
271
|
class SimpleRequestChain extends BaseChain {
|
|
272
|
+
static lc_name() {
|
|
273
|
+
return "SimpleRequestChain";
|
|
274
|
+
}
|
|
272
275
|
constructor(config) {
|
|
273
276
|
super();
|
|
274
277
|
Object.defineProperty(this, "requestMethod", {
|
|
@@ -10,6 +10,9 @@ const axios_fetch_adapter_js_1 = __importDefault(require("../util/axios-fetch-ad
|
|
|
10
10
|
const async_caller_js_1 = require("../util/async_caller.cjs");
|
|
11
11
|
const env_js_1 = require("../util/env.cjs");
|
|
12
12
|
class OpenAIModerationChain extends base_js_1.BaseChain {
|
|
13
|
+
static lc_name() {
|
|
14
|
+
return "OpenAIModerationChain";
|
|
15
|
+
}
|
|
13
16
|
get lc_secrets() {
|
|
14
17
|
return {
|
|
15
18
|
openAIApiKey: "OPENAI_API_KEY",
|
|
@@ -9,6 +9,7 @@ export interface OpenAIModerationChainInput extends ChainInputs, AsyncCallerPara
|
|
|
9
9
|
configuration?: ConfigurationParameters;
|
|
10
10
|
}
|
|
11
11
|
export declare class OpenAIModerationChain extends BaseChain implements OpenAIModerationChainInput {
|
|
12
|
+
static lc_name(): string;
|
|
12
13
|
get lc_secrets(): {
|
|
13
14
|
[key: string]: string;
|
|
14
15
|
} | undefined;
|
|
@@ -4,6 +4,9 @@ import fetchAdapter from "../util/axios-fetch-adapter.js";
|
|
|
4
4
|
import { AsyncCaller } from "../util/async_caller.js";
|
|
5
5
|
import { getEnvironmentVariable } from "../util/env.js";
|
|
6
6
|
export class OpenAIModerationChain extends BaseChain {
|
|
7
|
+
static lc_name() {
|
|
8
|
+
return "OpenAIModerationChain";
|
|
9
|
+
}
|
|
7
10
|
get lc_secrets() {
|
|
8
11
|
return {
|
|
9
12
|
openAIApiKey: "OPENAI_API_KEY",
|
|
@@ -4,6 +4,9 @@ exports.RetrievalQAChain = void 0;
|
|
|
4
4
|
const base_js_1 = require("./base.cjs");
|
|
5
5
|
const load_js_1 = require("./question_answering/load.cjs");
|
|
6
6
|
class RetrievalQAChain extends base_js_1.BaseChain {
|
|
7
|
+
static lc_name() {
|
|
8
|
+
return "RetrievalQAChain";
|
|
9
|
+
}
|
|
7
10
|
get inputKeys() {
|
|
8
11
|
return [this.inputKey];
|
|
9
12
|
}
|
|
@@ -13,6 +13,7 @@ export interface RetrievalQAChainInput extends Omit<ChainInputs, "memory"> {
|
|
|
13
13
|
returnSourceDocuments?: boolean;
|
|
14
14
|
}
|
|
15
15
|
export declare class RetrievalQAChain extends BaseChain implements RetrievalQAChainInput {
|
|
16
|
+
static lc_name(): string;
|
|
16
17
|
inputKey: string;
|
|
17
18
|
get inputKeys(): string[];
|
|
18
19
|
get outputKeys(): string[];
|
|
@@ -16,6 +16,9 @@ class RouterChain extends base_js_1.BaseChain {
|
|
|
16
16
|
}
|
|
17
17
|
exports.RouterChain = RouterChain;
|
|
18
18
|
class MultiRouteChain extends base_js_1.BaseChain {
|
|
19
|
+
static lc_name() {
|
|
20
|
+
return "MultiRouteChain";
|
|
21
|
+
}
|
|
19
22
|
constructor(fields) {
|
|
20
23
|
super(fields);
|
|
21
24
|
Object.defineProperty(this, "routerChain", {
|
|
@@ -23,6 +23,7 @@ export declare abstract class RouterChain extends BaseChain {
|
|
|
23
23
|
route(inputs: ChainValues, callbacks?: Callbacks): Promise<Route>;
|
|
24
24
|
}
|
|
25
25
|
export declare class MultiRouteChain extends BaseChain {
|
|
26
|
+
static lc_name(): string;
|
|
26
27
|
routerChain: RouterChain;
|
|
27
28
|
destinationChains: {
|
|
28
29
|
[name: string]: BaseChain;
|