listpage-next-ai 0.0.267 → 0.0.268
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/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +4 -4
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -436,12 +436,12 @@ function createWordTools(options) {
|
|
|
436
436
|
];
|
|
437
437
|
}
|
|
438
438
|
function createReactAgent(options) {
|
|
439
|
-
const { name, model, system_prompt, tools = [], middleware = [], features, databaseOptions, knowledgeOptions, wordOptions, inject_current_time, max_iterations = 0 } = options;
|
|
439
|
+
const { name, model, system_prompt, tools = [], middleware = [], features, databaseOptions, knowledgeOptions, wordOptions, inject_current_time, max_iterations = 0, simple = false } = options;
|
|
440
440
|
const agent = (0, external_langchain_namespaceObject.createAgent)({
|
|
441
441
|
name,
|
|
442
442
|
model,
|
|
443
443
|
systemPrompt: system_prompt,
|
|
444
|
-
tools: [
|
|
444
|
+
tools: simple ? [] : [
|
|
445
445
|
...features.database ? createDatabaseTools(databaseOptions) : [],
|
|
446
446
|
...features.knowledge ? createKnowledgeTools(knowledgeOptions) : [],
|
|
447
447
|
...features.word ? createWordTools(wordOptions) : [],
|
|
@@ -452,7 +452,7 @@ function createReactAgent(options) {
|
|
|
452
452
|
max_iterations > 0 && maxIterationsMiddleware({
|
|
453
453
|
maxIterations: max_iterations
|
|
454
454
|
}),
|
|
455
|
-
(0, external_langchain_namespaceObject.todoListMiddleware)({
|
|
455
|
+
!simple && (0, external_langchain_namespaceObject.todoListMiddleware)({
|
|
456
456
|
systemPrompt: TODO_LIST_MIDDLEWARE_SYSTEM_PROMPT
|
|
457
457
|
}),
|
|
458
458
|
(0, external_langchain_namespaceObject.summarizationMiddleware)({
|
|
@@ -464,7 +464,7 @@ function createReactAgent(options) {
|
|
|
464
464
|
messages: 6
|
|
465
465
|
}
|
|
466
466
|
}),
|
|
467
|
-
createPatchToolCallsMiddleware(),
|
|
467
|
+
!simple && createPatchToolCallsMiddleware(),
|
|
468
468
|
...middleware
|
|
469
469
|
].filter(Boolean)
|
|
470
470
|
});
|