@economic/agents-react 1.1.7 → 1.1.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.mts +6 -6
- package/dist/index.mjs +6 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -221,7 +221,7 @@ type ChatSummary = {
|
|
|
221
221
|
created_at: number;
|
|
222
222
|
updated_at: number;
|
|
223
223
|
};
|
|
224
|
-
type
|
|
224
|
+
type MessageFeedback = {
|
|
225
225
|
message_id: string;
|
|
226
226
|
rating: number;
|
|
227
227
|
comment?: string;
|
|
@@ -297,8 +297,8 @@ declare function useChat<ToolContext extends Record<string, unknown>>(options: U
|
|
|
297
297
|
isStreaming: boolean;
|
|
298
298
|
isToolContinuation: boolean;
|
|
299
299
|
};
|
|
300
|
-
|
|
301
|
-
|
|
300
|
+
submitMessageFeedback: (messageId: string, rating: number, comment?: string) => Promise<unknown>;
|
|
301
|
+
getMessageFeedback: () => Promise<Record<string, MessageFeedback>>;
|
|
302
302
|
};
|
|
303
303
|
//#endregion
|
|
304
304
|
//#region src/useAssistant.d.ts
|
|
@@ -342,9 +342,9 @@ declare function useAssistant<ToolContext extends Record<string, unknown>>(optio
|
|
|
342
342
|
isStreaming: boolean;
|
|
343
343
|
isToolContinuation: boolean;
|
|
344
344
|
};
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
submitMessageFeedback: (messageId: string, rating: number, comment?: string) => Promise<unknown>;
|
|
346
|
+
getMessageFeedback: () => Promise<Record<string, MessageFeedback>>;
|
|
347
347
|
};
|
|
348
348
|
};
|
|
349
349
|
//#endregion
|
|
350
|
-
export { type AgentConnectionState, type AgentConnectionStatus, type AgentConnectionType, type ChatSummary, type
|
|
350
|
+
export { type AgentConnectionState, type AgentConnectionStatus, type AgentConnectionType, type ChatSummary, type MessageFeedback, useAgent, useAssistant, useChat };
|
package/dist/index.mjs
CHANGED
|
@@ -57,22 +57,22 @@ function useChat(options) {
|
|
|
57
57
|
chat.messages.length,
|
|
58
58
|
welcomeMessage
|
|
59
59
|
]);
|
|
60
|
-
async function
|
|
61
|
-
return agent.call("
|
|
60
|
+
async function submitMessageFeedback(messageId, rating, comment) {
|
|
61
|
+
return agent.call("submitMessageFeedback", [
|
|
62
62
|
messageId,
|
|
63
63
|
rating,
|
|
64
64
|
comment
|
|
65
65
|
]);
|
|
66
66
|
}
|
|
67
|
-
async function
|
|
68
|
-
return await agent.call("
|
|
67
|
+
async function getMessageFeedback() {
|
|
68
|
+
return await agent.call("getMessageFeedback");
|
|
69
69
|
}
|
|
70
70
|
return {
|
|
71
71
|
status,
|
|
72
72
|
agent,
|
|
73
73
|
chat,
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
submitMessageFeedback,
|
|
75
|
+
getMessageFeedback
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
//#endregion
|