cogito-client 1.0.6 → 1.0.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/index.d.ts +13 -12
- package/dist/index.js +1413 -1406
- package/dist/index.umd.cjs +6 -6
- package/package.json +6 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export declare type ChatMode = 'text' | 'voice';
|
|
|
2
2
|
|
|
3
3
|
export declare interface CogitoAgent {
|
|
4
4
|
id: string;
|
|
5
|
-
greeting?:
|
|
5
|
+
greeting?: CogitoMessage[];
|
|
6
6
|
prompt: string;
|
|
7
7
|
tools?: {
|
|
8
8
|
[k: string]: CogitoTool;
|
|
@@ -12,9 +12,9 @@ export declare interface CogitoAgent {
|
|
|
12
12
|
|
|
13
13
|
export declare interface CogitoAssistantMessage {
|
|
14
14
|
role: "assistant";
|
|
15
|
-
id
|
|
16
|
-
date
|
|
17
|
-
content
|
|
15
|
+
id?: string;
|
|
16
|
+
date?: string;
|
|
17
|
+
content: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export declare interface CogitoConfig {
|
|
@@ -105,8 +105,8 @@ export declare interface CogitoSurfaceDefinition {
|
|
|
105
105
|
|
|
106
106
|
export declare interface CogitoSurfaceMessage {
|
|
107
107
|
role: "surface";
|
|
108
|
-
id
|
|
109
|
-
date
|
|
108
|
+
id?: string;
|
|
109
|
+
date?: string;
|
|
110
110
|
/**
|
|
111
111
|
* The type of surface that will be rendered
|
|
112
112
|
*/
|
|
@@ -155,8 +155,8 @@ export declare interface CogitoSurfaceUpdatePayload {
|
|
|
155
155
|
|
|
156
156
|
export declare interface CogitoSystemMessage {
|
|
157
157
|
role: "system";
|
|
158
|
-
id
|
|
159
|
-
date
|
|
158
|
+
id?: string;
|
|
159
|
+
date?: string;
|
|
160
160
|
content: string;
|
|
161
161
|
}
|
|
162
162
|
|
|
@@ -164,8 +164,8 @@ export declare type CogitoTool = CogitoFunctionTool | CogitoHandoffTool;
|
|
|
164
164
|
|
|
165
165
|
export declare interface CogitoToolMessage {
|
|
166
166
|
role: "tool";
|
|
167
|
-
id
|
|
168
|
-
date
|
|
167
|
+
id?: string;
|
|
168
|
+
date?: string;
|
|
169
169
|
callId: string;
|
|
170
170
|
name: string;
|
|
171
171
|
arguments: {
|
|
@@ -177,8 +177,8 @@ export declare interface CogitoToolMessage {
|
|
|
177
177
|
|
|
178
178
|
export declare interface CogitoUserMessage {
|
|
179
179
|
role: "user";
|
|
180
|
-
id
|
|
181
|
-
date
|
|
180
|
+
id?: string;
|
|
181
|
+
date?: string;
|
|
182
182
|
content: string;
|
|
183
183
|
}
|
|
184
184
|
|
|
@@ -191,6 +191,7 @@ export declare function useCogito({ mode, server, configuration }: UseCogitoOpti
|
|
|
191
191
|
mode: ChatMode;
|
|
192
192
|
connect: () => Promise<void>;
|
|
193
193
|
disconnect: () => void;
|
|
194
|
+
newChat: () => void;
|
|
194
195
|
sendMessage: (message: CogitoMessage) => Promise<void>;
|
|
195
196
|
clearMessages: () => void;
|
|
196
197
|
surfaceAction: (msg: CogitoSurfaceMessage, payload: Record<string, any>) => Promise<void>;
|