aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/tools/CreateCollectionTool.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/chatbot/tools/CreateCollectionTool.ts')
-rw-r--r--src/client/views/nodes/chatbot/tools/CreateCollectionTool.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/chatbot/tools/CreateCollectionTool.ts b/src/client/views/nodes/chatbot/tools/CreateCollectionTool.ts
index 1e479a62c..fb0d9ca4c 100644
--- a/src/client/views/nodes/chatbot/tools/CreateCollectionTool.ts
+++ b/src/client/views/nodes/chatbot/tools/CreateCollectionTool.ts
@@ -3,6 +3,7 @@ import { DocServer } from '../../../../DocServer';
import { Docs } from '../../../../documents/Documents';
import { DocumentView } from '../../DocumentView';
import { OpenWhere } from '../../OpenWhere';
+import { Observation } from '../types/types';
import { BaseTool } from './BaseTool';
export class GetDocsContentTool extends BaseTool<{ title: string; document_ids: string[] }> {
@@ -25,7 +26,7 @@ export class GetDocsContentTool extends BaseTool<{ title: string; document_ids:
this._docView = docView;
}
- async execute(args: { title: string; document_ids: string[] }): Promise<unknown> {
+ async execute(args: { title: string; document_ids: string[] }): Promise<Observation[]> {
// Note: Using eval() can be dangerous. Consider using a safer alternative.
const docs = args.document_ids.map(doc_id => DocCast(DocServer.GetCachedRefField(doc_id)));
const collection = Docs.Create.FreeformDocument(docs, { title: args.title });