@@ -413,6 +413,35 @@ export declare type GetMessagesResult = {
413413 limit : number
414414 skip : number
415415}
416+ export class AIRole {
417+ public static readonly user = "user" ;
418+ public static readonly assistant = "assistant"
419+ }
420+
421+ export interface AIChatMessage {
422+ role : AIRole ;
423+ message : string ;
424+ }
425+
426+ export interface AIAnswerResponse {
427+ answer : string ;
428+ }
429+
430+ export declare type AIChatHistory = AIChatMessage [ ] | null | undefined ;
431+
432+ interface QBAIModule {
433+ //QB.ai.answerAssist
434+ answerAssist ( smartChatAssistantId : string ,
435+ message : string ,
436+ history :AIChatHistory ,
437+ callback : QBCallback < AIAnswerResponse > ) : void
438+ //QB.ai.translate
439+ translate ( smartChatAssistantId : string ,
440+ message : string ,
441+ languageCode : string ,
442+ callback : QBCallback < AIAnswerResponse > ) : void
443+
444+ }
416445
417446interface QBChatModule {
418447 isConnected : boolean
@@ -549,7 +578,7 @@ interface QBChatModule {
549578 /** Send is delivered status. */
550579 sendDeliveredStatus ( params : QBMessageStatusParams ) : void
551580 ping ( jidOrUserId : string | number , callback : QBCallback < any > ) : string
552- ping ( callback : QBCallback < any > ) : string
581+ pingchat ( callback : QBCallback < any > ) : string
553582
554583 dialog : {
555584 /**
@@ -750,6 +779,7 @@ interface QBChatModule {
750779 /** Get user jid from current user. */
751780 getUserCurrentJid ( ) : string
752781 }
782+
753783}
754784
755785export declare interface QBDataFile {
@@ -1518,6 +1548,8 @@ export class QuickBlox {
15181548
15191549 chat : QBChatModule
15201550
1551+ ai : QBAIModule
1552+
15211553 content : QBContentModule
15221554
15231555 data : QBDataModule
0 commit comments