Skip to content

Commit 90e31c0

Browse files
v2.17.0
1 parent bba3cb7 commit 90e31c0

File tree

14 files changed

+627
-43
lines changed

14 files changed

+627
-43
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Check out our [API Reference](https://quickblox.github.io/quickblox-javascript-s
1616
## Dependencies for browser
1717

1818
```html
19-
<script src="https://unpkg.com/quickblox@2.16.4/quickblox.min.js"></script>
19+
<script src="https://unpkg.com/quickblox@2.17.0/quickblox.min.js"></script>
2020
```
2121

2222
## Bower and RequireJS

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "quickblox",
33
"description": "QuickBlox JavaScript SDK",
4-
"version": "2.16.4",
4+
"version": "2.17.0",
55
"homepage": "https://quickblox.com/developers/Javascript",
66
"main": "src/qbMain.js",
77
"types": "quickblox.d.ts",

quickblox.d.ts

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

417446
interface 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

755785
export 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

Comments
 (0)