langchain 0.2.19 → 0.2.20
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.
|
@@ -102,7 +102,7 @@ class PlanAndExecuteAgentExecutor extends base_js_1.BaseChain {
|
|
|
102
102
|
*/
|
|
103
103
|
static getDefaultStepExecutor({ llm, tools, humanMessageTemplate = prompt_js_1.DEFAULT_STEP_EXECUTOR_HUMAN_CHAT_MESSAGE_TEMPLATE, }) {
|
|
104
104
|
let agent;
|
|
105
|
-
if (isDynamicStructuredTool(tools[0])) {
|
|
105
|
+
if (tools.length > 0 && isDynamicStructuredTool(tools[0])) {
|
|
106
106
|
agent = index_js_2.StructuredChatAgent.fromLLMAndTools(llm, tools, {
|
|
107
107
|
humanMessageTemplate,
|
|
108
108
|
inputVariables: ["previous_steps", "current_step", "agent_scratchpad"],
|
|
@@ -98,7 +98,7 @@ export class PlanAndExecuteAgentExecutor extends BaseChain {
|
|
|
98
98
|
*/
|
|
99
99
|
static getDefaultStepExecutor({ llm, tools, humanMessageTemplate = DEFAULT_STEP_EXECUTOR_HUMAN_CHAT_MESSAGE_TEMPLATE, }) {
|
|
100
100
|
let agent;
|
|
101
|
-
if (isDynamicStructuredTool(tools[0])) {
|
|
101
|
+
if (tools.length > 0 && isDynamicStructuredTool(tools[0])) {
|
|
102
102
|
agent = StructuredChatAgent.fromLLMAndTools(llm, tools, {
|
|
103
103
|
humanMessageTemplate,
|
|
104
104
|
inputVariables: ["previous_steps", "current_step", "agent_scratchpad"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langchain",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.20",
|
|
4
4
|
"description": "Typescript bindings for langchain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -699,7 +699,6 @@
|
|
|
699
699
|
"@langchain/anthropic": "*",
|
|
700
700
|
"@langchain/aws": "*",
|
|
701
701
|
"@langchain/cohere": "*",
|
|
702
|
-
"@langchain/community": "*",
|
|
703
702
|
"@langchain/google-genai": "*",
|
|
704
703
|
"@langchain/google-vertexai": "*",
|
|
705
704
|
"@langchain/groq": "*",
|
|
@@ -783,9 +782,6 @@
|
|
|
783
782
|
"@langchain/cohere": {
|
|
784
783
|
"optional": true
|
|
785
784
|
},
|
|
786
|
-
"@langchain/community": {
|
|
787
|
-
"optional": true
|
|
788
|
-
},
|
|
789
785
|
"@langchain/google-genai": {
|
|
790
786
|
"optional": true
|
|
791
787
|
},
|
|
@@ -933,7 +929,7 @@
|
|
|
933
929
|
"js-tiktoken": "^1.0.12",
|
|
934
930
|
"js-yaml": "^4.1.0",
|
|
935
931
|
"jsonpointer": "^5.0.1",
|
|
936
|
-
"langsmith": "
|
|
932
|
+
"langsmith": "^0.1.56-rc.1",
|
|
937
933
|
"openapi-types": "^12.1.3",
|
|
938
934
|
"p-retry": "4",
|
|
939
935
|
"uuid": "^10.0.0",
|