This commit is contained in:
Eugene 2025-03-05 16:04:32 +00:00 committed by GitHub
commit 44b04edcba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -48,7 +48,11 @@ export const ChatPlugin: Plugin<ChatOptions> = {
options,
);
let textMessage = sendMessageResponse.output ?? sendMessageResponse.text ?? '';
let textMessage =
sendMessageResponse.output ??
sendMessageResponse.text ??
sendMessageResponse.response?.text ?? // For QA chains
'';
if (textMessage === '' && Object.keys(sendMessageResponse).length > 0) {
try {

View file

@ -15,4 +15,7 @@ export interface LoadPreviousSessionResponse {
export interface SendMessageResponse {
output?: string;
text?: string;
response?: {
text?: string;
};
}