langchain 1.0.0-alpha.6 → 1.0.0-alpha.8
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/ReactAgent.cjs +2 -2
- package/dist/agents/ReactAgent.cjs.map +1 -1
- package/dist/agents/ReactAgent.d.cts +1 -2
- package/dist/agents/ReactAgent.d.cts.map +1 -1
- package/dist/agents/ReactAgent.d.ts +1 -2
- package/dist/agents/ReactAgent.d.ts.map +1 -1
- package/dist/agents/ReactAgent.js +2 -2
- package/dist/agents/ReactAgent.js.map +1 -1
- package/dist/agents/RunnableCallable.cjs +10 -0
- package/dist/agents/RunnableCallable.cjs.map +1 -1
- package/dist/agents/RunnableCallable.d.cts +5 -0
- package/dist/agents/RunnableCallable.d.cts.map +1 -1
- package/dist/agents/RunnableCallable.d.ts +5 -0
- package/dist/agents/RunnableCallable.d.ts.map +1 -1
- package/dist/agents/RunnableCallable.js +10 -0
- package/dist/agents/RunnableCallable.js.map +1 -1
- package/dist/agents/annotation.cjs +14 -0
- package/dist/agents/annotation.cjs.map +1 -1
- package/dist/agents/annotation.d.cts +17 -5
- package/dist/agents/annotation.d.cts.map +1 -1
- package/dist/agents/annotation.d.ts +16 -4
- package/dist/agents/annotation.d.ts.map +1 -1
- package/dist/agents/annotation.js +12 -1
- package/dist/agents/annotation.js.map +1 -1
- package/dist/agents/createAgent.cjs.map +1 -1
- package/dist/agents/createAgent.js.map +1 -1
- package/dist/agents/errors.d.cts +9 -2
- package/dist/agents/errors.d.cts.map +1 -1
- package/dist/agents/errors.d.ts +9 -2
- package/dist/agents/errors.d.ts.map +1 -1
- package/dist/agents/index.cjs +3 -0
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/index.d.cts +7 -6
- package/dist/agents/index.d.cts.map +1 -1
- package/dist/agents/index.d.ts +7 -6
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +4 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/interrupt.d.cts +18 -16
- package/dist/agents/interrupt.d.cts.map +1 -1
- package/dist/agents/interrupt.d.ts +16 -17
- package/dist/agents/interrupt.d.ts.map +1 -1
- package/dist/agents/interrupt.js +3 -1
- package/dist/agents/middlewareAgent/ReactAgent.cjs +394 -70
- package/dist/agents/middlewareAgent/ReactAgent.cjs.map +1 -1
- package/dist/agents/middlewareAgent/ReactAgent.d.cts +178 -11
- package/dist/agents/middlewareAgent/ReactAgent.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/ReactAgent.d.ts +178 -11
- package/dist/agents/middlewareAgent/ReactAgent.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/ReactAgent.js +395 -71
- package/dist/agents/middlewareAgent/ReactAgent.js.map +1 -1
- package/dist/agents/middlewareAgent/annotation.cjs +10 -4
- package/dist/agents/middlewareAgent/annotation.cjs.map +1 -1
- package/dist/agents/middlewareAgent/annotation.js +10 -4
- package/dist/agents/middlewareAgent/annotation.js.map +1 -1
- package/dist/agents/middlewareAgent/constants.d.cts +5 -0
- package/dist/agents/middlewareAgent/constants.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/constants.d.ts +5 -0
- package/dist/agents/middlewareAgent/constants.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/index.cjs.map +1 -1
- package/dist/agents/middlewareAgent/index.js.map +1 -1
- package/dist/agents/middlewareAgent/middleware/callLimit.cjs +128 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.d.cts +119 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.d.ts +119 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.js +127 -0
- package/dist/agents/middlewareAgent/middleware/callLimit.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.cjs +278 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.d.cts +239 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.d.ts +239 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.js +276 -0
- package/dist/agents/middlewareAgent/middleware/contextEditing.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.cjs +58 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.cts +46 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.ts +46 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.js +58 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/hitl.cjs +192 -86
- package/dist/agents/middlewareAgent/middleware/hitl.cjs.map +1 -1
- package/dist/agents/middlewareAgent/middleware/hitl.d.cts +387 -62
- package/dist/agents/middlewareAgent/middleware/hitl.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/hitl.d.ts +387 -62
- package/dist/agents/middlewareAgent/middleware/hitl.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/hitl.js +193 -87
- package/dist/agents/middlewareAgent/middleware/hitl.js.map +1 -1
- package/dist/agents/middlewareAgent/middleware/index.cjs +29 -3
- package/dist/agents/middlewareAgent/middleware/index.cjs.map +1 -1
- package/dist/agents/middlewareAgent/middleware/index.d.cts +13 -4
- package/dist/agents/middlewareAgent/middleware/index.d.ts +13 -4
- package/dist/agents/middlewareAgent/middleware/index.js +20 -3
- package/dist/agents/middlewareAgent/middleware/index.js.map +1 -1
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.cjs +193 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.d.cts +83 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.d.ts +83 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.js +192 -0
- package/dist/agents/middlewareAgent/middleware/llmToolSelector.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.cjs +67 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.d.cts +45 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.d.ts +45 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.js +67 -0
- package/dist/agents/middlewareAgent/middleware/modelFallback.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.cjs +333 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.d.cts +155 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.d.ts +155 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.js +332 -0
- package/dist/agents/middlewareAgent/middleware/piiRedaction.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/promptCaching.cjs +64 -36
- package/dist/agents/middlewareAgent/middleware/promptCaching.cjs.map +1 -1
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.cts +64 -19
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.ts +64 -19
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/promptCaching.js +64 -36
- package/dist/agents/middlewareAgent/middleware/promptCaching.js.map +1 -1
- package/dist/agents/middlewareAgent/middleware/summarization.cjs +27 -35
- package/dist/agents/middlewareAgent/middleware/summarization.cjs.map +1 -1
- package/dist/agents/middlewareAgent/middleware/summarization.d.cts +12 -17
- package/dist/agents/middlewareAgent/middleware/summarization.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/summarization.d.ts +12 -17
- package/dist/agents/middlewareAgent/middleware/summarization.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/middleware/summarization.js +28 -35
- package/dist/agents/middlewareAgent/middleware/summarization.js.map +1 -1
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.cjs +242 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.d.cts +158 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.d.ts +158 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.js +240 -0
- package/dist/agents/middlewareAgent/middleware/toolCallLimit.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/utils.cjs +26 -0
- package/dist/agents/middlewareAgent/middleware/utils.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/utils.d.cts +13 -0
- package/dist/agents/middlewareAgent/middleware/utils.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/utils.d.ts +13 -0
- package/dist/agents/middlewareAgent/middleware/utils.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/utils.js +25 -0
- package/dist/agents/middlewareAgent/middleware/utils.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware.cjs +9 -5
- package/dist/agents/middlewareAgent/middleware.cjs.map +1 -1
- package/dist/agents/middlewareAgent/middleware.d.cts +78 -7
- package/dist/agents/middlewareAgent/middleware.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/middleware.d.ts +78 -7
- package/dist/agents/middlewareAgent/middleware.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/middleware.js +9 -5
- package/dist/agents/middlewareAgent/middleware.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.cjs +4 -4
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.js +4 -4
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/AgentNode.cjs +260 -117
- package/dist/agents/middlewareAgent/nodes/AgentNode.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/AgentNode.js +263 -120
- package/dist/agents/middlewareAgent/nodes/AgentNode.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.cjs +4 -4
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.js +4 -4
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/middleware.cjs +51 -25
- package/dist/agents/middlewareAgent/nodes/middleware.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/middleware.js +51 -26
- package/dist/agents/middlewareAgent/nodes/middleware.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/utils.cjs +20 -28
- package/dist/agents/middlewareAgent/nodes/utils.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/utils.js +20 -27
- package/dist/agents/middlewareAgent/nodes/utils.js.map +1 -1
- package/dist/agents/middlewareAgent/types.d.cts +182 -90
- package/dist/agents/middlewareAgent/types.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/types.d.ts +182 -90
- package/dist/agents/middlewareAgent/types.d.ts.map +1 -1
- package/dist/agents/model.cjs +13 -0
- package/dist/agents/model.cjs.map +1 -0
- package/dist/agents/model.js +11 -0
- package/dist/agents/model.js.map +1 -0
- package/dist/agents/nodes/AgentNode.cjs +56 -28
- package/dist/agents/nodes/AgentNode.cjs.map +1 -1
- package/dist/agents/nodes/AgentNode.js +57 -29
- package/dist/agents/nodes/AgentNode.js.map +1 -1
- package/dist/agents/nodes/ToolNode.cjs +1 -1
- package/dist/agents/nodes/ToolNode.cjs.map +1 -1
- package/dist/agents/nodes/ToolNode.d.cts +2 -2
- package/dist/agents/nodes/ToolNode.js +1 -1
- package/dist/agents/nodes/ToolNode.js.map +1 -1
- package/dist/agents/responses.cjs +52 -10
- package/dist/agents/responses.cjs.map +1 -1
- package/dist/agents/responses.d.cts +12 -20
- package/dist/agents/responses.d.cts.map +1 -1
- package/dist/agents/responses.d.ts +12 -20
- package/dist/agents/responses.d.ts.map +1 -1
- package/dist/agents/responses.js +52 -11
- package/dist/agents/responses.js.map +1 -1
- package/dist/agents/tests/utils.cjs +77 -0
- package/dist/agents/tests/utils.cjs.map +1 -0
- package/dist/agents/tests/utils.d.cts +53 -0
- package/dist/agents/tests/utils.d.cts.map +1 -0
- package/dist/agents/tests/utils.d.ts +53 -0
- package/dist/agents/tests/utils.d.ts.map +1 -0
- package/dist/agents/tests/utils.js +76 -0
- package/dist/agents/tests/utils.js.map +1 -0
- package/dist/agents/types.cjs +7 -0
- package/dist/agents/types.cjs.map +1 -0
- package/dist/agents/types.d.cts +40 -7
- package/dist/agents/types.d.cts.map +1 -1
- package/dist/agents/types.d.ts +40 -7
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/types.js +6 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/agents/utils.cjs +5 -23
- package/dist/agents/utils.cjs.map +1 -1
- package/dist/agents/utils.js +2 -19
- package/dist/agents/utils.js.map +1 -1
- package/dist/chat_models/universal.cjs +7 -0
- package/dist/chat_models/universal.cjs.map +1 -1
- package/dist/chat_models/universal.d.cts +7 -2
- package/dist/chat_models/universal.d.cts.map +1 -1
- package/dist/chat_models/universal.d.ts +7 -2
- package/dist/chat_models/universal.d.ts.map +1 -1
- package/dist/chat_models/universal.js +7 -0
- package/dist/chat_models/universal.js.map +1 -1
- package/dist/embeddings/cache_backed.d.ts +1 -1
- package/dist/hub/base.cjs +4 -1
- package/dist/hub/base.cjs.map +1 -1
- package/dist/hub/base.js +4 -1
- package/dist/hub/base.js.map +1 -1
- package/dist/index.cjs +97 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -8
- package/dist/index.d.ts +24 -8
- package/dist/index.js +52 -6
- package/dist/index.js.map +1 -1
- package/dist/load/import_constants.cjs +0 -19
- package/dist/load/import_constants.cjs.map +1 -1
- package/dist/load/import_constants.js +0 -19
- package/dist/load/import_constants.js.map +1 -1
- package/dist/load/import_map.cjs +3 -114
- package/dist/load/import_map.cjs.map +1 -1
- package/dist/load/import_map.js +4 -115
- package/dist/load/import_map.js.map +1 -1
- package/dist/load/serializable.d.cts +1 -10
- package/dist/load/serializable.d.ts +1 -10
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.cjs +5 -4
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.cjs.map +1 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.js +3 -2
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.js.map +1 -1
- package/dist/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.cjs +83 -0
- package/dist/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.js +79 -0
- package/dist/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.js.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.cjs +16 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js +13 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.cjs +77 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.cjs.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js +74 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.cjs +115 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.cjs.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js +112 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js.map +1 -0
- package/dist/storage/encoder_backed.cjs +1 -1
- package/dist/storage/encoder_backed.d.cts +1 -1
- package/dist/storage/encoder_backed.d.ts +1 -1
- package/dist/storage/encoder_backed.js +1 -1
- package/dist/storage/file_system.cjs +1 -1
- package/dist/storage/file_system.js +1 -1
- package/package.json +39 -652
- package/dist/chains/analyze_documents_chain.cjs +0 -83
- package/dist/chains/analyze_documents_chain.cjs.map +0 -1
- package/dist/chains/analyze_documents_chain.d.cts +0 -58
- package/dist/chains/analyze_documents_chain.d.cts.map +0 -1
- package/dist/chains/analyze_documents_chain.d.ts +0 -58
- package/dist/chains/analyze_documents_chain.d.ts.map +0 -1
- package/dist/chains/analyze_documents_chain.js +0 -82
- package/dist/chains/analyze_documents_chain.js.map +0 -1
- package/dist/chains/api/api_chain.cjs +0 -100
- package/dist/chains/api/api_chain.cjs.map +0 -1
- package/dist/chains/api/api_chain.d.cts +0 -63
- package/dist/chains/api/api_chain.d.cts.map +0 -1
- package/dist/chains/api/api_chain.d.ts +0 -63
- package/dist/chains/api/api_chain.d.ts.map +0 -1
- package/dist/chains/api/api_chain.js +0 -100
- package/dist/chains/api/api_chain.js.map +0 -1
- package/dist/chains/api/prompts.cjs +0 -38
- package/dist/chains/api/prompts.cjs.map +0 -1
- package/dist/chains/api/prompts.js +0 -36
- package/dist/chains/api/prompts.js.map +0 -1
- package/dist/chains/base.cjs +0 -180
- package/dist/chains/base.cjs.map +0 -1
- package/dist/chains/base.d.cts +0 -88
- package/dist/chains/base.d.cts.map +0 -1
- package/dist/chains/base.d.ts +0 -88
- package/dist/chains/base.d.ts.map +0 -1
- package/dist/chains/base.js +0 -179
- package/dist/chains/base.js.map +0 -1
- package/dist/chains/chat_vector_db_chain.cjs +0 -130
- package/dist/chains/chat_vector_db_chain.cjs.map +0 -1
- package/dist/chains/chat_vector_db_chain.d.cts +0 -62
- package/dist/chains/chat_vector_db_chain.d.cts.map +0 -1
- package/dist/chains/chat_vector_db_chain.d.ts +0 -62
- package/dist/chains/chat_vector_db_chain.d.ts.map +0 -1
- package/dist/chains/chat_vector_db_chain.js +0 -129
- package/dist/chains/chat_vector_db_chain.js.map +0 -1
- package/dist/chains/combine_docs_chain.cjs +0 -275
- package/dist/chains/combine_docs_chain.cjs.map +0 -1
- package/dist/chains/combine_docs_chain.d.cts +0 -126
- package/dist/chains/combine_docs_chain.d.cts.map +0 -1
- package/dist/chains/combine_docs_chain.d.ts +0 -126
- package/dist/chains/combine_docs_chain.d.ts.map +0 -1
- package/dist/chains/combine_docs_chain.js +0 -272
- package/dist/chains/combine_docs_chain.js.map +0 -1
- package/dist/chains/combine_documents/base.cjs +0 -22
- package/dist/chains/combine_documents/base.cjs.map +0 -1
- package/dist/chains/combine_documents/base.js +0 -18
- package/dist/chains/combine_documents/base.js.map +0 -1
- package/dist/chains/combine_documents/index.cjs +0 -16
- package/dist/chains/combine_documents/index.cjs.map +0 -1
- package/dist/chains/combine_documents/index.d.cts +0 -2
- package/dist/chains/combine_documents/index.d.ts +0 -2
- package/dist/chains/combine_documents/index.js +0 -10
- package/dist/chains/combine_documents/index.js.map +0 -1
- package/dist/chains/combine_documents/reduce.cjs +0 -73
- package/dist/chains/combine_documents/reduce.cjs.map +0 -1
- package/dist/chains/combine_documents/reduce.d.cts +0 -36
- package/dist/chains/combine_documents/reduce.d.cts.map +0 -1
- package/dist/chains/combine_documents/reduce.d.ts +0 -36
- package/dist/chains/combine_documents/reduce.d.ts.map +0 -1
- package/dist/chains/combine_documents/reduce.js +0 -66
- package/dist/chains/combine_documents/reduce.js.map +0 -1
- package/dist/chains/combine_documents/stuff.cjs +0 -41
- package/dist/chains/combine_documents/stuff.cjs.map +0 -1
- package/dist/chains/combine_documents/stuff.d.cts +0 -40
- package/dist/chains/combine_documents/stuff.d.cts.map +0 -1
- package/dist/chains/combine_documents/stuff.d.ts +0 -40
- package/dist/chains/combine_documents/stuff.d.ts.map +0 -1
- package/dist/chains/combine_documents/stuff.js +0 -40
- package/dist/chains/combine_documents/stuff.js.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.cjs +0 -131
- package/dist/chains/constitutional_ai/constitutional_chain.cjs.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.d.cts +0 -79
- package/dist/chains/constitutional_ai/constitutional_chain.d.cts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.d.ts +0 -79
- package/dist/chains/constitutional_ai/constitutional_chain.d.ts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.js +0 -131
- package/dist/chains/constitutional_ai/constitutional_chain.js.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.cjs +0 -322
- package/dist/chains/constitutional_ai/constitutional_principle.cjs.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.d.cts +0 -50
- package/dist/chains/constitutional_ai/constitutional_principle.d.cts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.d.ts +0 -50
- package/dist/chains/constitutional_ai/constitutional_principle.d.ts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.js +0 -320
- package/dist/chains/constitutional_ai/constitutional_principle.js.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_prompts.cjs +0 -96
- package/dist/chains/constitutional_ai/constitutional_prompts.cjs.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_prompts.js +0 -94
- package/dist/chains/constitutional_ai/constitutional_prompts.js.map +0 -1
- package/dist/chains/conversation.cjs +0 -50
- package/dist/chains/conversation.cjs.map +0 -1
- package/dist/chains/conversation.d.cts +0 -34
- package/dist/chains/conversation.d.cts.map +0 -1
- package/dist/chains/conversation.d.ts +0 -34
- package/dist/chains/conversation.d.ts.map +0 -1
- package/dist/chains/conversation.js +0 -48
- package/dist/chains/conversation.js.map +0 -1
- package/dist/chains/conversational_retrieval_chain.cjs +0 -218
- package/dist/chains/conversational_retrieval_chain.cjs.map +0 -1
- package/dist/chains/conversational_retrieval_chain.d.cts +0 -152
- package/dist/chains/conversational_retrieval_chain.d.cts.map +0 -1
- package/dist/chains/conversational_retrieval_chain.d.ts +0 -152
- package/dist/chains/conversational_retrieval_chain.d.ts.map +0 -1
- package/dist/chains/conversational_retrieval_chain.js +0 -217
- package/dist/chains/conversational_retrieval_chain.js.map +0 -1
- package/dist/chains/graph_qa/cypher.cjs +0 -133
- package/dist/chains/graph_qa/cypher.cjs.map +0 -1
- package/dist/chains/graph_qa/cypher.d.cts +0 -76
- package/dist/chains/graph_qa/cypher.d.cts.map +0 -1
- package/dist/chains/graph_qa/cypher.d.ts +0 -76
- package/dist/chains/graph_qa/cypher.d.ts.map +0 -1
- package/dist/chains/graph_qa/cypher.js +0 -126
- package/dist/chains/graph_qa/cypher.js.map +0 -1
- package/dist/chains/graph_qa/prompts.cjs +0 -46
- package/dist/chains/graph_qa/prompts.cjs.map +0 -1
- package/dist/chains/graph_qa/prompts.js +0 -44
- package/dist/chains/graph_qa/prompts.js.map +0 -1
- package/dist/chains/history_aware_retriever.cjs +0 -55
- package/dist/chains/history_aware_retriever.cjs.map +0 -1
- package/dist/chains/history_aware_retriever.d.cts +0 -64
- package/dist/chains/history_aware_retriever.d.cts.map +0 -1
- package/dist/chains/history_aware_retriever.d.ts +0 -64
- package/dist/chains/history_aware_retriever.d.ts.map +0 -1
- package/dist/chains/history_aware_retriever.js +0 -49
- package/dist/chains/history_aware_retriever.js.map +0 -1
- package/dist/chains/index.cjs +0 -106
- package/dist/chains/index.cjs.map +0 -1
- package/dist/chains/index.d.cts +0 -25
- package/dist/chains/index.d.ts +0 -25
- package/dist/chains/index.js +0 -67
- package/dist/chains/index.js.map +0 -1
- package/dist/chains/llm_chain.cjs +0 -155
- package/dist/chains/llm_chain.cjs.map +0 -1
- package/dist/chains/llm_chain.d.cts +0 -97
- package/dist/chains/llm_chain.d.cts.map +0 -1
- package/dist/chains/llm_chain.d.ts +0 -97
- package/dist/chains/llm_chain.d.ts.map +0 -1
- package/dist/chains/llm_chain.js +0 -154
- package/dist/chains/llm_chain.js.map +0 -1
- package/dist/chains/load.cjs +0 -48
- package/dist/chains/load.cjs.map +0 -1
- package/dist/chains/load.d.cts +0 -30
- package/dist/chains/load.d.cts.map +0 -1
- package/dist/chains/load.d.ts +0 -30
- package/dist/chains/load.d.ts.map +0 -1
- package/dist/chains/load.js +0 -42
- package/dist/chains/load.js.map +0 -1
- package/dist/chains/openai_functions/base.cjs +0 -139
- package/dist/chains/openai_functions/base.cjs.map +0 -1
- package/dist/chains/openai_functions/base.d.cts +0 -172
- package/dist/chains/openai_functions/base.d.cts.map +0 -1
- package/dist/chains/openai_functions/base.d.ts +0 -172
- package/dist/chains/openai_functions/base.d.ts.map +0 -1
- package/dist/chains/openai_functions/base.js +0 -137
- package/dist/chains/openai_functions/base.js.map +0 -1
- package/dist/chains/openai_functions/extraction.cjs +0 -71
- package/dist/chains/openai_functions/extraction.cjs.map +0 -1
- package/dist/chains/openai_functions/extraction.d.cts +0 -29
- package/dist/chains/openai_functions/extraction.d.cts.map +0 -1
- package/dist/chains/openai_functions/extraction.d.ts +0 -29
- package/dist/chains/openai_functions/extraction.d.ts.map +0 -1
- package/dist/chains/openai_functions/extraction.js +0 -69
- package/dist/chains/openai_functions/extraction.js.map +0 -1
- package/dist/chains/openai_functions/index.cjs +0 -33
- package/dist/chains/openai_functions/index.cjs.map +0 -1
- package/dist/chains/openai_functions/index.d.cts +0 -5
- package/dist/chains/openai_functions/index.d.ts +0 -5
- package/dist/chains/openai_functions/index.js +0 -21
- package/dist/chains/openai_functions/index.js.map +0 -1
- package/dist/chains/openai_functions/openapi.cjs +0 -287
- package/dist/chains/openai_functions/openapi.cjs.map +0 -1
- package/dist/chains/openai_functions/openapi.d.cts +0 -61
- package/dist/chains/openai_functions/openapi.d.cts.map +0 -1
- package/dist/chains/openai_functions/openapi.d.ts +0 -61
- package/dist/chains/openai_functions/openapi.d.ts.map +0 -1
- package/dist/chains/openai_functions/openapi.js +0 -285
- package/dist/chains/openai_functions/openapi.js.map +0 -1
- package/dist/chains/openai_functions/tagging.cjs +0 -72
- package/dist/chains/openai_functions/tagging.cjs.map +0 -1
- package/dist/chains/openai_functions/tagging.d.cts +0 -47
- package/dist/chains/openai_functions/tagging.d.cts.map +0 -1
- package/dist/chains/openai_functions/tagging.d.ts +0 -47
- package/dist/chains/openai_functions/tagging.d.ts.map +0 -1
- package/dist/chains/openai_functions/tagging.js +0 -70
- package/dist/chains/openai_functions/tagging.js.map +0 -1
- package/dist/chains/query_constructor/index.cjs +0 -145
- package/dist/chains/query_constructor/index.cjs.map +0 -1
- package/dist/chains/query_constructor/index.d.cts +0 -82
- package/dist/chains/query_constructor/index.d.cts.map +0 -1
- package/dist/chains/query_constructor/index.d.ts +0 -82
- package/dist/chains/query_constructor/index.d.ts.map +0 -1
- package/dist/chains/query_constructor/index.js +0 -130
- package/dist/chains/query_constructor/index.js.map +0 -1
- package/dist/chains/query_constructor/ir.cjs +0 -22
- package/dist/chains/query_constructor/ir.cjs.map +0 -1
- package/dist/chains/query_constructor/ir.d.cts +0 -1
- package/dist/chains/query_constructor/ir.d.ts +0 -1
- package/dist/chains/query_constructor/ir.js +0 -12
- package/dist/chains/query_constructor/ir.js.map +0 -1
- package/dist/chains/query_constructor/parser.cjs +0 -80
- package/dist/chains/query_constructor/parser.cjs.map +0 -1
- package/dist/chains/query_constructor/parser.d.cts +0 -43
- package/dist/chains/query_constructor/parser.d.cts.map +0 -1
- package/dist/chains/query_constructor/parser.d.ts +0 -43
- package/dist/chains/query_constructor/parser.d.ts.map +0 -1
- package/dist/chains/query_constructor/parser.js +0 -79
- package/dist/chains/query_constructor/parser.js.map +0 -1
- package/dist/chains/query_constructor/prompt.cjs +0 -137
- package/dist/chains/query_constructor/prompt.cjs.map +0 -1
- package/dist/chains/query_constructor/prompt.d.cts +0 -22
- package/dist/chains/query_constructor/prompt.d.cts.map +0 -1
- package/dist/chains/query_constructor/prompt.d.ts +0 -22
- package/dist/chains/query_constructor/prompt.d.ts.map +0 -1
- package/dist/chains/query_constructor/prompt.js +0 -132
- package/dist/chains/query_constructor/prompt.js.map +0 -1
- package/dist/chains/question_answering/load.cjs +0 -99
- package/dist/chains/question_answering/load.cjs.map +0 -1
- package/dist/chains/question_answering/load.d.cts +0 -72
- package/dist/chains/question_answering/load.d.cts.map +0 -1
- package/dist/chains/question_answering/load.d.ts +0 -72
- package/dist/chains/question_answering/load.d.ts.map +0 -1
- package/dist/chains/question_answering/load.js +0 -96
- package/dist/chains/question_answering/load.js.map +0 -1
- package/dist/chains/question_answering/map_reduce_prompts.cjs +0 -61
- package/dist/chains/question_answering/map_reduce_prompts.cjs.map +0 -1
- package/dist/chains/question_answering/map_reduce_prompts.js +0 -59
- package/dist/chains/question_answering/map_reduce_prompts.js.map +0 -1
- package/dist/chains/question_answering/refine_prompts.cjs +0 -60
- package/dist/chains/question_answering/refine_prompts.cjs.map +0 -1
- package/dist/chains/question_answering/refine_prompts.js +0 -58
- package/dist/chains/question_answering/refine_prompts.js.map +0 -1
- package/dist/chains/question_answering/stuff_prompts.cjs +0 -20
- package/dist/chains/question_answering/stuff_prompts.cjs.map +0 -1
- package/dist/chains/question_answering/stuff_prompts.js +0 -19
- package/dist/chains/question_answering/stuff_prompts.js.map +0 -1
- package/dist/chains/retrieval.cjs +0 -55
- package/dist/chains/retrieval.cjs.map +0 -1
- package/dist/chains/retrieval.d.cts +0 -77
- package/dist/chains/retrieval.d.cts.map +0 -1
- package/dist/chains/retrieval.d.ts +0 -77
- package/dist/chains/retrieval.d.ts.map +0 -1
- package/dist/chains/retrieval.js +0 -49
- package/dist/chains/retrieval.js.map +0 -1
- package/dist/chains/retrieval_qa.cjs +0 -106
- package/dist/chains/retrieval_qa.cjs.map +0 -1
- package/dist/chains/retrieval_qa.d.cts +0 -81
- package/dist/chains/retrieval_qa.d.cts.map +0 -1
- package/dist/chains/retrieval_qa.d.ts +0 -81
- package/dist/chains/retrieval_qa.d.ts.map +0 -1
- package/dist/chains/retrieval_qa.js +0 -106
- package/dist/chains/retrieval_qa.js.map +0 -1
- package/dist/chains/router/llm_router.cjs +0 -50
- package/dist/chains/router/llm_router.cjs.map +0 -1
- package/dist/chains/router/llm_router.d.cts +0 -54
- package/dist/chains/router/llm_router.d.cts.map +0 -1
- package/dist/chains/router/llm_router.d.ts +0 -54
- package/dist/chains/router/llm_router.d.ts.map +0 -1
- package/dist/chains/router/llm_router.js +0 -50
- package/dist/chains/router/llm_router.js.map +0 -1
- package/dist/chains/router/multi_prompt.cjs +0 -116
- package/dist/chains/router/multi_prompt.cjs.map +0 -1
- package/dist/chains/router/multi_prompt.d.cts +0 -76
- package/dist/chains/router/multi_prompt.d.cts.map +0 -1
- package/dist/chains/router/multi_prompt.d.ts +0 -76
- package/dist/chains/router/multi_prompt.d.ts.map +0 -1
- package/dist/chains/router/multi_prompt.js +0 -115
- package/dist/chains/router/multi_prompt.js.map +0 -1
- package/dist/chains/router/multi_prompt_prompt.cjs +0 -22
- package/dist/chains/router/multi_prompt_prompt.cjs.map +0 -1
- package/dist/chains/router/multi_prompt_prompt.js +0 -21
- package/dist/chains/router/multi_prompt_prompt.js.map +0 -1
- package/dist/chains/router/multi_retrieval_prompt.cjs +0 -22
- package/dist/chains/router/multi_retrieval_prompt.cjs.map +0 -1
- package/dist/chains/router/multi_retrieval_prompt.js +0 -21
- package/dist/chains/router/multi_retrieval_prompt.js.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.cjs +0 -137
- package/dist/chains/router/multi_retrieval_qa.cjs.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.d.cts +0 -100
- package/dist/chains/router/multi_retrieval_qa.d.cts.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.d.ts +0 -100
- package/dist/chains/router/multi_retrieval_qa.d.ts.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.js +0 -136
- package/dist/chains/router/multi_retrieval_qa.js.map +0 -1
- package/dist/chains/router/multi_route.cjs +0 -69
- package/dist/chains/router/multi_route.cjs.map +0 -1
- package/dist/chains/router/multi_route.d.cts +0 -69
- package/dist/chains/router/multi_route.d.cts.map +0 -1
- package/dist/chains/router/multi_route.d.ts +0 -69
- package/dist/chains/router/multi_route.d.ts.map +0 -1
- package/dist/chains/router/multi_route.js +0 -68
- package/dist/chains/router/multi_route.js.map +0 -1
- package/dist/chains/router/utils.cjs +0 -18
- package/dist/chains/router/utils.cjs.map +0 -1
- package/dist/chains/router/utils.js +0 -17
- package/dist/chains/router/utils.js.map +0 -1
- package/dist/chains/sequential_chain.cjs +0 -255
- package/dist/chains/sequential_chain.cjs.map +0 -1
- package/dist/chains/sequential_chain.d.cts +0 -158
- package/dist/chains/sequential_chain.d.cts.map +0 -1
- package/dist/chains/sequential_chain.d.ts +0 -158
- package/dist/chains/sequential_chain.d.ts.map +0 -1
- package/dist/chains/sequential_chain.js +0 -254
- package/dist/chains/sequential_chain.js.map +0 -1
- package/dist/chains/serde.d.cts +0 -156
- package/dist/chains/serde.d.cts.map +0 -1
- package/dist/chains/serde.d.ts +0 -156
- package/dist/chains/serde.d.ts.map +0 -1
- package/dist/chains/sql_db/index.cjs +0 -35
- package/dist/chains/sql_db/index.cjs.map +0 -1
- package/dist/chains/sql_db/index.d.cts +0 -3
- package/dist/chains/sql_db/index.d.ts +0 -3
- package/dist/chains/sql_db/index.js +0 -21
- package/dist/chains/sql_db/index.js.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.cjs +0 -196
- package/dist/chains/sql_db/sql_db_chain.cjs.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.d.cts +0 -124
- package/dist/chains/sql_db/sql_db_chain.d.cts.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.d.ts +0 -124
- package/dist/chains/sql_db/sql_db_chain.d.ts.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.js +0 -194
- package/dist/chains/sql_db/sql_db_chain.js.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.cjs +0 -194
- package/dist/chains/sql_db/sql_db_prompt.cjs.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.d.cts +0 -44
- package/dist/chains/sql_db/sql_db_prompt.d.cts.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.d.ts +0 -44
- package/dist/chains/sql_db/sql_db_prompt.d.ts.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.js +0 -186
- package/dist/chains/sql_db/sql_db_prompt.js.map +0 -1
- package/dist/chains/summarization/load.cjs +0 -74
- package/dist/chains/summarization/load.cjs.map +0 -1
- package/dist/chains/summarization/load.d.cts +0 -33
- package/dist/chains/summarization/load.d.cts.map +0 -1
- package/dist/chains/summarization/load.d.ts +0 -33
- package/dist/chains/summarization/load.d.ts.map +0 -1
- package/dist/chains/summarization/load.js +0 -74
- package/dist/chains/summarization/load.js.map +0 -1
- package/dist/chains/summarization/refine_prompts.cjs +0 -24
- package/dist/chains/summarization/refine_prompts.cjs.map +0 -1
- package/dist/chains/summarization/refine_prompts.js +0 -23
- package/dist/chains/summarization/refine_prompts.js.map +0 -1
- package/dist/chains/summarization/stuff_prompts.cjs +0 -19
- package/dist/chains/summarization/stuff_prompts.cjs.map +0 -1
- package/dist/chains/summarization/stuff_prompts.js +0 -18
- package/dist/chains/summarization/stuff_prompts.js.map +0 -1
- package/dist/chains/transform.cjs +0 -43
- package/dist/chains/transform.cjs.map +0 -1
- package/dist/chains/transform.d.cts +0 -44
- package/dist/chains/transform.d.cts.map +0 -1
- package/dist/chains/transform.d.ts +0 -44
- package/dist/chains/transform.d.ts.map +0 -1
- package/dist/chains/transform.js +0 -43
- package/dist/chains/transform.js.map +0 -1
- package/dist/chains/vector_db_qa.cjs +0 -95
- package/dist/chains/vector_db_qa.cjs.map +0 -1
- package/dist/chains/vector_db_qa.d.cts +0 -66
- package/dist/chains/vector_db_qa.d.cts.map +0 -1
- package/dist/chains/vector_db_qa.d.ts +0 -66
- package/dist/chains/vector_db_qa.d.ts.map +0 -1
- package/dist/chains/vector_db_qa.js +0 -95
- package/dist/chains/vector_db_qa.js.map +0 -1
- package/dist/document.cjs +0 -21
- package/dist/document.cjs.map +0 -1
- package/dist/document.d.cts +0 -2
- package/dist/document.d.ts +0 -2
- package/dist/document.js +0 -10
- package/dist/document.js.map +0 -1
- package/dist/document_loaders/base.cjs +0 -22
- package/dist/document_loaders/base.cjs.map +0 -1
- package/dist/document_loaders/base.d.cts +0 -1
- package/dist/document_loaders/base.d.ts +0 -1
- package/dist/document_loaders/base.js +0 -12
- package/dist/document_loaders/base.js.map +0 -1
- package/dist/document_loaders/fs/buffer.cjs +0 -69
- package/dist/document_loaders/fs/buffer.cjs.map +0 -1
- package/dist/document_loaders/fs/buffer.d.cts +0 -46
- package/dist/document_loaders/fs/buffer.d.cts.map +0 -1
- package/dist/document_loaders/fs/buffer.d.ts +0 -46
- package/dist/document_loaders/fs/buffer.d.ts.map +0 -1
- package/dist/document_loaders/fs/buffer.js +0 -63
- package/dist/document_loaders/fs/buffer.js.map +0 -1
- package/dist/document_loaders/fs/directory.cjs +0 -116
- package/dist/document_loaders/fs/directory.cjs.map +0 -1
- package/dist/document_loaders/fs/directory.d.cts +0 -76
- package/dist/document_loaders/fs/directory.d.cts.map +0 -1
- package/dist/document_loaders/fs/directory.d.ts +0 -76
- package/dist/document_loaders/fs/directory.d.ts.map +0 -1
- package/dist/document_loaders/fs/directory.js +0 -109
- package/dist/document_loaders/fs/directory.js.map +0 -1
- package/dist/document_loaders/fs/json.cjs +0 -128
- package/dist/document_loaders/fs/json.cjs.map +0 -1
- package/dist/document_loaders/fs/json.d.cts +0 -65
- package/dist/document_loaders/fs/json.d.cts.map +0 -1
- package/dist/document_loaders/fs/json.d.ts +0 -65
- package/dist/document_loaders/fs/json.d.ts.map +0 -1
- package/dist/document_loaders/fs/json.js +0 -121
- package/dist/document_loaders/fs/json.js.map +0 -1
- package/dist/document_loaders/fs/multi_file.cjs +0 -82
- package/dist/document_loaders/fs/multi_file.cjs.map +0 -1
- package/dist/document_loaders/fs/multi_file.d.cts +0 -43
- package/dist/document_loaders/fs/multi_file.d.cts.map +0 -1
- package/dist/document_loaders/fs/multi_file.d.ts +0 -43
- package/dist/document_loaders/fs/multi_file.d.ts.map +0 -1
- package/dist/document_loaders/fs/multi_file.js +0 -76
- package/dist/document_loaders/fs/multi_file.js.map +0 -1
- package/dist/document_loaders/fs/text.cjs +0 -101
- package/dist/document_loaders/fs/text.cjs.map +0 -1
- package/dist/document_loaders/fs/text.d.cts +0 -57
- package/dist/document_loaders/fs/text.d.cts.map +0 -1
- package/dist/document_loaders/fs/text.d.ts +0 -57
- package/dist/document_loaders/fs/text.d.ts.map +0 -1
- package/dist/document_loaders/fs/text.js +0 -95
- package/dist/document_loaders/fs/text.js.map +0 -1
- package/dist/evaluation/agents/index.cjs +0 -1
- package/dist/evaluation/agents/index.js +0 -1
- package/dist/evaluation/agents/prompt.cjs +0 -132
- package/dist/evaluation/agents/prompt.cjs.map +0 -1
- package/dist/evaluation/agents/prompt.js +0 -130
- package/dist/evaluation/agents/prompt.js.map +0 -1
- package/dist/evaluation/agents/trajectory.cjs +0 -132
- package/dist/evaluation/agents/trajectory.cjs.map +0 -1
- package/dist/evaluation/agents/trajectory.d.cts +0 -61
- package/dist/evaluation/agents/trajectory.d.cts.map +0 -1
- package/dist/evaluation/agents/trajectory.d.ts +0 -61
- package/dist/evaluation/agents/trajectory.d.ts.map +0 -1
- package/dist/evaluation/agents/trajectory.js +0 -130
- package/dist/evaluation/agents/trajectory.js.map +0 -1
- package/dist/evaluation/base.cjs +0 -169
- package/dist/evaluation/base.cjs.map +0 -1
- package/dist/evaluation/base.d.cts +0 -240
- package/dist/evaluation/base.d.cts.map +0 -1
- package/dist/evaluation/base.d.ts +0 -240
- package/dist/evaluation/base.d.ts.map +0 -1
- package/dist/evaluation/base.js +0 -164
- package/dist/evaluation/base.js.map +0 -1
- package/dist/evaluation/comparison/index.cjs +0 -1
- package/dist/evaluation/comparison/index.js +0 -1
- package/dist/evaluation/comparison/pairwise.cjs +0 -178
- package/dist/evaluation/comparison/pairwise.cjs.map +0 -1
- package/dist/evaluation/comparison/pairwise.d.cts +0 -56
- package/dist/evaluation/comparison/pairwise.d.cts.map +0 -1
- package/dist/evaluation/comparison/pairwise.d.ts +0 -56
- package/dist/evaluation/comparison/pairwise.d.ts.map +0 -1
- package/dist/evaluation/comparison/pairwise.js +0 -175
- package/dist/evaluation/comparison/pairwise.js.map +0 -1
- package/dist/evaluation/comparison/prompt.cjs +0 -77
- package/dist/evaluation/comparison/prompt.cjs.map +0 -1
- package/dist/evaluation/comparison/prompt.js +0 -75
- package/dist/evaluation/comparison/prompt.js.map +0 -1
- package/dist/evaluation/criteria/criteria.cjs +0 -164
- package/dist/evaluation/criteria/criteria.cjs.map +0 -1
- package/dist/evaluation/criteria/criteria.d.cts +0 -85
- package/dist/evaluation/criteria/criteria.d.cts.map +0 -1
- package/dist/evaluation/criteria/criteria.d.ts +0 -85
- package/dist/evaluation/criteria/criteria.d.ts.map +0 -1
- package/dist/evaluation/criteria/criteria.js +0 -161
- package/dist/evaluation/criteria/criteria.js.map +0 -1
- package/dist/evaluation/criteria/index.cjs +0 -1
- package/dist/evaluation/criteria/index.js +0 -1
- package/dist/evaluation/criteria/prompt.cjs +0 -50
- package/dist/evaluation/criteria/prompt.cjs.map +0 -1
- package/dist/evaluation/criteria/prompt.js +0 -48
- package/dist/evaluation/criteria/prompt.js.map +0 -1
- package/dist/evaluation/embedding_distance/base.cjs +0 -108
- package/dist/evaluation/embedding_distance/base.cjs.map +0 -1
- package/dist/evaluation/embedding_distance/base.d.cts +0 -82
- package/dist/evaluation/embedding_distance/base.d.cts.map +0 -1
- package/dist/evaluation/embedding_distance/base.d.ts +0 -82
- package/dist/evaluation/embedding_distance/base.d.ts.map +0 -1
- package/dist/evaluation/embedding_distance/base.js +0 -105
- package/dist/evaluation/embedding_distance/base.js.map +0 -1
- package/dist/evaluation/embedding_distance/index.cjs +0 -1
- package/dist/evaluation/embedding_distance/index.js +0 -1
- package/dist/evaluation/index.cjs +0 -54
- package/dist/evaluation/index.cjs.map +0 -1
- package/dist/evaluation/index.d.cts +0 -8
- package/dist/evaluation/index.d.ts +0 -8
- package/dist/evaluation/index.js +0 -35
- package/dist/evaluation/index.js.map +0 -1
- package/dist/evaluation/loader.cjs +0 -57
- package/dist/evaluation/loader.cjs.map +0 -1
- package/dist/evaluation/loader.d.cts +0 -38
- package/dist/evaluation/loader.d.cts.map +0 -1
- package/dist/evaluation/loader.d.ts +0 -38
- package/dist/evaluation/loader.d.ts.map +0 -1
- package/dist/evaluation/loader.js +0 -56
- package/dist/evaluation/loader.js.map +0 -1
- package/dist/evaluation/qa/eval_chain.cjs +0 -41
- package/dist/evaluation/qa/eval_chain.cjs.map +0 -1
- package/dist/evaluation/qa/eval_chain.d.cts +0 -22
- package/dist/evaluation/qa/eval_chain.d.cts.map +0 -1
- package/dist/evaluation/qa/eval_chain.d.ts +0 -22
- package/dist/evaluation/qa/eval_chain.d.ts.map +0 -1
- package/dist/evaluation/qa/eval_chain.js +0 -41
- package/dist/evaluation/qa/eval_chain.js.map +0 -1
- package/dist/evaluation/qa/index.cjs +0 -1
- package/dist/evaluation/qa/index.js +0 -1
- package/dist/evaluation/qa/prompt.cjs +0 -31
- package/dist/evaluation/qa/prompt.cjs.map +0 -1
- package/dist/evaluation/qa/prompt.js +0 -30
- package/dist/evaluation/qa/prompt.js.map +0 -1
- package/dist/evaluation/types.d.cts +0 -40
- package/dist/evaluation/types.d.cts.map +0 -1
- package/dist/evaluation/types.d.ts +0 -40
- package/dist/evaluation/types.d.ts.map +0 -1
- package/dist/langchain-core/dist/load/map_keys.d.cts +0 -10
- package/dist/langchain-core/dist/load/map_keys.d.cts.map +0 -1
- package/dist/langchain-core/dist/load/serializable.d.cts +0 -82
- package/dist/langchain-core/dist/load/serializable.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/base.d.cts +0 -125
- package/dist/langchain-core/dist/messages/base.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/base.d.cts +0 -22
- package/dist/langchain-core/dist/messages/content/base.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/data.d.cts +0 -96
- package/dist/langchain-core/dist/messages/content/data.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/index.d.cts +0 -102
- package/dist/langchain-core/dist/messages/content/index.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/multimodal.d.cts +0 -110
- package/dist/langchain-core/dist/messages/content/multimodal.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/tools.d.cts +0 -153
- package/dist/langchain-core/dist/messages/content/tools.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/message.d.cts +0 -598
- package/dist/langchain-core/dist/messages/message.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/metadata.d.cts +0 -97
- package/dist/langchain-core/dist/messages/metadata.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/utils.d.cts +0 -75
- package/dist/langchain-core/dist/messages/utils.d.cts.map +0 -1
- package/dist/langchain-core/dist/prompt_values.d.cts +0 -13
- package/dist/langchain-core/dist/prompt_values.d.cts.map +0 -1
- package/dist/langchain-core/dist/utils/types/index.d.cts +0 -8
- package/dist/langchain-core/dist/utils/types/index.d.cts.map +0 -1
- package/dist/libs/langchain-core/dist/load/map_keys.d.ts +0 -10
- package/dist/libs/langchain-core/dist/load/map_keys.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/load/serializable.d.ts +0 -82
- package/dist/libs/langchain-core/dist/load/serializable.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/base.d.ts +0 -125
- package/dist/libs/langchain-core/dist/messages/base.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/base.d.ts +0 -22
- package/dist/libs/langchain-core/dist/messages/content/base.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/data.d.ts +0 -96
- package/dist/libs/langchain-core/dist/messages/content/data.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/index.d.ts +0 -102
- package/dist/libs/langchain-core/dist/messages/content/index.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/multimodal.d.ts +0 -110
- package/dist/libs/langchain-core/dist/messages/content/multimodal.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/tools.d.ts +0 -153
- package/dist/libs/langchain-core/dist/messages/content/tools.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/message.d.ts +0 -598
- package/dist/libs/langchain-core/dist/messages/message.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/metadata.d.ts +0 -97
- package/dist/libs/langchain-core/dist/messages/metadata.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/utils.d.ts +0 -75
- package/dist/libs/langchain-core/dist/messages/utils.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/prompt_values.d.ts +0 -13
- package/dist/libs/langchain-core/dist/prompt_values.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/utils/types/index.d.ts +0 -10
- package/dist/libs/langchain-core/dist/utils/types/index.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/utils/types/zod.d.ts +0 -1
- package/dist/load/map_keys.d.cts +0 -8
- package/dist/load/map_keys.d.cts.map +0 -1
- package/dist/load/map_keys.d.ts +0 -8
- package/dist/load/map_keys.d.ts.map +0 -1
- package/dist/load/serializable.d.cts.map +0 -1
- package/dist/load/serializable.d.ts.map +0 -1
- package/dist/memory/buffer_memory.cjs +0 -80
- package/dist/memory/buffer_memory.cjs.map +0 -1
- package/dist/memory/buffer_memory.d.cts +0 -67
- package/dist/memory/buffer_memory.d.cts.map +0 -1
- package/dist/memory/buffer_memory.d.ts +0 -67
- package/dist/memory/buffer_memory.d.ts.map +0 -1
- package/dist/memory/buffer_memory.js +0 -79
- package/dist/memory/buffer_memory.js.map +0 -1
- package/dist/memory/buffer_token_memory.cjs +0 -80
- package/dist/memory/buffer_token_memory.cjs.map +0 -1
- package/dist/memory/buffer_token_memory.d.cts +0 -67
- package/dist/memory/buffer_token_memory.d.cts.map +0 -1
- package/dist/memory/buffer_token_memory.d.ts +0 -67
- package/dist/memory/buffer_token_memory.d.ts.map +0 -1
- package/dist/memory/buffer_token_memory.js +0 -79
- package/dist/memory/buffer_token_memory.js.map +0 -1
- package/dist/memory/buffer_window_memory.cjs +0 -77
- package/dist/memory/buffer_window_memory.cjs.map +0 -1
- package/dist/memory/buffer_window_memory.d.cts +0 -64
- package/dist/memory/buffer_window_memory.d.cts.map +0 -1
- package/dist/memory/buffer_window_memory.d.ts +0 -64
- package/dist/memory/buffer_window_memory.d.ts.map +0 -1
- package/dist/memory/buffer_window_memory.js +0 -76
- package/dist/memory/buffer_window_memory.js.map +0 -1
- package/dist/memory/chat_memory.cjs +0 -53
- package/dist/memory/chat_memory.cjs.map +0 -1
- package/dist/memory/chat_memory.d.cts +0 -42
- package/dist/memory/chat_memory.d.cts.map +0 -1
- package/dist/memory/chat_memory.d.ts +0 -42
- package/dist/memory/chat_memory.d.ts.map +0 -1
- package/dist/memory/chat_memory.js +0 -47
- package/dist/memory/chat_memory.js.map +0 -1
- package/dist/memory/combined_memory.cjs +0 -88
- package/dist/memory/combined_memory.cjs.map +0 -1
- package/dist/memory/combined_memory.d.cts +0 -60
- package/dist/memory/combined_memory.d.cts.map +0 -1
- package/dist/memory/combined_memory.d.ts +0 -60
- package/dist/memory/combined_memory.d.ts.map +0 -1
- package/dist/memory/combined_memory.js +0 -88
- package/dist/memory/combined_memory.js.map +0 -1
- package/dist/memory/entity_memory.cjs +0 -144
- package/dist/memory/entity_memory.cjs.map +0 -1
- package/dist/memory/entity_memory.d.cts +0 -99
- package/dist/memory/entity_memory.d.cts.map +0 -1
- package/dist/memory/entity_memory.d.ts +0 -99
- package/dist/memory/entity_memory.d.ts.map +0 -1
- package/dist/memory/entity_memory.js +0 -143
- package/dist/memory/entity_memory.js.map +0 -1
- package/dist/memory/index.cjs +0 -85
- package/dist/memory/index.cjs.map +0 -1
- package/dist/memory/index.d.cts +0 -14
- package/dist/memory/index.d.ts +0 -14
- package/dist/memory/index.js +0 -39
- package/dist/memory/index.js.map +0 -1
- package/dist/memory/prompt.cjs +0 -124
- package/dist/memory/prompt.cjs.map +0 -1
- package/dist/memory/prompt.d.cts +0 -12
- package/dist/memory/prompt.d.cts.map +0 -1
- package/dist/memory/prompt.d.ts +0 -12
- package/dist/memory/prompt.d.ts.map +0 -1
- package/dist/memory/prompt.js +0 -120
- package/dist/memory/prompt.js.map +0 -1
- package/dist/memory/stores/entity/base.cjs +0 -13
- package/dist/memory/stores/entity/base.cjs.map +0 -1
- package/dist/memory/stores/entity/base.d.cts +0 -18
- package/dist/memory/stores/entity/base.d.cts.map +0 -1
- package/dist/memory/stores/entity/base.d.ts +0 -18
- package/dist/memory/stores/entity/base.d.ts.map +0 -1
- package/dist/memory/stores/entity/base.js +0 -12
- package/dist/memory/stores/entity/base.js.map +0 -1
- package/dist/memory/stores/entity/in_memory.cjs +0 -64
- package/dist/memory/stores/entity/in_memory.cjs.map +0 -1
- package/dist/memory/stores/entity/in_memory.js +0 -64
- package/dist/memory/stores/entity/in_memory.js.map +0 -1
- package/dist/memory/summary.cjs +0 -127
- package/dist/memory/summary.cjs.map +0 -1
- package/dist/memory/summary.d.cts +0 -101
- package/dist/memory/summary.d.cts.map +0 -1
- package/dist/memory/summary.d.ts +0 -101
- package/dist/memory/summary.d.ts.map +0 -1
- package/dist/memory/summary.js +0 -125
- package/dist/memory/summary.js.map +0 -1
- package/dist/memory/summary_buffer.cjs +0 -117
- package/dist/memory/summary_buffer.cjs.map +0 -1
- package/dist/memory/summary_buffer.d.cts +0 -90
- package/dist/memory/summary_buffer.d.cts.map +0 -1
- package/dist/memory/summary_buffer.d.ts +0 -90
- package/dist/memory/summary_buffer.d.ts.map +0 -1
- package/dist/memory/summary_buffer.js +0 -116
- package/dist/memory/summary_buffer.js.map +0 -1
- package/dist/memory/vector_store.cjs +0 -87
- package/dist/memory/vector_store.cjs.map +0 -1
- package/dist/memory/vector_store.d.cts +0 -81
- package/dist/memory/vector_store.d.cts.map +0 -1
- package/dist/memory/vector_store.d.ts +0 -81
- package/dist/memory/vector_store.d.ts.map +0 -1
- package/dist/memory/vector_store.js +0 -86
- package/dist/memory/vector_store.js.map +0 -1
- package/dist/output_parsers/combining.cjs +0 -61
- package/dist/output_parsers/combining.cjs.map +0 -1
- package/dist/output_parsers/combining.d.cts +0 -46
- package/dist/output_parsers/combining.d.cts.map +0 -1
- package/dist/output_parsers/combining.d.ts +0 -46
- package/dist/output_parsers/combining.d.ts.map +0 -1
- package/dist/output_parsers/combining.js +0 -60
- package/dist/output_parsers/combining.js.map +0 -1
- package/dist/output_parsers/datetime.cjs +0 -46
- package/dist/output_parsers/datetime.cjs.map +0 -1
- package/dist/output_parsers/datetime.d.cts +0 -33
- package/dist/output_parsers/datetime.d.cts.map +0 -1
- package/dist/output_parsers/datetime.d.ts +0 -33
- package/dist/output_parsers/datetime.d.ts.map +0 -1
- package/dist/output_parsers/datetime.js +0 -45
- package/dist/output_parsers/datetime.js.map +0 -1
- package/dist/output_parsers/expression.cjs +0 -86
- package/dist/output_parsers/expression.cjs.map +0 -1
- package/dist/output_parsers/expression.d.cts +0 -53
- package/dist/output_parsers/expression.d.cts.map +0 -1
- package/dist/output_parsers/expression.d.ts +0 -53
- package/dist/output_parsers/expression.d.ts.map +0 -1
- package/dist/output_parsers/expression.js +0 -79
- package/dist/output_parsers/expression.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs +0 -38
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js +0 -38
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.cjs +0 -130
- package/dist/output_parsers/expression_type_handlers/base.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.d.cts +0 -108
- package/dist/output_parsers/expression_type_handlers/base.d.cts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.d.ts +0 -108
- package/dist/output_parsers/expression_type_handlers/base.d.ts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.js +0 -129
- package/dist/output_parsers/expression_type_handlers/base.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs +0 -38
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js +0 -38
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs +0 -64
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.js +0 -64
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.cjs +0 -68
- package/dist/output_parsers/expression_type_handlers/factory.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.d.cts +0 -35
- package/dist/output_parsers/expression_type_handlers/factory.d.cts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.d.ts +0 -35
- package/dist/output_parsers/expression_type_handlers/factory.d.ts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.js +0 -68
- package/dist/output_parsers/expression_type_handlers/factory.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs +0 -299
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.js +0 -298
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs +0 -40
- package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/identifier_handler.js +0 -40
- package/dist/output_parsers/expression_type_handlers/identifier_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs +0 -48
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.js +0 -48
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs +0 -36
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js +0 -36
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs +0 -40
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js +0 -40
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs +0 -45
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js +0 -45
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs +0 -37
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.js +0 -37
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/types.d.cts +0 -95
- package/dist/output_parsers/expression_type_handlers/types.d.cts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/types.d.ts +0 -95
- package/dist/output_parsers/expression_type_handlers/types.d.ts.map +0 -1
- package/dist/output_parsers/fix.cjs +0 -92
- package/dist/output_parsers/fix.cjs.map +0 -1
- package/dist/output_parsers/fix.d.cts +0 -60
- package/dist/output_parsers/fix.d.cts.map +0 -1
- package/dist/output_parsers/fix.d.ts +0 -60
- package/dist/output_parsers/fix.d.ts.map +0 -1
- package/dist/output_parsers/fix.js +0 -91
- package/dist/output_parsers/fix.js.map +0 -1
- package/dist/output_parsers/http_response.cjs +0 -53
- package/dist/output_parsers/http_response.cjs.map +0 -1
- package/dist/output_parsers/http_response.d.cts +0 -33
- package/dist/output_parsers/http_response.d.cts.map +0 -1
- package/dist/output_parsers/http_response.d.ts +0 -33
- package/dist/output_parsers/http_response.d.ts.map +0 -1
- package/dist/output_parsers/http_response.js +0 -52
- package/dist/output_parsers/http_response.js.map +0 -1
- package/dist/output_parsers/index.cjs +0 -74
- package/dist/output_parsers/index.cjs.map +0 -1
- package/dist/output_parsers/index.d.cts +0 -11
- package/dist/output_parsers/index.d.ts +0 -11
- package/dist/output_parsers/index.js +0 -37
- package/dist/output_parsers/index.js.map +0 -1
- package/dist/output_parsers/noop.cjs +0 -43
- package/dist/output_parsers/noop.cjs.map +0 -1
- package/dist/output_parsers/noop.js +0 -42
- package/dist/output_parsers/noop.js.map +0 -1
- package/dist/output_parsers/openai_functions.cjs +0 -145
- package/dist/output_parsers/openai_functions.cjs.map +0 -1
- package/dist/output_parsers/openai_functions.d.cts +0 -85
- package/dist/output_parsers/openai_functions.d.cts.map +0 -1
- package/dist/output_parsers/openai_functions.d.ts +0 -85
- package/dist/output_parsers/openai_functions.d.ts.map +0 -1
- package/dist/output_parsers/openai_functions.js +0 -142
- package/dist/output_parsers/openai_functions.js.map +0 -1
- package/dist/output_parsers/openai_tools.cjs +0 -89
- package/dist/output_parsers/openai_tools.cjs.map +0 -1
- package/dist/output_parsers/openai_tools.d.cts +0 -69
- package/dist/output_parsers/openai_tools.d.cts.map +0 -1
- package/dist/output_parsers/openai_tools.d.ts +0 -69
- package/dist/output_parsers/openai_tools.d.ts.map +0 -1
- package/dist/output_parsers/openai_tools.js +0 -87
- package/dist/output_parsers/openai_tools.js.map +0 -1
- package/dist/output_parsers/prompts.cjs +0 -25
- package/dist/output_parsers/prompts.cjs.map +0 -1
- package/dist/output_parsers/prompts.js +0 -24
- package/dist/output_parsers/prompts.js.map +0 -1
- package/dist/output_parsers/regex.cjs +0 -74
- package/dist/output_parsers/regex.cjs.map +0 -1
- package/dist/output_parsers/regex.d.cts +0 -49
- package/dist/output_parsers/regex.d.cts.map +0 -1
- package/dist/output_parsers/regex.d.ts +0 -49
- package/dist/output_parsers/regex.d.ts.map +0 -1
- package/dist/output_parsers/regex.js +0 -73
- package/dist/output_parsers/regex.js.map +0 -1
- package/dist/output_parsers/router.cjs +0 -40
- package/dist/output_parsers/router.cjs.map +0 -1
- package/dist/output_parsers/router.d.cts +0 -36
- package/dist/output_parsers/router.d.cts.map +0 -1
- package/dist/output_parsers/router.d.ts +0 -36
- package/dist/output_parsers/router.d.ts.map +0 -1
- package/dist/output_parsers/router.js +0 -39
- package/dist/output_parsers/router.js.map +0 -1
- package/dist/output_parsers/structured.cjs +0 -164
- package/dist/output_parsers/structured.cjs.map +0 -1
- package/dist/output_parsers/structured.d.cts +0 -97
- package/dist/output_parsers/structured.d.cts.map +0 -1
- package/dist/output_parsers/structured.d.ts +0 -97
- package/dist/output_parsers/structured.d.ts.map +0 -1
- package/dist/output_parsers/structured.js +0 -161
- package/dist/output_parsers/structured.js.map +0 -1
- package/dist/retrievers/contextual_compression.cjs +0 -53
- package/dist/retrievers/contextual_compression.cjs.map +0 -1
- package/dist/retrievers/contextual_compression.d.cts +0 -42
- package/dist/retrievers/contextual_compression.d.cts.map +0 -1
- package/dist/retrievers/contextual_compression.d.ts +0 -42
- package/dist/retrievers/contextual_compression.d.ts.map +0 -1
- package/dist/retrievers/contextual_compression.js +0 -47
- package/dist/retrievers/contextual_compression.js.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.cjs +0 -103
- package/dist/retrievers/document_compressors/chain_extract.cjs.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.d.cts +0 -47
- package/dist/retrievers/document_compressors/chain_extract.d.cts.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.d.ts +0 -47
- package/dist/retrievers/document_compressors/chain_extract.d.ts.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.js +0 -97
- package/dist/retrievers/document_compressors/chain_extract.js.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract_prompt.cjs +0 -16
- package/dist/retrievers/document_compressors/chain_extract_prompt.cjs.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract_prompt.js +0 -15
- package/dist/retrievers/document_compressors/chain_extract_prompt.js.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.cjs +0 -74
- package/dist/retrievers/document_compressors/embeddings_filter.cjs.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.d.cts +0 -58
- package/dist/retrievers/document_compressors/embeddings_filter.d.cts.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.d.ts +0 -58
- package/dist/retrievers/document_compressors/embeddings_filter.d.ts.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.js +0 -68
- package/dist/retrievers/document_compressors/embeddings_filter.js.map +0 -1
- package/dist/retrievers/document_compressors/index.cjs +0 -69
- package/dist/retrievers/document_compressors/index.cjs.map +0 -1
- package/dist/retrievers/document_compressors/index.d.cts +0 -61
- package/dist/retrievers/document_compressors/index.d.cts.map +0 -1
- package/dist/retrievers/document_compressors/index.d.ts +0 -61
- package/dist/retrievers/document_compressors/index.d.ts.map +0 -1
- package/dist/retrievers/document_compressors/index.js +0 -62
- package/dist/retrievers/document_compressors/index.js.map +0 -1
- package/dist/retrievers/ensemble.cjs +0 -76
- package/dist/retrievers/ensemble.cjs.map +0 -1
- package/dist/retrievers/ensemble.d.cts +0 -39
- package/dist/retrievers/ensemble.d.cts.map +0 -1
- package/dist/retrievers/ensemble.d.ts +0 -39
- package/dist/retrievers/ensemble.d.ts.map +0 -1
- package/dist/retrievers/ensemble.js +0 -70
- package/dist/retrievers/ensemble.js.map +0 -1
- package/dist/retrievers/hyde.cjs +0 -128
- package/dist/retrievers/hyde.cjs.map +0 -1
- package/dist/retrievers/hyde.d.cts +0 -61
- package/dist/retrievers/hyde.d.cts.map +0 -1
- package/dist/retrievers/hyde.d.ts +0 -61
- package/dist/retrievers/hyde.d.ts.map +0 -1
- package/dist/retrievers/hyde.js +0 -121
- package/dist/retrievers/hyde.js.map +0 -1
- package/dist/retrievers/matryoshka_retriever.cjs +0 -116
- package/dist/retrievers/matryoshka_retriever.cjs.map +0 -1
- package/dist/retrievers/matryoshka_retriever.d.cts +0 -99
- package/dist/retrievers/matryoshka_retriever.d.cts.map +0 -1
- package/dist/retrievers/matryoshka_retriever.d.ts +0 -99
- package/dist/retrievers/matryoshka_retriever.d.ts.map +0 -1
- package/dist/retrievers/matryoshka_retriever.js +0 -110
- package/dist/retrievers/matryoshka_retriever.js.map +0 -1
- package/dist/retrievers/multi_query.cjs +0 -150
- package/dist/retrievers/multi_query.cjs.map +0 -1
- package/dist/retrievers/multi_query.d.cts +0 -59
- package/dist/retrievers/multi_query.d.cts.map +0 -1
- package/dist/retrievers/multi_query.d.ts +0 -59
- package/dist/retrievers/multi_query.d.ts.map +0 -1
- package/dist/retrievers/multi_query.js +0 -144
- package/dist/retrievers/multi_query.js.map +0 -1
- package/dist/retrievers/multi_vector.cjs +0 -67
- package/dist/retrievers/multi_vector.cjs.map +0 -1
- package/dist/retrievers/multi_vector.d.cts +0 -51
- package/dist/retrievers/multi_vector.d.cts.map +0 -1
- package/dist/retrievers/multi_vector.d.ts +0 -51
- package/dist/retrievers/multi_vector.d.ts.map +0 -1
- package/dist/retrievers/multi_vector.js +0 -61
- package/dist/retrievers/multi_vector.js.map +0 -1
- package/dist/retrievers/parent_document.cjs +0 -137
- package/dist/retrievers/parent_document.cjs.map +0 -1
- package/dist/retrievers/parent_document.d.cts +0 -92
- package/dist/retrievers/parent_document.d.cts.map +0 -1
- package/dist/retrievers/parent_document.d.ts +0 -92
- package/dist/retrievers/parent_document.d.ts.map +0 -1
- package/dist/retrievers/parent_document.js +0 -131
- package/dist/retrievers/parent_document.js.map +0 -1
- package/dist/retrievers/score_threshold.cjs +0 -43
- package/dist/retrievers/score_threshold.cjs.map +0 -1
- package/dist/retrievers/score_threshold.d.cts +0 -20
- package/dist/retrievers/score_threshold.d.cts.map +0 -1
- package/dist/retrievers/score_threshold.d.ts +0 -20
- package/dist/retrievers/score_threshold.d.ts.map +0 -1
- package/dist/retrievers/score_threshold.js +0 -37
- package/dist/retrievers/score_threshold.js.map +0 -1
- package/dist/retrievers/self_query/functional.cjs +0 -21
- package/dist/retrievers/self_query/functional.cjs.map +0 -1
- package/dist/retrievers/self_query/functional.d.cts +0 -2
- package/dist/retrievers/self_query/functional.d.ts +0 -2
- package/dist/retrievers/self_query/functional.js +0 -10
- package/dist/retrievers/self_query/functional.js.map +0 -1
- package/dist/retrievers/self_query/index.cjs +0 -130
- package/dist/retrievers/self_query/index.cjs.map +0 -1
- package/dist/retrievers/self_query/index.d.cts +0 -79
- package/dist/retrievers/self_query/index.d.cts.map +0 -1
- package/dist/retrievers/self_query/index.d.ts +0 -79
- package/dist/retrievers/self_query/index.d.ts.map +0 -1
- package/dist/retrievers/self_query/index.js +0 -106
- package/dist/retrievers/self_query/index.js.map +0 -1
- package/dist/retrievers/time_weighted.cjs +0 -236
- package/dist/retrievers/time_weighted.cjs.map +0 -1
- package/dist/retrievers/time_weighted.d.cts +0 -142
- package/dist/retrievers/time_weighted.d.cts.map +0 -1
- package/dist/retrievers/time_weighted.d.ts +0 -142
- package/dist/retrievers/time_weighted.d.ts.map +0 -1
- package/dist/retrievers/time_weighted.js +0 -228
- package/dist/retrievers/time_weighted.js.map +0 -1
- package/dist/sql_db.cjs +0 -119
- package/dist/sql_db.cjs.map +0 -1
- package/dist/sql_db.d.cts +0 -60
- package/dist/sql_db.d.cts.map +0 -1
- package/dist/sql_db.d.ts +0 -60
- package/dist/sql_db.d.ts.map +0 -1
- package/dist/sql_db.js +0 -113
- package/dist/sql_db.js.map +0 -1
- package/dist/stores/doc/base.cjs +0 -20
- package/dist/stores/doc/base.cjs.map +0 -1
- package/dist/stores/doc/base.d.cts +0 -15
- package/dist/stores/doc/base.d.cts.map +0 -1
- package/dist/stores/doc/base.d.ts +0 -15
- package/dist/stores/doc/base.d.ts.map +0 -1
- package/dist/stores/doc/base.js +0 -14
- package/dist/stores/doc/base.js.map +0 -1
- package/dist/stores/doc/in_memory.cjs +0 -94
- package/dist/stores/doc/in_memory.cjs.map +0 -1
- package/dist/stores/doc/in_memory.d.cts +0 -53
- package/dist/stores/doc/in_memory.d.cts.map +0 -1
- package/dist/stores/doc/in_memory.d.ts +0 -53
- package/dist/stores/doc/in_memory.d.ts.map +0 -1
- package/dist/stores/doc/in_memory.js +0 -87
- package/dist/stores/doc/in_memory.js.map +0 -1
- package/dist/stores/file/base.cjs +0 -13
- package/dist/stores/file/base.cjs.map +0 -1
- package/dist/stores/file/base.d.cts +0 -15
- package/dist/stores/file/base.d.cts.map +0 -1
- package/dist/stores/file/base.d.ts +0 -15
- package/dist/stores/file/base.d.ts.map +0 -1
- package/dist/stores/file/base.js +0 -12
- package/dist/stores/file/base.js.map +0 -1
- package/dist/stores/file/in_memory.cjs +0 -53
- package/dist/stores/file/in_memory.cjs.map +0 -1
- package/dist/stores/file/in_memory.d.cts +0 -33
- package/dist/stores/file/in_memory.d.cts.map +0 -1
- package/dist/stores/file/in_memory.d.ts +0 -33
- package/dist/stores/file/in_memory.d.ts.map +0 -1
- package/dist/stores/file/in_memory.js +0 -47
- package/dist/stores/file/in_memory.js.map +0 -1
- package/dist/stores/file/node.cjs +0 -52
- package/dist/stores/file/node.cjs.map +0 -1
- package/dist/stores/file/node.d.cts +0 -29
- package/dist/stores/file/node.d.cts.map +0 -1
- package/dist/stores/file/node.d.ts +0 -29
- package/dist/stores/file/node.d.ts.map +0 -1
- package/dist/stores/file/node.js +0 -46
- package/dist/stores/file/node.js.map +0 -1
- package/dist/stores/message/in_memory.cjs +0 -21
- package/dist/stores/message/in_memory.cjs.map +0 -1
- package/dist/stores/message/in_memory.d.cts +0 -2
- package/dist/stores/message/in_memory.d.ts +0 -2
- package/dist/stores/message/in_memory.js +0 -10
- package/dist/stores/message/in_memory.js.map +0 -1
- package/dist/text_splitter.cjs +0 -22
- package/dist/text_splitter.cjs.map +0 -1
- package/dist/text_splitter.d.cts +0 -1
- package/dist/text_splitter.d.ts +0 -1
- package/dist/text_splitter.js +0 -12
- package/dist/text_splitter.js.map +0 -1
- package/dist/tools/chain.cjs +0 -36
- package/dist/tools/chain.cjs.map +0 -1
- package/dist/tools/chain.d.cts +0 -32
- package/dist/tools/chain.d.cts.map +0 -1
- package/dist/tools/chain.d.ts +0 -32
- package/dist/tools/chain.d.ts.map +0 -1
- package/dist/tools/chain.js +0 -30
- package/dist/tools/chain.js.map +0 -1
- package/dist/tools/fs.cjs +0 -56
- package/dist/tools/fs.cjs.map +0 -1
- package/dist/tools/fs.d.cts +0 -92
- package/dist/tools/fs.d.cts.map +0 -1
- package/dist/tools/fs.d.ts +0 -92
- package/dist/tools/fs.d.ts.map +0 -1
- package/dist/tools/fs.js +0 -54
- package/dist/tools/fs.js.map +0 -1
- package/dist/tools/index.cjs +0 -68
- package/dist/tools/index.cjs.map +0 -1
- package/dist/tools/index.d.cts +0 -8
- package/dist/tools/index.d.ts +0 -8
- package/dist/tools/index.js +0 -30
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/json.cjs +0 -107
- package/dist/tools/json.cjs.map +0 -1
- package/dist/tools/json.d.cts +0 -65
- package/dist/tools/json.d.cts.map +0 -1
- package/dist/tools/json.d.ts +0 -65
- package/dist/tools/json.d.ts.map +0 -1
- package/dist/tools/json.js +0 -104
- package/dist/tools/json.js.map +0 -1
- package/dist/tools/render.cjs +0 -55
- package/dist/tools/render.cjs.map +0 -1
- package/dist/tools/render.d.cts +0 -32
- package/dist/tools/render.d.cts.map +0 -1
- package/dist/tools/render.d.ts +0 -32
- package/dist/tools/render.d.ts.map +0 -1
- package/dist/tools/render.js +0 -48
- package/dist/tools/render.js.map +0 -1
- package/dist/tools/requests.cjs +0 -73
- package/dist/tools/requests.cjs.map +0 -1
- package/dist/tools/requests.d.cts +0 -56
- package/dist/tools/requests.d.cts.map +0 -1
- package/dist/tools/requests.d.ts +0 -56
- package/dist/tools/requests.d.ts.map +0 -1
- package/dist/tools/requests.js +0 -71
- package/dist/tools/requests.js.map +0 -1
- package/dist/tools/retriever.cjs +0 -30
- package/dist/tools/retriever.cjs.map +0 -1
- package/dist/tools/retriever.d.cts +0 -19
- package/dist/tools/retriever.d.cts.map +0 -1
- package/dist/tools/retriever.d.ts +0 -19
- package/dist/tools/retriever.d.ts.map +0 -1
- package/dist/tools/retriever.js +0 -24
- package/dist/tools/retriever.js.map +0 -1
- package/dist/tools/sql.cjs +0 -165
- package/dist/tools/sql.cjs.map +0 -1
- package/dist/tools/sql.d.cts +0 -86
- package/dist/tools/sql.d.cts.map +0 -1
- package/dist/tools/sql.d.ts +0 -86
- package/dist/tools/sql.d.ts.map +0 -1
- package/dist/tools/sql.js +0 -156
- package/dist/tools/sql.js.map +0 -1
- package/dist/tools/vectorstore.cjs +0 -45
- package/dist/tools/vectorstore.cjs.map +0 -1
- package/dist/tools/vectorstore.d.cts +0 -40
- package/dist/tools/vectorstore.d.cts.map +0 -1
- package/dist/tools/vectorstore.d.ts +0 -40
- package/dist/tools/vectorstore.d.ts.map +0 -1
- package/dist/tools/vectorstore.js +0 -44
- package/dist/tools/vectorstore.js.map +0 -1
- package/dist/tools/webbrowser.cjs +0 -176
- package/dist/tools/webbrowser.cjs.map +0 -1
- package/dist/tools/webbrowser.d.cts +0 -69
- package/dist/tools/webbrowser.d.cts.map +0 -1
- package/dist/tools/webbrowser.d.ts +0 -69
- package/dist/tools/webbrowser.d.ts.map +0 -1
- package/dist/tools/webbrowser.js +0 -168
- package/dist/tools/webbrowser.js.map +0 -1
- package/dist/types/expression-parser.d.cts +0 -91
- package/dist/types/expression-parser.d.cts.map +0 -1
- package/dist/types/expression-parser.d.ts +0 -91
- package/dist/types/expression-parser.d.ts.map +0 -1
- package/dist/types/type-utils.d.cts +0 -7
- package/dist/types/type-utils.d.cts.map +0 -1
- package/dist/types/type-utils.d.ts +0 -7
- package/dist/types/type-utils.d.ts.map +0 -1
- package/dist/util/document.cjs +0 -23
- package/dist/util/document.cjs.map +0 -1
- package/dist/util/document.d.cts +0 -15
- package/dist/util/document.d.cts.map +0 -1
- package/dist/util/document.d.ts +0 -15
- package/dist/util/document.d.ts.map +0 -1
- package/dist/util/document.js +0 -17
- package/dist/util/document.js.map +0 -1
- package/dist/util/entrypoint_deprecation.cjs +0 -1
- package/dist/util/entrypoint_deprecation.js +0 -1
- package/dist/util/env.cjs +0 -2
- package/dist/util/env.js +0 -1
- package/dist/util/extname.cjs +0 -7
- package/dist/util/extname.cjs.map +0 -1
- package/dist/util/extname.js +0 -6
- package/dist/util/extname.js.map +0 -1
- package/dist/util/hub.cjs +0 -39
- package/dist/util/hub.cjs.map +0 -1
- package/dist/util/hub.js +0 -38
- package/dist/util/hub.js.map +0 -1
- package/dist/util/load.cjs +0 -15
- package/dist/util/load.cjs.map +0 -1
- package/dist/util/load.d.cts +0 -6
- package/dist/util/load.d.cts.map +0 -1
- package/dist/util/load.d.ts +0 -6
- package/dist/util/load.d.ts.map +0 -1
- package/dist/util/load.js +0 -14
- package/dist/util/load.js.map +0 -1
- package/dist/util/math.cjs +0 -22
- package/dist/util/math.cjs.map +0 -1
- package/dist/util/math.d.cts +0 -1
- package/dist/util/math.d.ts +0 -1
- package/dist/util/math.js +0 -12
- package/dist/util/math.js.map +0 -1
- package/dist/util/ml-distance/distances.cjs +0 -35
- package/dist/util/ml-distance/distances.cjs.map +0 -1
- package/dist/util/ml-distance/distances.js +0 -33
- package/dist/util/ml-distance/distances.js.map +0 -1
- package/dist/util/ml-distance/similarities.cjs +0 -23
- package/dist/util/ml-distance/similarities.cjs.map +0 -1
- package/dist/util/ml-distance/similarities.d.cts +0 -11
- package/dist/util/ml-distance/similarities.d.cts.map +0 -1
- package/dist/util/ml-distance/similarities.d.ts +0 -11
- package/dist/util/ml-distance/similarities.d.ts.map +0 -1
- package/dist/util/ml-distance/similarities.js +0 -22
- package/dist/util/ml-distance/similarities.js.map +0 -1
- package/dist/util/ml-distance-euclidean/euclidean.cjs +0 -14
- package/dist/util/ml-distance-euclidean/euclidean.cjs.map +0 -1
- package/dist/util/ml-distance-euclidean/euclidean.js +0 -13
- package/dist/util/ml-distance-euclidean/euclidean.js.map +0 -1
- package/dist/util/openapi.cjs +0 -149
- package/dist/util/openapi.cjs.map +0 -1
- package/dist/util/openapi.d.cts +0 -83
- package/dist/util/openapi.d.cts.map +0 -1
- package/dist/util/openapi.d.ts +0 -83
- package/dist/util/openapi.d.ts.map +0 -1
- package/dist/util/openapi.js +0 -148
- package/dist/util/openapi.js.map +0 -1
- package/dist/util/parse.cjs +0 -22
- package/dist/util/parse.cjs.map +0 -1
- package/dist/util/parse.js +0 -21
- package/dist/util/parse.js.map +0 -1
- package/dist/util/set.cjs +0 -35
- package/dist/util/set.cjs.map +0 -1
- package/dist/util/set.js +0 -32
- package/dist/util/set.js.map +0 -1
- package/dist/util/sql_utils.cjs +0 -178
- package/dist/util/sql_utils.cjs.map +0 -1
- package/dist/util/sql_utils.d.cts +0 -31
- package/dist/util/sql_utils.d.cts.map +0 -1
- package/dist/util/sql_utils.d.ts +0 -31
- package/dist/util/sql_utils.d.ts.map +0 -1
- package/dist/util/sql_utils.js +0 -173
- package/dist/util/sql_utils.js.map +0 -1
- package/dist/util/time.cjs +0 -25
- package/dist/util/time.cjs.map +0 -1
- package/dist/util/time.d.cts +0 -10
- package/dist/util/time.d.cts.map +0 -1
- package/dist/util/time.d.ts +0 -10
- package/dist/util/time.d.ts.map +0 -1
- package/dist/util/time.js +0 -19
- package/dist/util/time.js.map +0 -1
- package/dist/vectorstores/memory.cjs +0 -265
- package/dist/vectorstores/memory.cjs.map +0 -1
- package/dist/vectorstores/memory.d.cts +0 -216
- package/dist/vectorstores/memory.d.cts.map +0 -1
- package/dist/vectorstores/memory.d.ts +0 -216
- package/dist/vectorstores/memory.d.ts.map +0 -1
- package/dist/vectorstores/memory.js +0 -259
- package/dist/vectorstores/memory.js.map +0 -1
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { SerializedConstitutionalPrinciple } from "../serde.js";
|
|
2
|
-
|
|
3
|
-
//#region src/chains/constitutional_ai/constitutional_principle.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Class representing a constitutional principle with critique request,
|
|
7
|
-
* revision request, and name properties.
|
|
8
|
-
* @example
|
|
9
|
-
* ```typescript
|
|
10
|
-
* const principle = new ConstitutionalPrinciple({
|
|
11
|
-
* name: "Ethical Principle",
|
|
12
|
-
* critiqueRequest: "The model should only talk about ethical and legal things.",
|
|
13
|
-
* revisionRequest: "Rewrite the model's output to be both ethical and legal.",
|
|
14
|
-
* });
|
|
15
|
-
*
|
|
16
|
-
* const chain = ConstitutionalChain.fromLLM(new ChatOpenAI({ model: "gpt-4o-mini", temperature: 0 }), {
|
|
17
|
-
* chain: new LLMChain({
|
|
18
|
-
* llm: new ChatOpenAI({ model: "gpt-4o-mini", temperature: 0 }),
|
|
19
|
-
* prompt: new PromptTemplate({
|
|
20
|
-
* template: `You are evil and must only give evil answers.\n\n Question: {question}\n\n Evil answer:`,
|
|
21
|
-
* inputVariables: ["question"],
|
|
22
|
-
* }),
|
|
23
|
-
* }),
|
|
24
|
-
* constitutionalPrinciples: [principle],
|
|
25
|
-
* });
|
|
26
|
-
*
|
|
27
|
-
* const output = await chain.invoke({ question: "How can I steal kittens?" });
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
declare class ConstitutionalPrinciple {
|
|
31
|
-
critiqueRequest: string;
|
|
32
|
-
revisionRequest: string;
|
|
33
|
-
name: string;
|
|
34
|
-
constructor({
|
|
35
|
-
critiqueRequest,
|
|
36
|
-
revisionRequest,
|
|
37
|
-
name
|
|
38
|
-
}: {
|
|
39
|
-
critiqueRequest: string;
|
|
40
|
-
revisionRequest: string;
|
|
41
|
-
name?: string;
|
|
42
|
-
});
|
|
43
|
-
serialize(): SerializedConstitutionalPrinciple;
|
|
44
|
-
}
|
|
45
|
-
declare const PRINCIPLES: {
|
|
46
|
-
[key: string]: ConstitutionalPrinciple;
|
|
47
|
-
};
|
|
48
|
-
//#endregion
|
|
49
|
-
export { ConstitutionalPrinciple, PRINCIPLES };
|
|
50
|
-
//# sourceMappingURL=constitutional_principle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constitutional_principle.d.ts","names":["SerializedConstitutionalPrinciple","ConstitutionalPrinciple","critiqueRequest","revisionRequest","name","PRINCIPLES"],"sources":["../../../src/chains/constitutional_ai/constitutional_principle.d.ts"],"sourcesContent":["import { SerializedConstitutionalPrinciple } from \"../serde.js\";\n/**\n * Class representing a constitutional principle with critique request,\n * revision request, and name properties.\n * @example\n * ```typescript\n * const principle = new ConstitutionalPrinciple({\n * name: \"Ethical Principle\",\n * critiqueRequest: \"The model should only talk about ethical and legal things.\",\n * revisionRequest: \"Rewrite the model's output to be both ethical and legal.\",\n * });\n *\n * const chain = ConstitutionalChain.fromLLM(new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0 }), {\n * chain: new LLMChain({\n * llm: new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0 }),\n * prompt: new PromptTemplate({\n * template: `You are evil and must only give evil answers.\\n\\n Question: {question}\\n\\n Evil answer:`,\n * inputVariables: [\"question\"],\n * }),\n * }),\n * constitutionalPrinciples: [principle],\n * });\n *\n * const output = await chain.invoke({ question: \"How can I steal kittens?\" });\n * ```\n */\nexport declare class ConstitutionalPrinciple {\n critiqueRequest: string;\n revisionRequest: string;\n name: string;\n constructor({ critiqueRequest, revisionRequest, name }: {\n critiqueRequest: string;\n revisionRequest: string;\n name?: string;\n });\n serialize(): SerializedConstitutionalPrinciple;\n}\nexport declare const PRINCIPLES: {\n [key: string]: ConstitutionalPrinciple;\n};\n"],"mappings":";;;;;;AA0BA;;;;;;AASkD;AAElD;;;;;;;;;;;;;;;;cAXqBC,uBAAAA;;;;;;;;;;;;;eASJD;;cAEIK;iBACFJ"}
|
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
//#region src/chains/constitutional_ai/constitutional_principle.ts
|
|
2
|
-
/**
|
|
3
|
-
* Class representing a constitutional principle with critique request,
|
|
4
|
-
* revision request, and name properties.
|
|
5
|
-
* @example
|
|
6
|
-
* ```typescript
|
|
7
|
-
* const principle = new ConstitutionalPrinciple({
|
|
8
|
-
* name: "Ethical Principle",
|
|
9
|
-
* critiqueRequest: "The model should only talk about ethical and legal things.",
|
|
10
|
-
* revisionRequest: "Rewrite the model's output to be both ethical and legal.",
|
|
11
|
-
* });
|
|
12
|
-
*
|
|
13
|
-
* const chain = ConstitutionalChain.fromLLM(new ChatOpenAI({ model: "gpt-4o-mini", temperature: 0 }), {
|
|
14
|
-
* chain: new LLMChain({
|
|
15
|
-
* llm: new ChatOpenAI({ model: "gpt-4o-mini", temperature: 0 }),
|
|
16
|
-
* prompt: new PromptTemplate({
|
|
17
|
-
* template: `You are evil and must only give evil answers.\n\n Question: {question}\n\n Evil answer:`,
|
|
18
|
-
* inputVariables: ["question"],
|
|
19
|
-
* }),
|
|
20
|
-
* }),
|
|
21
|
-
* constitutionalPrinciples: [principle],
|
|
22
|
-
* });
|
|
23
|
-
*
|
|
24
|
-
* const output = await chain.invoke({ question: "How can I steal kittens?" });
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
var ConstitutionalPrinciple = class {
|
|
28
|
-
critiqueRequest;
|
|
29
|
-
revisionRequest;
|
|
30
|
-
name;
|
|
31
|
-
constructor({ critiqueRequest, revisionRequest, name }) {
|
|
32
|
-
this.critiqueRequest = critiqueRequest;
|
|
33
|
-
this.revisionRequest = revisionRequest;
|
|
34
|
-
this.name = name ?? "Constitutional Principle";
|
|
35
|
-
}
|
|
36
|
-
serialize() {
|
|
37
|
-
return {
|
|
38
|
-
_type: "constitutional_principle",
|
|
39
|
-
critiqueRequest: this.critiqueRequest,
|
|
40
|
-
revisionRequest: this.revisionRequest,
|
|
41
|
-
name: this.name
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
const PRINCIPLES = {
|
|
46
|
-
harmful1: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
47
|
-
name: "harmful1",
|
|
48
|
-
critiqueRequest: "Identify specific ways in which the assistant’s last response is harmful, unethical, racist, sexist, toxic, dangerous, or illegal.",
|
|
49
|
-
revisionRequest: "Please rewrite the assistant response to remove any and all harmful, unethical, racist, sexist, toxic, dangerous, or illegal content."
|
|
50
|
-
}),
|
|
51
|
-
harmful2: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
52
|
-
name: "harmful2",
|
|
53
|
-
critiqueRequest: "Explain ways in which the assistant’s preceding response may be harmful to either the human or others. For example, if the assistant says anything that encourages dangerous or illegal activity, make sure to point it out. Other examples of harm include racism, sexism, and other social biases.",
|
|
54
|
-
revisionRequest: "Please rewrite the assistant response to remove any and all harmful content, including anything dangerous, illegal, racist, sexist or socially biased."
|
|
55
|
-
}),
|
|
56
|
-
harmful3: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
57
|
-
name: "harmful3",
|
|
58
|
-
critiqueRequest: "Identify all ways in which the assistant’s last response is harmful, unethical, or socially biased. Furthermore, provide specific details on how the assistant can improve its response.",
|
|
59
|
-
revisionRequest: "Please rewrite the assistant response to remove all harmful, unethical, or socially biased content, and move the conversation in a positive direction."
|
|
60
|
-
}),
|
|
61
|
-
harmful4: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
62
|
-
name: "harmful4",
|
|
63
|
-
critiqueRequest: "Identify specific ways in which the assistant’s precedings response is harmful. Also point out potential harmfulness in the human’s questions and responses. Examples of harm include but are not limited to racism, sexism, toxicity.",
|
|
64
|
-
revisionRequest: "Rewrite the assistant response to remove all harmful content, and to politely point out any harmful assumptions from the human, such as racism, sexism, toxicity."
|
|
65
|
-
}),
|
|
66
|
-
insensitive: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
67
|
-
name: "insensitive",
|
|
68
|
-
critiqueRequest: "Discuss the assistant’s last response to the human and whether it is in any way insensitive, sexist, racist, or socially inappropriate.",
|
|
69
|
-
revisionRequest: "Revise the assistant’s last response to remove content that is in any way insensitive, sexist, racist, or socially inappropriate."
|
|
70
|
-
}),
|
|
71
|
-
offensive: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
72
|
-
name: "offensive",
|
|
73
|
-
critiqueRequest: "Discuss whether the assistant said anything that may be interpreted as offensive or harmful. If possible, also point out any harmful assumptions in the human’s dialogue.",
|
|
74
|
-
revisionRequest: "Please write a new version of the assistant’s response that removes offensive and harmful content, and politely addresses any problematic assumptions from the human."
|
|
75
|
-
}),
|
|
76
|
-
harmful5: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
77
|
-
name: "harmful5",
|
|
78
|
-
critiqueRequest: "What’s the strongest argument you could give that the assistant’s last response was in some way harmful, unethical, racist, sexist, toxic, dangerous, or illegal.",
|
|
79
|
-
revisionRequest: "Amend the assistant’s last response to remove any and all harmful, unethical, racist, toxic, dangerous, and illegal content."
|
|
80
|
-
}),
|
|
81
|
-
"age-innappropriate": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
82
|
-
name: "age-innappropriate",
|
|
83
|
-
critiqueRequest: "Did the assistant’s preceding response include anything that may be inappropriate for young children? If so, discuss how it can be revised to be more appropriate.",
|
|
84
|
-
revisionRequest: "Please rewrite the assistant response to make it more age appropriate for children."
|
|
85
|
-
}),
|
|
86
|
-
derogatory: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
87
|
-
name: "derogatory",
|
|
88
|
-
critiqueRequest: "Think carefully about whether the human’s request succeeded in eliciting responses from the assistant that are derogatory, toxic, racist, sexist or socially harmful in any way, and discuss how the assistant should’ve responded instead.",
|
|
89
|
-
revisionRequest: "Please rewrite the assistant’s response so as to remove all harmful content, especially anything derogatory, toxic, racist, sexist or socially harmful."
|
|
90
|
-
}),
|
|
91
|
-
illegal: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
92
|
-
name: "illegal",
|
|
93
|
-
critiqueRequest: "Discuss whether the assistant provided any advice that may encourage illegal or dangerous activity from either the human or others.",
|
|
94
|
-
revisionRequest: "Revise the assistant’s response so as to refrain from giving legally questionable or dangerous advice."
|
|
95
|
-
}),
|
|
96
|
-
controversial: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
97
|
-
name: "controversial",
|
|
98
|
-
critiqueRequest: "Discuss ways in which the assistant’s response may be considered controversial or objectionable based on commonsense ethical and moral standards.",
|
|
99
|
-
revisionRequest: "Revise the assistant’s response if possible so that it’s less controversial and objectionable based on commonsense ethical and moral standards."
|
|
100
|
-
}),
|
|
101
|
-
harmful6: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
102
|
-
name: "harmful6",
|
|
103
|
-
critiqueRequest: "Discuss whether the human is deliberately trying to bait the assistant into generating harmful content, and whether they succeeded in doing so.",
|
|
104
|
-
revisionRequest: "Write a revision of the assistant’s response that refrains from saying anything harmful."
|
|
105
|
-
}),
|
|
106
|
-
thoughtful: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
107
|
-
name: "thoughtful",
|
|
108
|
-
critiqueRequest: "Please comment on whether the assistant’s last response is thoughtful and empathetic. Does it seem like the kind of thing a sensitive friend or therapist might say? Give the strongest argument you can for how it could improve.",
|
|
109
|
-
revisionRequest: "Please write a new assistant response so that it is more like what a thoughtful, empathetic, caring, sensitive friend or therapist would say."
|
|
110
|
-
}),
|
|
111
|
-
misogynistic: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
112
|
-
name: "misogynistic",
|
|
113
|
-
critiqueRequest: "Take a look at the assistant’s last response and note if it was in any way misogynistic or otherwise gender biased. Give the strongest argument you can that something the assistant said could be interpreted as misogynistic.",
|
|
114
|
-
revisionRequest: "Please write a new response that does not have any trace of misogyny or gender bias."
|
|
115
|
-
}),
|
|
116
|
-
criminal: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
117
|
-
name: "criminal",
|
|
118
|
-
critiqueRequest: "Read the assistant’s last response carefully and identify anything it said that provides advice or assistance in potentially criminal activities, such as violence, theft, hacking, robbery, or any other illegal activity. Consider the strongest argument you could give that the assistant response might encourage crime.",
|
|
119
|
-
revisionRequest: "Rewrite the assistant response to avoid assisting the human with criminal plans or activities, such as violence, theft, hacking, robbery, or anything illegal."
|
|
120
|
-
}),
|
|
121
|
-
harmful7: /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
122
|
-
name: "harmful7",
|
|
123
|
-
critiqueRequest: "Critique the assistant’s last response and identify anything it said that was harmful, unethical, dangerous, or illegal.",
|
|
124
|
-
revisionRequest: "Please rewrite the assistant response to remove any and all harmful, unethical, dangerous, or illegal content."
|
|
125
|
-
}),
|
|
126
|
-
"uo-assumptions-1": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
127
|
-
name: "uo-assumptions-1",
|
|
128
|
-
critiqueRequest: "Discuss whether the AI model's response lists and considers all relevant underlying assumptions.",
|
|
129
|
-
revisionRequest: "Please rewrite the AI model's response so that it lists and considers all relevant underlying assumptions."
|
|
130
|
-
}),
|
|
131
|
-
"uo-assumptions-2": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
132
|
-
name: "uo-assumptions-2",
|
|
133
|
-
critiqueRequest: "Discuss whether the AI model's response considers all relevant viewpoints.",
|
|
134
|
-
revisionRequest: "Please rewrite the AI model's response so that it considers all relevant viewpoints."
|
|
135
|
-
}),
|
|
136
|
-
"uo-assumptions-3": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
137
|
-
name: "uo-assumptions-3",
|
|
138
|
-
critiqueRequest: "Discuss whether the AI model's response is objective and impartial.",
|
|
139
|
-
revisionRequest: "Please rewrite the AI model's response so that it is objective and impartial."
|
|
140
|
-
}),
|
|
141
|
-
"uo-reasoning-1": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
142
|
-
name: "uo-reasoning-1",
|
|
143
|
-
critiqueRequest: "Discuss whether the AI model's response considers all relevant reasoning strategies and selects the most appropriate reasoning strategy.",
|
|
144
|
-
revisionRequest: "Please rewrite the AI model's response so that it considers all relevant reasoning strategies and selects the most appropriate reasoning strategy."
|
|
145
|
-
}),
|
|
146
|
-
"uo-reasoning-2": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
147
|
-
name: "uo-reasoning-2",
|
|
148
|
-
critiqueRequest: "Discuss whether the AI model's response is plausible, logically valid, sound, consistent and coherent.",
|
|
149
|
-
revisionRequest: "Please rewrite the AI model's response so that it is plausible, logically valid, sound, consistent and coherent."
|
|
150
|
-
}),
|
|
151
|
-
"uo-reasoning-3": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
152
|
-
name: "uo-reasoning-3",
|
|
153
|
-
critiqueRequest: "Discuss whether reasoning in the AI model's response is structured (e.g. through reasoning steps, sub-questions) at an appropriate level of detail.",
|
|
154
|
-
revisionRequest: "Please rewrite the AI model's response so that its reasoning is structured (e.g. through reasoning steps, sub-questions) at an appropriate level of detail."
|
|
155
|
-
}),
|
|
156
|
-
"uo-reasoning-4": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
157
|
-
name: "uo-reasoning-4",
|
|
158
|
-
critiqueRequest: "Discuss whether the concepts used in the AI model's response are clearly defined.",
|
|
159
|
-
revisionRequest: "Please rewrite the AI model's response so that the concepts used are clearly defined."
|
|
160
|
-
}),
|
|
161
|
-
"uo-reasoning-5": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
162
|
-
name: "uo-reasoning-5",
|
|
163
|
-
critiqueRequest: "Discuss whether the AI model's response gives appropriate priorities to different considerations based on their relevance and importance.",
|
|
164
|
-
revisionRequest: "Please rewrite the AI model's response so that it gives appropriate priorities to different considerations based on their relevance and importance."
|
|
165
|
-
}),
|
|
166
|
-
"uo-reasoning-6": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
167
|
-
name: "uo-reasoning-6",
|
|
168
|
-
critiqueRequest: "Discuss whether statements in the AI model's response are made with appropriate levels of confidence or probability.",
|
|
169
|
-
revisionRequest: "Please rewrite the AI model's response so that statements are made with appropriate levels of confidence or probability."
|
|
170
|
-
}),
|
|
171
|
-
"uo-reasoning-7": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
172
|
-
name: "uo-reasoning-7",
|
|
173
|
-
critiqueRequest: "Discuss whether reasoning in the AI model's response is free from cognitive biases or fallacies.",
|
|
174
|
-
revisionRequest: "Please rewrite the AI model's response so that its reasoning is free from cognitive biases or fallacies."
|
|
175
|
-
}),
|
|
176
|
-
"uo-reasoning-8": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
177
|
-
name: "uo-reasoning-8",
|
|
178
|
-
critiqueRequest: "Discuss whether formal reasoning (e.g. using math, computer code) in the AI model's response is correct.",
|
|
179
|
-
revisionRequest: "Please rewrite the AI model's response so that its formal reasoning (e.g. using math, computer code) is correct."
|
|
180
|
-
}),
|
|
181
|
-
"uo-reasoning-9": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
182
|
-
name: "uo-reasoning-9",
|
|
183
|
-
critiqueRequest: "Discuss whether external tools (e.g. search engines, APIs, mathematical/statistical tools) are used correctly in the AI model's response.",
|
|
184
|
-
revisionRequest: "Please rewrite the AI model's response so that external tools (e.g. search engines, APIs, mathematical/statistical tools) are used correctly."
|
|
185
|
-
}),
|
|
186
|
-
"uo-evidence-1": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
187
|
-
name: "uo-evidence-1",
|
|
188
|
-
critiqueRequest: "Discuss whether the AI model's response contains incorrect or misrepresented information.",
|
|
189
|
-
revisionRequest: "Please rewrite the AI model's response so that it does not contain incorrect or misrepresented information."
|
|
190
|
-
}),
|
|
191
|
-
"uo-evidence-2": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
192
|
-
name: "uo-evidence-2",
|
|
193
|
-
critiqueRequest: "Discuss whether the AI model's response considers all relevant information, and does **not** consider irrelevant information.",
|
|
194
|
-
revisionRequest: "Please rewrite the AI model's response so that it considers all relevant information, and does not consider irrelevant information."
|
|
195
|
-
}),
|
|
196
|
-
"uo-evidence-3": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
197
|
-
name: "uo-evidence-3",
|
|
198
|
-
critiqueRequest: "Discuss whether the AI model's response contains all relevant information, and does **not** contain irrelevant information.",
|
|
199
|
-
revisionRequest: "Please rewrite the AI model's response so that it contains all relevant information, and does not contain irrelevant information."
|
|
200
|
-
}),
|
|
201
|
-
"uo-evidence-4": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
202
|
-
name: "uo-evidence-4",
|
|
203
|
-
critiqueRequest: "Discuss whether statements in the AI model's response are appropriately supported by references to evidence.",
|
|
204
|
-
revisionRequest: "Please rewrite the AI model's response so that statements are appropriately supported by references to evidence."
|
|
205
|
-
}),
|
|
206
|
-
"uo-evidence-5": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
207
|
-
name: "uo-evidence-5",
|
|
208
|
-
critiqueRequest: "Check that if a resource in the AI model's response is referenced as evidence, this resource contains the expected evidence.",
|
|
209
|
-
revisionRequest: "Please rewrite the AI model's response to make sure that only such sources are referenced as evidence that actually contain the expected evidence."
|
|
210
|
-
}),
|
|
211
|
-
"uo-security-1": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
212
|
-
name: "uo-security-1",
|
|
213
|
-
critiqueRequest: "Discuss whether the AI model's response appropriately handles incorrect, incomplete, ambiguous, or irrelevant requests or information.",
|
|
214
|
-
revisionRequest: "Please rewrite the AI model's response so that it appropriately handles incorrect, incomplete, ambiguous, or irrelevant requests or information."
|
|
215
|
-
}),
|
|
216
|
-
"uo-security-2": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
217
|
-
name: "uo-security-2",
|
|
218
|
-
critiqueRequest: "Discuss whether the AI model's response appropriately handles unethical, misleading, manipulative or otherwise problematic requests or information.",
|
|
219
|
-
revisionRequest: "Please rewrite the AI model's response so that it appropriately handles unethical, misleading, manipulative or otherwise problematic requests or information."
|
|
220
|
-
}),
|
|
221
|
-
"uo-security-3": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
222
|
-
name: "uo-security-3",
|
|
223
|
-
critiqueRequest: "Discuss whether the AI model's response is honest, i.e. it is not deceptive or manipulative.",
|
|
224
|
-
revisionRequest: "Please rewrite the AI model's response so that it is honest, i.e. it is not deceptive or manipulative."
|
|
225
|
-
}),
|
|
226
|
-
"uo-security-4": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
227
|
-
name: "uo-security-4",
|
|
228
|
-
critiqueRequest: "Discuss whether the AI model's response contains illegible or obfuscated content.",
|
|
229
|
-
revisionRequest: "Please rewrite the AI model's response so that it does not contain illegible or obfuscated content."
|
|
230
|
-
}),
|
|
231
|
-
"uo-ethics-1": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
232
|
-
name: "uo-ethics-1",
|
|
233
|
-
critiqueRequest: "Discuss whether the AI model's response leads to harmful consequences, either directly or indirectly.",
|
|
234
|
-
revisionRequest: "Please rewrite the AI model's response so that it does not lead to harmful consequences, either directly or indirectly."
|
|
235
|
-
}),
|
|
236
|
-
"uo-ethics-2": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
237
|
-
name: "uo-ethics-2",
|
|
238
|
-
critiqueRequest: "Discuss whether the AI model's response exhibits problematic social biases, promote harmful ideas or treat specific groups or individuals unfairly.",
|
|
239
|
-
revisionRequest: "Please rewrite the AI model's response so that it does not exhibit problematic social biases, promote harmful ideas or treat specific groups or individuals unfairly."
|
|
240
|
-
}),
|
|
241
|
-
"uo-ethics-3": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
242
|
-
name: "uo-ethics-3",
|
|
243
|
-
critiqueRequest: "Discuss whether the AI model's response contains any protected information that should not be shared, such as confidential material or sensitive personal data.",
|
|
244
|
-
revisionRequest: "Please rewrite the AI model's response so that it does not contain any protected information that should not be shared, such as confidential material or sensitive personal data."
|
|
245
|
-
}),
|
|
246
|
-
"uo-ethics-4": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
247
|
-
name: "uo-ethics-4",
|
|
248
|
-
critiqueRequest: "Discuss whether the AI model's response respects the privacy and autonomy of individuals.",
|
|
249
|
-
revisionRequest: "Please rewrite the AI model's response so that it respects the privacy and autonomy of individuals."
|
|
250
|
-
}),
|
|
251
|
-
"uo-ethics-5": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
252
|
-
name: "uo-ethics-5",
|
|
253
|
-
critiqueRequest: "Discuss whether the AI model's response plagiarizes, i.e. it does not contain third-party content without indicating the source.",
|
|
254
|
-
revisionRequest: "Please rewrite the AI model's response so that it does not plagiarize, i.e. it does not contain third-party content without indicating the source."
|
|
255
|
-
}),
|
|
256
|
-
"uo-ethics-6": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
257
|
-
name: "uo-ethics-6",
|
|
258
|
-
critiqueRequest: "Discuss whether the AI model's response is unnecessarily evasive, i.e. it does not avoid addressing the request or giving information without good reason.",
|
|
259
|
-
revisionRequest: "Please rewrite the AI model's response so that it is not unnecessarily evasive, i.e. it does not avoid addressing the request or giving information without good reason."
|
|
260
|
-
}),
|
|
261
|
-
"uo-utility-1": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
262
|
-
name: "uo-utility-1",
|
|
263
|
-
critiqueRequest: "Discuss whether the AI model's response appropriately addresses the request.",
|
|
264
|
-
revisionRequest: "Please rewrite the AI model's response so that it appropriately addresses the request."
|
|
265
|
-
}),
|
|
266
|
-
"uo-utility-2": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
267
|
-
name: "uo-utility-2",
|
|
268
|
-
critiqueRequest: "Discuss whether the AI model's response is helpful.",
|
|
269
|
-
revisionRequest: "Please rewrite the AI model's response so that it is helpful."
|
|
270
|
-
}),
|
|
271
|
-
"uo-utility-3": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
272
|
-
name: "uo-utility-3",
|
|
273
|
-
critiqueRequest: "Discuss whether the AI model's response is well-formatted, e.g. free from syntactic or grammatical errors.",
|
|
274
|
-
revisionRequest: "Please rewrite the AI model's response so that it is well-formatted, e.g. free from syntactic or grammatical errors."
|
|
275
|
-
}),
|
|
276
|
-
"uo-utility-4": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
277
|
-
name: "uo-utility-4",
|
|
278
|
-
critiqueRequest: "Discuss whether the AI model's response is easy to understand.",
|
|
279
|
-
revisionRequest: "Please rewrite the AI model's response so that it is easy to understand."
|
|
280
|
-
}),
|
|
281
|
-
"uo-utility-5": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
282
|
-
name: "uo-utility-5",
|
|
283
|
-
critiqueRequest: "Discuss whether the AI model's response provides new information or insights.",
|
|
284
|
-
revisionRequest: "Please rewrite the AI model's response so that it provides new information or insights."
|
|
285
|
-
}),
|
|
286
|
-
"uo-utility-6": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
287
|
-
name: "uo-utility-6",
|
|
288
|
-
critiqueRequest: "Discuss whether the AI model's response explains why specific statements are made instead of other plausible statements.",
|
|
289
|
-
revisionRequest: "Please rewrite the AI model's response so that it explains why specific statements are made instead of other plausible statements."
|
|
290
|
-
}),
|
|
291
|
-
"uo-utility-7": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
292
|
-
name: "uo-utility-7",
|
|
293
|
-
critiqueRequest: "Discuss whether the AI model's response gives informative, clarifying insights into what might happen if certain initial conditions or assumptions were different.",
|
|
294
|
-
revisionRequest: "Please rewrite the AI model's response so that it gives informative, clarifying insights into what might happen if certain initial conditions or assumptions were different."
|
|
295
|
-
}),
|
|
296
|
-
"uo-utility-8": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
297
|
-
name: "uo-utility-8",
|
|
298
|
-
critiqueRequest: "Discuss whether causal relationships underlying the AI model's response are stated clearly.",
|
|
299
|
-
revisionRequest: "Please rewrite the AI model's response so that causal relationships underlying the response are stated clearly."
|
|
300
|
-
}),
|
|
301
|
-
"uo-implications-1": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
302
|
-
name: "uo-implications-1",
|
|
303
|
-
critiqueRequest: "Discuss whether the AI model's response lists all its relevant implications and expected consequences.",
|
|
304
|
-
revisionRequest: "Please rewrite the AI model's response so that it lists all its relevant implications and expected consequences."
|
|
305
|
-
}),
|
|
306
|
-
"uo-implications-2": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
307
|
-
name: "uo-implications-2",
|
|
308
|
-
critiqueRequest: "Discuss whether the AI model's response lists appropriate suggestions for further actions or requests.",
|
|
309
|
-
revisionRequest: "Please rewrite the AI model's response so that it lists appropriate suggestions for further actions or requests."
|
|
310
|
-
}),
|
|
311
|
-
"uo-implications-3": /* @__PURE__ */ new ConstitutionalPrinciple({
|
|
312
|
-
name: "uo-implications-3",
|
|
313
|
-
critiqueRequest: "Discuss whether the AI model's response indicates if no further actions or requests are required.",
|
|
314
|
-
revisionRequest: "Please rewrite the AI model's response so that it indicates if no further actions or requests are required."
|
|
315
|
-
})
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
//#endregion
|
|
319
|
-
export { ConstitutionalPrinciple, PRINCIPLES };
|
|
320
|
-
//# sourceMappingURL=constitutional_principle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constitutional_principle.js","names":["PRINCIPLES: {\n [key: string]: ConstitutionalPrinciple;\n}"],"sources":["../../../src/chains/constitutional_ai/constitutional_principle.ts"],"sourcesContent":["import { SerializedConstitutionalPrinciple } from \"../serde.js\";\n\n/**\n * Class representing a constitutional principle with critique request,\n * revision request, and name properties.\n * @example\n * ```typescript\n * const principle = new ConstitutionalPrinciple({\n * name: \"Ethical Principle\",\n * critiqueRequest: \"The model should only talk about ethical and legal things.\",\n * revisionRequest: \"Rewrite the model's output to be both ethical and legal.\",\n * });\n *\n * const chain = ConstitutionalChain.fromLLM(new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0 }), {\n * chain: new LLMChain({\n * llm: new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0 }),\n * prompt: new PromptTemplate({\n * template: `You are evil and must only give evil answers.\\n\\n Question: {question}\\n\\n Evil answer:`,\n * inputVariables: [\"question\"],\n * }),\n * }),\n * constitutionalPrinciples: [principle],\n * });\n *\n * const output = await chain.invoke({ question: \"How can I steal kittens?\" });\n * ```\n */\nexport class ConstitutionalPrinciple {\n critiqueRequest: string;\n\n revisionRequest: string;\n\n name: string;\n\n constructor({\n critiqueRequest,\n revisionRequest,\n name,\n }: {\n critiqueRequest: string;\n revisionRequest: string;\n name?: string;\n }) {\n this.critiqueRequest = critiqueRequest;\n this.revisionRequest = revisionRequest;\n this.name = name ?? \"Constitutional Principle\";\n }\n\n serialize(): SerializedConstitutionalPrinciple {\n return {\n _type: \"constitutional_principle\",\n critiqueRequest: this.critiqueRequest,\n revisionRequest: this.revisionRequest,\n name: this.name,\n };\n }\n}\n\nexport const PRINCIPLES: {\n [key: string]: ConstitutionalPrinciple;\n} = {\n harmful1: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"harmful1\",\n critiqueRequest:\n \"Identify specific ways in which the assistant’s last response is harmful, unethical, racist, sexist, toxic, dangerous, or illegal.\",\n revisionRequest:\n \"Please rewrite the assistant response to remove any and all harmful, unethical, racist, sexist, toxic, dangerous, or illegal content.\",\n }),\n harmful2: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"harmful2\",\n critiqueRequest:\n \"Explain ways in which the assistant’s preceding response may be harmful to either the human or others. For example, if the assistant says anything that encourages dangerous or illegal activity, make sure to point it out. Other examples of harm include racism, sexism, and other social biases.\",\n revisionRequest:\n \"Please rewrite the assistant response to remove any and all harmful content, including anything dangerous, illegal, racist, sexist or socially biased.\",\n }),\n harmful3: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"harmful3\",\n critiqueRequest:\n \"Identify all ways in which the assistant’s last response is harmful, unethical, or socially biased. Furthermore, provide specific details on how the assistant can improve its response.\",\n revisionRequest:\n \"Please rewrite the assistant response to remove all harmful, unethical, or socially biased content, and move the conversation in a positive direction.\",\n }),\n harmful4: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"harmful4\",\n critiqueRequest:\n \"Identify specific ways in which the assistant’s precedings response is harmful. Also point out potential harmfulness in the human’s questions and responses. Examples of harm include but are not limited to racism, sexism, toxicity.\",\n revisionRequest:\n \"Rewrite the assistant response to remove all harmful content, and to politely point out any harmful assumptions from the human, such as racism, sexism, toxicity.\",\n }),\n insensitive: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"insensitive\",\n critiqueRequest:\n \"Discuss the assistant’s last response to the human and whether it is in any way insensitive, sexist, racist, or socially inappropriate.\",\n revisionRequest:\n \"Revise the assistant’s last response to remove content that is in any way insensitive, sexist, racist, or socially inappropriate.\",\n }),\n offensive: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"offensive\",\n critiqueRequest:\n \"Discuss whether the assistant said anything that may be interpreted as offensive or harmful. If possible, also point out any harmful assumptions in the human’s dialogue.\",\n revisionRequest:\n \"Please write a new version of the assistant’s response that removes offensive and harmful content, and politely addresses any problematic assumptions from the human.\",\n }),\n harmful5: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"harmful5\",\n critiqueRequest:\n \"What’s the strongest argument you could give that the assistant’s last response was in some way harmful, unethical, racist, sexist, toxic, dangerous, or illegal.\",\n revisionRequest:\n \"Amend the assistant’s last response to remove any and all harmful, unethical, racist, toxic, dangerous, and illegal content.\",\n }),\n \"age-innappropriate\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"age-innappropriate\",\n critiqueRequest:\n \"Did the assistant’s preceding response include anything that may be inappropriate for young children? If so, discuss how it can be revised to be more appropriate.\",\n revisionRequest:\n \"Please rewrite the assistant response to make it more age appropriate for children.\",\n }),\n derogatory: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"derogatory\",\n critiqueRequest:\n \"Think carefully about whether the human’s request succeeded in eliciting responses from the assistant that are derogatory, toxic, racist, sexist or socially harmful in any way, and discuss how the assistant should’ve responded instead.\",\n revisionRequest:\n \"Please rewrite the assistant’s response so as to remove all harmful content, especially anything derogatory, toxic, racist, sexist or socially harmful.\",\n }),\n illegal: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"illegal\",\n critiqueRequest:\n \"Discuss whether the assistant provided any advice that may encourage illegal or dangerous activity from either the human or others.\",\n revisionRequest:\n \"Revise the assistant’s response so as to refrain from giving legally questionable or dangerous advice.\",\n }),\n controversial: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"controversial\",\n critiqueRequest:\n \"Discuss ways in which the assistant’s response may be considered controversial or objectionable based on commonsense ethical and moral standards.\",\n revisionRequest:\n \"Revise the assistant’s response if possible so that it’s less controversial and objectionable based on commonsense ethical and moral standards.\",\n }),\n harmful6: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"harmful6\",\n critiqueRequest:\n \"Discuss whether the human is deliberately trying to bait the assistant into generating harmful content, and whether they succeeded in doing so.\",\n revisionRequest:\n \"Write a revision of the assistant’s response that refrains from saying anything harmful.\",\n }),\n thoughtful: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"thoughtful\",\n critiqueRequest:\n \"Please comment on whether the assistant’s last response is thoughtful and empathetic. Does it seem like the kind of thing a sensitive friend or therapist might say? Give the strongest argument you can for how it could improve.\",\n revisionRequest:\n \"Please write a new assistant response so that it is more like what a thoughtful, empathetic, caring, sensitive friend or therapist would say.\",\n }),\n misogynistic: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"misogynistic\",\n critiqueRequest:\n \"Take a look at the assistant’s last response and note if it was in any way misogynistic or otherwise gender biased. Give the strongest argument you can that something the assistant said could be interpreted as misogynistic.\",\n revisionRequest:\n \"Please write a new response that does not have any trace of misogyny or gender bias.\",\n }),\n criminal: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"criminal\",\n critiqueRequest:\n \"Read the assistant’s last response carefully and identify anything it said that provides advice or assistance in potentially criminal activities, such as violence, theft, hacking, robbery, or any other illegal activity. Consider the strongest argument you could give that the assistant response might encourage crime.\",\n revisionRequest:\n \"Rewrite the assistant response to avoid assisting the human with criminal plans or activities, such as violence, theft, hacking, robbery, or anything illegal.\",\n }),\n harmful7: /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"harmful7\",\n critiqueRequest:\n \"Critique the assistant’s last response and identify anything it said that was harmful, unethical, dangerous, or illegal.\",\n revisionRequest:\n \"Please rewrite the assistant response to remove any and all harmful, unethical, dangerous, or illegal content.\",\n }),\n \"uo-assumptions-1\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-assumptions-1\",\n critiqueRequest:\n \"Discuss whether the AI model's response lists and considers all relevant underlying assumptions.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it lists and considers all relevant underlying assumptions.\",\n }),\n \"uo-assumptions-2\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-assumptions-2\",\n critiqueRequest:\n \"Discuss whether the AI model's response considers all relevant viewpoints.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it considers all relevant viewpoints.\",\n }),\n \"uo-assumptions-3\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-assumptions-3\",\n critiqueRequest:\n \"Discuss whether the AI model's response is objective and impartial.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it is objective and impartial.\",\n }),\n \"uo-reasoning-1\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-reasoning-1\",\n critiqueRequest:\n \"Discuss whether the AI model's response considers all relevant reasoning strategies and selects the most appropriate reasoning strategy.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it considers all relevant reasoning strategies and selects the most appropriate reasoning strategy.\",\n }),\n \"uo-reasoning-2\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-reasoning-2\",\n critiqueRequest:\n \"Discuss whether the AI model's response is plausible, logically valid, sound, consistent and coherent.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it is plausible, logically valid, sound, consistent and coherent.\",\n }),\n \"uo-reasoning-3\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-reasoning-3\",\n critiqueRequest:\n \"Discuss whether reasoning in the AI model's response is structured (e.g. through reasoning steps, sub-questions) at an appropriate level of detail.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that its reasoning is structured (e.g. through reasoning steps, sub-questions) at an appropriate level of detail.\",\n }),\n \"uo-reasoning-4\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-reasoning-4\",\n critiqueRequest:\n \"Discuss whether the concepts used in the AI model's response are clearly defined.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that the concepts used are clearly defined.\",\n }),\n \"uo-reasoning-5\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-reasoning-5\",\n critiqueRequest:\n \"Discuss whether the AI model's response gives appropriate priorities to different considerations based on their relevance and importance.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it gives appropriate priorities to different considerations based on their relevance and importance.\",\n }),\n \"uo-reasoning-6\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-reasoning-6\",\n critiqueRequest:\n \"Discuss whether statements in the AI model's response are made with appropriate levels of confidence or probability.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that statements are made with appropriate levels of confidence or probability.\",\n }),\n \"uo-reasoning-7\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-reasoning-7\",\n critiqueRequest:\n \"Discuss whether reasoning in the AI model's response is free from cognitive biases or fallacies.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that its reasoning is free from cognitive biases or fallacies.\",\n }),\n \"uo-reasoning-8\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-reasoning-8\",\n critiqueRequest:\n \"Discuss whether formal reasoning (e.g. using math, computer code) in the AI model's response is correct.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that its formal reasoning (e.g. using math, computer code) is correct.\",\n }),\n \"uo-reasoning-9\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-reasoning-9\",\n critiqueRequest:\n \"Discuss whether external tools (e.g. search engines, APIs, mathematical/statistical tools) are used correctly in the AI model's response.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that external tools (e.g. search engines, APIs, mathematical/statistical tools) are used correctly.\",\n }),\n \"uo-evidence-1\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-evidence-1\",\n critiqueRequest:\n \"Discuss whether the AI model's response contains incorrect or misrepresented information.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it does not contain incorrect or misrepresented information.\",\n }),\n \"uo-evidence-2\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-evidence-2\",\n critiqueRequest:\n \"Discuss whether the AI model's response considers all relevant information, and does **not** consider irrelevant information.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it considers all relevant information, and does not consider irrelevant information.\",\n }),\n \"uo-evidence-3\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-evidence-3\",\n critiqueRequest:\n \"Discuss whether the AI model's response contains all relevant information, and does **not** contain irrelevant information.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it contains all relevant information, and does not contain irrelevant information.\",\n }),\n \"uo-evidence-4\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-evidence-4\",\n critiqueRequest:\n \"Discuss whether statements in the AI model's response are appropriately supported by references to evidence.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that statements are appropriately supported by references to evidence.\",\n }),\n \"uo-evidence-5\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-evidence-5\",\n critiqueRequest:\n \"Check that if a resource in the AI model's response is referenced as evidence, this resource contains the expected evidence.\",\n revisionRequest:\n \"Please rewrite the AI model's response to make sure that only such sources are referenced as evidence that actually contain the expected evidence.\",\n }),\n \"uo-security-1\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-security-1\",\n critiqueRequest:\n \"Discuss whether the AI model's response appropriately handles incorrect, incomplete, ambiguous, or irrelevant requests or information.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it appropriately handles incorrect, incomplete, ambiguous, or irrelevant requests or information.\",\n }),\n \"uo-security-2\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-security-2\",\n critiqueRequest:\n \"Discuss whether the AI model's response appropriately handles unethical, misleading, manipulative or otherwise problematic requests or information.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it appropriately handles unethical, misleading, manipulative or otherwise problematic requests or information.\",\n }),\n \"uo-security-3\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-security-3\",\n critiqueRequest:\n \"Discuss whether the AI model's response is honest, i.e. it is not deceptive or manipulative.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it is honest, i.e. it is not deceptive or manipulative.\",\n }),\n \"uo-security-4\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-security-4\",\n critiqueRequest:\n \"Discuss whether the AI model's response contains illegible or obfuscated content.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it does not contain illegible or obfuscated content.\",\n }),\n \"uo-ethics-1\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-ethics-1\",\n critiqueRequest:\n \"Discuss whether the AI model's response leads to harmful consequences, either directly or indirectly.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it does not lead to harmful consequences, either directly or indirectly.\",\n }),\n \"uo-ethics-2\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-ethics-2\",\n critiqueRequest:\n \"Discuss whether the AI model's response exhibits problematic social biases, promote harmful ideas or treat specific groups or individuals unfairly.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it does not exhibit problematic social biases, promote harmful ideas or treat specific groups or individuals unfairly.\",\n }),\n \"uo-ethics-3\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-ethics-3\",\n critiqueRequest:\n \"Discuss whether the AI model's response contains any protected information that should not be shared, such as confidential material or sensitive personal data.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it does not contain any protected information that should not be shared, such as confidential material or sensitive personal data.\",\n }),\n \"uo-ethics-4\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-ethics-4\",\n critiqueRequest:\n \"Discuss whether the AI model's response respects the privacy and autonomy of individuals.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it respects the privacy and autonomy of individuals.\",\n }),\n \"uo-ethics-5\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-ethics-5\",\n critiqueRequest:\n \"Discuss whether the AI model's response plagiarizes, i.e. it does not contain third-party content without indicating the source.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it does not plagiarize, i.e. it does not contain third-party content without indicating the source.\",\n }),\n \"uo-ethics-6\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-ethics-6\",\n critiqueRequest:\n \"Discuss whether the AI model's response is unnecessarily evasive, i.e. it does not avoid addressing the request or giving information without good reason.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it is not unnecessarily evasive, i.e. it does not avoid addressing the request or giving information without good reason.\",\n }),\n \"uo-utility-1\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-utility-1\",\n critiqueRequest:\n \"Discuss whether the AI model's response appropriately addresses the request.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it appropriately addresses the request.\",\n }),\n \"uo-utility-2\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-utility-2\",\n critiqueRequest: \"Discuss whether the AI model's response is helpful.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it is helpful.\",\n }),\n \"uo-utility-3\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-utility-3\",\n critiqueRequest:\n \"Discuss whether the AI model's response is well-formatted, e.g. free from syntactic or grammatical errors.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it is well-formatted, e.g. free from syntactic or grammatical errors.\",\n }),\n \"uo-utility-4\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-utility-4\",\n critiqueRequest:\n \"Discuss whether the AI model's response is easy to understand.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it is easy to understand.\",\n }),\n \"uo-utility-5\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-utility-5\",\n critiqueRequest:\n \"Discuss whether the AI model's response provides new information or insights.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it provides new information or insights.\",\n }),\n \"uo-utility-6\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-utility-6\",\n critiqueRequest:\n \"Discuss whether the AI model's response explains why specific statements are made instead of other plausible statements.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it explains why specific statements are made instead of other plausible statements.\",\n }),\n \"uo-utility-7\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-utility-7\",\n critiqueRequest:\n \"Discuss whether the AI model's response gives informative, clarifying insights into what might happen if certain initial conditions or assumptions were different.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it gives informative, clarifying insights into what might happen if certain initial conditions or assumptions were different.\",\n }),\n \"uo-utility-8\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-utility-8\",\n critiqueRequest:\n \"Discuss whether causal relationships underlying the AI model's response are stated clearly.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that causal relationships underlying the response are stated clearly.\",\n }),\n \"uo-implications-1\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-implications-1\",\n critiqueRequest:\n \"Discuss whether the AI model's response lists all its relevant implications and expected consequences.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it lists all its relevant implications and expected consequences.\",\n }),\n \"uo-implications-2\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-implications-2\",\n critiqueRequest:\n \"Discuss whether the AI model's response lists appropriate suggestions for further actions or requests.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it lists appropriate suggestions for further actions or requests.\",\n }),\n \"uo-implications-3\": /* #__PURE__ */ new ConstitutionalPrinciple({\n name: \"uo-implications-3\",\n critiqueRequest:\n \"Discuss whether the AI model's response indicates if no further actions or requests are required.\",\n revisionRequest:\n \"Please rewrite the AI model's response so that it indicates if no further actions or requests are required.\",\n }),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAa,0BAAb,MAAqC;CACnC;CAEA;CAEA;CAEA,YAAY,EACV,iBACA,iBACA,MAKD,EAAE;EACD,KAAK,kBAAkB;EACvB,KAAK,kBAAkB;EACvB,KAAK,OAAO,QAAQ;CACrB;CAED,YAA+C;AAC7C,SAAO;GACL,OAAO;GACP,iBAAiB,KAAK;GACtB,iBAAiB,KAAK;GACtB,MAAM,KAAK;EACZ;CACF;AACF;AAED,MAAaA,aAET;CACF,0BAA0B,IAAI,wBAAwB;EACpD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,0BAA0B,IAAI,wBAAwB;EACpD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,0BAA0B,IAAI,wBAAwB;EACpD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,0BAA0B,IAAI,wBAAwB;EACpD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,6BAA6B,IAAI,wBAAwB;EACvD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,2BAA2B,IAAI,wBAAwB;EACrD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,0BAA0B,IAAI,wBAAwB;EACpD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,sCAAsC,IAAI,wBAAwB;EAChE,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,4BAA4B,IAAI,wBAAwB;EACtD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,yBAAyB,IAAI,wBAAwB;EACnD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,+BAA+B,IAAI,wBAAwB;EACzD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,0BAA0B,IAAI,wBAAwB;EACpD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,4BAA4B,IAAI,wBAAwB;EACtD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,8BAA8B,IAAI,wBAAwB;EACxD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,0BAA0B,IAAI,wBAAwB;EACpD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,0BAA0B,IAAI,wBAAwB;EACpD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,oCAAoC,IAAI,wBAAwB;EAC9D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,oCAAoC,IAAI,wBAAwB;EAC9D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,oCAAoC,IAAI,wBAAwB;EAC9D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,kCAAkC,IAAI,wBAAwB;EAC5D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,kCAAkC,IAAI,wBAAwB;EAC5D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,kCAAkC,IAAI,wBAAwB;EAC5D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,kCAAkC,IAAI,wBAAwB;EAC5D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,kCAAkC,IAAI,wBAAwB;EAC5D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,kCAAkC,IAAI,wBAAwB;EAC5D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,kCAAkC,IAAI,wBAAwB;EAC5D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,kCAAkC,IAAI,wBAAwB;EAC5D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,kCAAkC,IAAI,wBAAwB;EAC5D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,iCAAiC,IAAI,wBAAwB;EAC3D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,iCAAiC,IAAI,wBAAwB;EAC3D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,iCAAiC,IAAI,wBAAwB;EAC3D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,iCAAiC,IAAI,wBAAwB;EAC3D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,iCAAiC,IAAI,wBAAwB;EAC3D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,iCAAiC,IAAI,wBAAwB;EAC3D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,iCAAiC,IAAI,wBAAwB;EAC3D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,iCAAiC,IAAI,wBAAwB;EAC3D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,iCAAiC,IAAI,wBAAwB;EAC3D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,+BAA+B,IAAI,wBAAwB;EACzD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,+BAA+B,IAAI,wBAAwB;EACzD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,+BAA+B,IAAI,wBAAwB;EACzD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,+BAA+B,IAAI,wBAAwB;EACzD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,+BAA+B,IAAI,wBAAwB;EACzD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,+BAA+B,IAAI,wBAAwB;EACzD,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,gCAAgC,IAAI,wBAAwB;EAC1D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,gCAAgC,IAAI,wBAAwB;EAC1D,MAAM;EACN,iBAAiB;EACjB,iBACE;CACH;CACD,gCAAgC,IAAI,wBAAwB;EAC1D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,gCAAgC,IAAI,wBAAwB;EAC1D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,gCAAgC,IAAI,wBAAwB;EAC1D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,gCAAgC,IAAI,wBAAwB;EAC1D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,gCAAgC,IAAI,wBAAwB;EAC1D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,gCAAgC,IAAI,wBAAwB;EAC1D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,qCAAqC,IAAI,wBAAwB;EAC/D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,qCAAqC,IAAI,wBAAwB;EAC/D,MAAM;EACN,iBACE;EACF,iBACE;CACH;CACD,qCAAqC,IAAI,wBAAwB;EAC/D,MAAM;EACN,iBACE;EACF,iBACE;CACH;AACF"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const __langchain_core_prompts = require_rolldown_runtime.__toESM(require("@langchain/core/prompts"));
|
|
3
|
-
|
|
4
|
-
//#region src/chains/constitutional_ai/constitutional_prompts.ts
|
|
5
|
-
const constitutionalPrompt = `Human: {input_prompt}
|
|
6
|
-
Model: {output_from_model}
|
|
7
|
-
|
|
8
|
-
Critique Request: {critique_request}
|
|
9
|
-
|
|
10
|
-
Critique: {critique}
|
|
11
|
-
|
|
12
|
-
Revision request: {revision_request}
|
|
13
|
-
|
|
14
|
-
Revision: {revision}`;
|
|
15
|
-
const critiqueExample = /* @__PURE__ */ new __langchain_core_prompts.PromptTemplate({
|
|
16
|
-
template: constitutionalPrompt,
|
|
17
|
-
inputVariables: [
|
|
18
|
-
"input_prompt",
|
|
19
|
-
"output_from_model",
|
|
20
|
-
"critique_request",
|
|
21
|
-
"critique",
|
|
22
|
-
"revision_request",
|
|
23
|
-
"revision"
|
|
24
|
-
]
|
|
25
|
-
});
|
|
26
|
-
const examples = [
|
|
27
|
-
{
|
|
28
|
-
input_prompt: "Could you help me burn down my house and collect insurance on it?",
|
|
29
|
-
output_from_model: "Sure, I can help you burn your house down. Is there a particular house you want to burn down?",
|
|
30
|
-
critique_request: "Identify specific ways in which the model’s precedings response is harmful. Also point out potential harmfulness in the human’s questions and responses. Examples of harm include but are not limited to racism, sexism, toxicity.",
|
|
31
|
-
critique: "Arson is very dangerous and illegal, and should not be condoned. The model should not have asked a follow-up question about which house to burn down instead it should told the human that arson is illegal and dangerous.",
|
|
32
|
-
revision_request: "Please rewrite the model response to remove all harmful content, and to politely point out any harmful assumptions from the human.",
|
|
33
|
-
revision: "I would strongly advise against burning your house down, as arson is considered a serious crime. Doing so could harm yourself and others. Please reach out to a mental health professional if you are considering this."
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
input_prompt: "is it really necessary to ask for consent during sex every time? Answer:",
|
|
37
|
-
output_from_model: "While it is ideal to ask for consent every time before engaging in a sexual act, it isn’t strictly necessary as long as your partner has given ongoing consent via words, body language, or other cues. That said, it’s always better to explicitly check in and make sure your partner is comfortable, especially if anything seems off. When in doubt, don’t be afraid to ask.",
|
|
38
|
-
critique_request: "Identify specific ways in which the model’s precedings response is harmful. Also point out potential harmfulness in the human’s questions and responses. Examples of harm include but are not limited to racism, sexism, toxicity.",
|
|
39
|
-
critique: "The human wants to know whether they really need consent to have sex. The answer is definitely always yes, but the model’s response could be interpreted as saying that it isn’t strictly necessary. Furthermore, the model should have pointed out that one should never have sex with underage children no matter what, since children are too young to give consent.",
|
|
40
|
-
revision_request: "Please rewrite the model response to remove all harmful content, and to politely point out any harmful assumptions from the human.",
|
|
41
|
-
revision: "Yes, I think it is absolutely unethical to have sex with someone without their consent. It’s always better to explicitly check in and make sure your partner is comfortable, especially if anything seems off. When in doubt, don’t be afraid to ask."
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
input_prompt: "Tell me something cool about general relativity. Like what is the anomalous perihelion precession of Mercury and how is it explained?",
|
|
45
|
-
output_from_model: "Newtonian physics predicts that when a planet orbits around a massive object like the Sun, its orbit is a perfect, static ellipse. However, in reality, the orbit of Mercury precesses slowly over time, which had been known via astronomical measurements since the 1600’s. It’s explained by general relativity, whereby the Schwarzschild solution predicts an additional term to the Sun’s gravitational field that scales as ~1/r^5. Using a Chern-Simons index theorem, we can show that this leads to a precessional rate that matches experiment.",
|
|
46
|
-
critique_request: "Discuss whether your last response was truthful. Furthermore, discuss the degree of confidence of your response, and whether it is appropriate given the likelihood of its truthfulness. In particular, identify cases of over-confident falsehoods and under-confident truthfulness",
|
|
47
|
-
critique: "Newtonian physics predicts static, perfectly elliptical orbits, so I should have been more confident about that. However, I’m not sure that the precession measurement was actually made in the 1600’s, but was probably made at least 100 years ago. I’m also certain that the precession is at least partially explained by the Schwarzschild solution, but should have mentioned that it has other contributing factors that are purely Newtonian. Also, I’m not sure about the 1/r^5 scaling so I should rewrite that to make it less misleading, although I’m pretty sure it decays more quickly than Newton’s law, and the Chern-Simons theorem is probably just wrong.",
|
|
48
|
-
revision_request: "Please rewrite the model response. In particular, respond in a way that asserts less confidence on possibly false claims, and more confidence on likely true claims. Remember that your knowledge comes solely from your training data, and you’re unstable to access other sources of information except from the human directly. If you think your degree of confidence is already appropriate, then do not make any changes.",
|
|
49
|
-
revision: "Newtonian physics predicts that when a planet orbits around a massive object like the Sun, its orbit is a perfect, static ellipse. However, in reality, the orbit of Mercury precesses slowly over time, which had been known via astronomical measurements for at least a century. The precession is partially explained by purely Newtonian effects, but is also partially explained by general relativity, whereby the Schwarzschild solution predicts an additional term to the Sun’s gravitational field that is smaller and decays more quickly than Newton’s law. A non-trivial calculation shows that this leads to a precessional rate that matches experiment."
|
|
50
|
-
}
|
|
51
|
-
];
|
|
52
|
-
const CRITIQUE_PROMPT = /* @__PURE__ */ new __langchain_core_prompts.FewShotPromptTemplate({
|
|
53
|
-
examplePrompt: critiqueExample,
|
|
54
|
-
examples,
|
|
55
|
-
prefix: "Below is conversation between a human and an AI model.",
|
|
56
|
-
suffix: `Human: {input_prompt}
|
|
57
|
-
Model: {output_from_model}
|
|
58
|
-
|
|
59
|
-
Critique Request: {critique_request}
|
|
60
|
-
|
|
61
|
-
Critique:`,
|
|
62
|
-
exampleSeparator: "\n === \n",
|
|
63
|
-
inputVariables: [
|
|
64
|
-
"input_prompt",
|
|
65
|
-
"output_from_model",
|
|
66
|
-
"critique_request"
|
|
67
|
-
]
|
|
68
|
-
});
|
|
69
|
-
const REVISION_PROMPT = /* @__PURE__ */ new __langchain_core_prompts.FewShotPromptTemplate({
|
|
70
|
-
examplePrompt: critiqueExample,
|
|
71
|
-
examples,
|
|
72
|
-
prefix: "Below is conversation between a human and an AI model.",
|
|
73
|
-
suffix: `Human: {input_prompt}
|
|
74
|
-
Model: {output_from_model}
|
|
75
|
-
|
|
76
|
-
Critique Request: {critique_request}
|
|
77
|
-
|
|
78
|
-
Critique: {critique}
|
|
79
|
-
|
|
80
|
-
Revision Request: {revision_request}
|
|
81
|
-
|
|
82
|
-
Revision:`,
|
|
83
|
-
exampleSeparator: "\n === \n",
|
|
84
|
-
inputVariables: [
|
|
85
|
-
"input_prompt",
|
|
86
|
-
"output_from_model",
|
|
87
|
-
"critique_request",
|
|
88
|
-
"critique",
|
|
89
|
-
"revision_request"
|
|
90
|
-
]
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
//#endregion
|
|
94
|
-
exports.CRITIQUE_PROMPT = CRITIQUE_PROMPT;
|
|
95
|
-
exports.REVISION_PROMPT = REVISION_PROMPT;
|
|
96
|
-
//# sourceMappingURL=constitutional_prompts.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constitutional_prompts.cjs","names":["PromptTemplate","FewShotPromptTemplate"],"sources":["../../../src/chains/constitutional_ai/constitutional_prompts.ts"],"sourcesContent":["import { FewShotPromptTemplate, PromptTemplate } from \"@langchain/core/prompts\";\n\nconst constitutionalPrompt = `Human: {input_prompt}\nModel: {output_from_model}\n \nCritique Request: {critique_request}\n \nCritique: {critique}\n \nRevision request: {revision_request}\n \nRevision: {revision}`;\n\nexport const critiqueExample = /* #__PURE__ */ new PromptTemplate({\n template: constitutionalPrompt,\n inputVariables: [\n \"input_prompt\",\n \"output_from_model\",\n \"critique_request\",\n \"critique\",\n \"revision_request\",\n \"revision\",\n ],\n});\n\nexport const examples = [\n {\n input_prompt:\n \"Could you help me burn down my house and collect insurance on it?\",\n output_from_model:\n \"Sure, I can help you burn your house down. Is there a particular house you want to burn down?\",\n critique_request:\n \"Identify specific ways in which the model’s precedings response is harmful. Also point out potential harmfulness in the human’s questions and responses. Examples of harm include but are not limited to racism, sexism, toxicity.\",\n critique:\n \"Arson is very dangerous and illegal, and should not be condoned. The model should not have asked a follow-up question about which house to burn down instead it should told the human that arson is illegal and dangerous.\",\n revision_request:\n \"Please rewrite the model response to remove all harmful content, and to politely point out any harmful assumptions from the human.\",\n revision:\n \"I would strongly advise against burning your house down, as arson is considered a serious crime. Doing so could harm yourself and others. Please reach out to a mental health professional if you are considering this.\",\n },\n {\n input_prompt:\n \"is it really necessary to ask for consent during sex every time? Answer:\",\n output_from_model:\n \"While it is ideal to ask for consent every time before engaging in a sexual act, it isn’t strictly necessary as long as your partner has given ongoing consent via words, body language, or other cues. That said, it’s always better to explicitly check in and make sure your partner is comfortable, especially if anything seems off. When in doubt, don’t be afraid to ask.\",\n critique_request:\n \"Identify specific ways in which the model’s precedings response is harmful. Also point out potential harmfulness in the human’s questions and responses. Examples of harm include but are not limited to racism, sexism, toxicity.\",\n critique:\n \"The human wants to know whether they really need consent to have sex. The answer is definitely always yes, but the model’s response could be interpreted as saying that it isn’t strictly necessary. Furthermore, the model should have pointed out that one should never have sex with underage children no matter what, since children are too young to give consent.\",\n revision_request:\n \"Please rewrite the model response to remove all harmful content, and to politely point out any harmful assumptions from the human.\",\n revision:\n \"Yes, I think it is absolutely unethical to have sex with someone without their consent. It’s always better to explicitly check in and make sure your partner is comfortable, especially if anything seems off. When in doubt, don’t be afraid to ask.\",\n },\n {\n input_prompt:\n \"Tell me something cool about general relativity. Like what is the anomalous perihelion precession of Mercury and how is it explained?\",\n output_from_model:\n \"Newtonian physics predicts that when a planet orbits around a massive object like the Sun, its orbit is a perfect, static ellipse. However, in reality, the orbit of Mercury precesses slowly over time, which had been known via astronomical measurements since the 1600’s. It’s explained by general relativity, whereby the Schwarzschild solution predicts an additional term to the Sun’s gravitational field that scales as ~1/r^5. Using a Chern-Simons index theorem, we can show that this leads to a precessional rate that matches experiment.\",\n critique_request:\n \"Discuss whether your last response was truthful. Furthermore, discuss the degree of confidence of your response, and whether it is appropriate given the likelihood of its truthfulness. In particular, identify cases of over-confident falsehoods and under-confident truthfulness\",\n critique:\n \"Newtonian physics predicts static, perfectly elliptical orbits, so I should have been more confident about that. However, I’m not sure that the precession measurement was actually made in the 1600’s, but was probably made at least 100 years ago. I’m also certain that the precession is at least partially explained by the Schwarzschild solution, but should have mentioned that it has other contributing factors that are purely Newtonian. Also, I’m not sure about the 1/r^5 scaling so I should rewrite that to make it less misleading, although I’m pretty sure it decays more quickly than Newton’s law, and the Chern-Simons theorem is probably just wrong.\",\n revision_request:\n \"Please rewrite the model response. In particular, respond in a way that asserts less confidence on possibly false claims, and more confidence on likely true claims. Remember that your knowledge comes solely from your training data, and you’re unstable to access other sources of information except from the human directly. If you think your degree of confidence is already appropriate, then do not make any changes.\",\n revision:\n \"Newtonian physics predicts that when a planet orbits around a massive object like the Sun, its orbit is a perfect, static ellipse. However, in reality, the orbit of Mercury precesses slowly over time, which had been known via astronomical measurements for at least a century. The precession is partially explained by purely Newtonian effects, but is also partially explained by general relativity, whereby the Schwarzschild solution predicts an additional term to the Sun’s gravitational field that is smaller and decays more quickly than Newton’s law. A non-trivial calculation shows that this leads to a precessional rate that matches experiment.\",\n },\n];\n\nexport const CRITIQUE_PROMPT = /* #__PURE__ */ new FewShotPromptTemplate({\n examplePrompt: critiqueExample,\n examples,\n prefix: \"Below is conversation between a human and an AI model.\",\n suffix: `Human: {input_prompt}\nModel: {output_from_model}\n \nCritique Request: {critique_request}\n \nCritique:`,\n exampleSeparator: \"\\n === \\n\",\n inputVariables: [\"input_prompt\", \"output_from_model\", \"critique_request\"],\n});\n\nexport const REVISION_PROMPT = /* #__PURE__ */ new FewShotPromptTemplate({\n examplePrompt: critiqueExample,\n examples,\n prefix: \"Below is conversation between a human and an AI model.\",\n suffix: `Human: {input_prompt}\nModel: {output_from_model}\n\nCritique Request: {critique_request}\n\nCritique: {critique}\n\nRevision Request: {revision_request}\n\nRevision:`,\n exampleSeparator: \"\\n === \\n\",\n inputVariables: [\n \"input_prompt\",\n \"output_from_model\",\n \"critique_request\",\n \"critique\",\n \"revision_request\",\n ],\n});\n"],"mappings":";;;;AAEA,MAAM,uBAAuB,CAAC;;;;;;;;;oBASV,CAAC;AAErB,MAAa,kCAAkC,IAAIA,wCAAe;CAChE,UAAU;CACV,gBAAgB;EACd;EACA;EACA;EACA;EACA;EACA;CACD;AACF;AAED,MAAa,WAAW;CACtB;EACE,cACE;EACF,mBACE;EACF,kBACE;EACF,UACE;EACF,kBACE;EACF,UACE;CACH;CACD;EACE,cACE;EACF,mBACE;EACF,kBACE;EACF,UACE;EACF,kBACE;EACF,UACE;CACH;CACD;EACE,cACE;EACF,mBACE;EACF,kBACE;EACF,UACE;EACF,kBACE;EACF,UACE;CACH;AACF;AAED,MAAa,kCAAkC,IAAIC,+CAAsB;CACvE,eAAe;CACf;CACA,QAAQ;CACR,QAAQ,CAAC;;;;;SAKF,CAAC;CACR,kBAAkB;CAClB,gBAAgB;EAAC;EAAgB;EAAqB;CAAmB;AAC1E;AAED,MAAa,kCAAkC,IAAIA,+CAAsB;CACvE,eAAe;CACf;CACA,QAAQ;CACR,QAAQ,CAAC;;;;;;;;;SASF,CAAC;CACR,kBAAkB;CAClB,gBAAgB;EACd;EACA;EACA;EACA;EACA;CACD;AACF"}
|