@peopl-health/nexus 5.13.0-dev.1177 → 5.13.0-dev.1180
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/lib/index.d.ts +5 -5
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -116,13 +116,13 @@ declare module '@peopl-health/nexus' {
|
|
|
116
116
|
name: string;
|
|
117
117
|
description?: string;
|
|
118
118
|
parameters?: any;
|
|
119
|
-
handler: (args: any) =>
|
|
119
|
+
handler: (args: any) => string | Promise<string>;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
export interface AssistantConfigDefinition {
|
|
123
123
|
extends?: typeof BaseAssistant;
|
|
124
124
|
create?: (this: BaseAssistant, code: string, context?: any) => Promise<any>;
|
|
125
|
-
tools?: Array<AssistantToolDefinition | { name: string; definition?: any; handler: (args: any) =>
|
|
125
|
+
tools?: Array<AssistantToolDefinition | { name: string; definition?: any; handler: (args: any) => string | Promise<string> }>;
|
|
126
126
|
setup?: (this: BaseAssistant, context: { assistantId: string; thread?: any; options?: any }) => void;
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -138,7 +138,7 @@ declare module '@peopl-health/nexus' {
|
|
|
138
138
|
assistantId?: string;
|
|
139
139
|
thread?: any;
|
|
140
140
|
client?: any;
|
|
141
|
-
tools?: Array<AssistantToolDefinition | { name: string; definition?: any; handler: (args: any) =>
|
|
141
|
+
tools?: Array<AssistantToolDefinition | { name: string; definition?: any; handler: (args: any) => string | Promise<string> }>;
|
|
142
142
|
setup?: (context: { assistantId: string; thread?: any; options?: any }) => void;
|
|
143
143
|
status?: string;
|
|
144
144
|
} | any);
|
|
@@ -146,9 +146,9 @@ declare module '@peopl-health/nexus' {
|
|
|
146
146
|
thread: any;
|
|
147
147
|
status: string;
|
|
148
148
|
createdAt: Date;
|
|
149
|
-
registerTool(definition: AssistantToolDefinition | string, schema?: any, handler?: (args: any) =>
|
|
149
|
+
registerTool(definition: AssistantToolDefinition | string, schema?: any, handler?: (args: any) => string | Promise<string>): void;
|
|
150
150
|
getToolSchemas(): any[];
|
|
151
|
-
executeTool(name: string, args: any): Promise<
|
|
151
|
+
executeTool(name: string, args: any): Promise<string>;
|
|
152
152
|
getPreviousMessages(thread?: any): Promise<Array<{ role: string; content: any }>>;
|
|
153
153
|
createThread(code: string, context?: any): Promise<any>;
|
|
154
154
|
sendMessage(userId: string, message: string, options?: any): Promise<any>;
|