Skip to content

Commit

Permalink
v2.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem-K-Koltunov committed May 20, 2024
1 parent bba3cb7 commit 90e31c0
Show file tree
Hide file tree
Showing 14 changed files with 627 additions and 43 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Check out our [API Reference](https://quickblox.github.io/quickblox-javascript-s
## Dependencies for browser

```html
<script src="https://unpkg.com/quickblox@2.16.4/quickblox.min.js"></script>
<script src="https://unpkg.com/quickblox@2.17.0/quickblox.min.js"></script>
```

## Bower and RequireJS
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "quickblox",
"description": "QuickBlox JavaScript SDK",
"version": "2.16.4",
"version": "2.17.0",
"homepage": "https://quickblox.com/developers/Javascript",
"main": "src/qbMain.js",
"types": "quickblox.d.ts",
Expand Down
34 changes: 33 additions & 1 deletion quickblox.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,35 @@ export declare type GetMessagesResult = {
limit: number
skip: number
}
export class AIRole {
public static readonly user = "user";
public static readonly assistant = "assistant"
}

export interface AIChatMessage {
role: AIRole;
message: string;
}

export interface AIAnswerResponse {
answer: string;
}

export declare type AIChatHistory = AIChatMessage[] | null | undefined;

interface QBAIModule{
//QB.ai.answerAssist
answerAssist(smartChatAssistantId: string,
message: string,
history :AIChatHistory,
callback: QBCallback<AIAnswerResponse>): void
//QB.ai.translate
translate(smartChatAssistantId: string,
message: string,
languageCode: string,
callback: QBCallback<AIAnswerResponse>): void

}

interface QBChatModule {
isConnected: boolean
Expand Down Expand Up @@ -549,7 +578,7 @@ interface QBChatModule {
/** Send is delivered status. */
sendDeliveredStatus(params: QBMessageStatusParams): void
ping(jidOrUserId: string | number, callback: QBCallback<any>): string
ping(callback: QBCallback<any>): string
pingchat(callback: QBCallback<any>): string

dialog: {
/**
Expand Down Expand Up @@ -750,6 +779,7 @@ interface QBChatModule {
/** Get user jid from current user. */
getUserCurrentJid(): string
}

}

export declare interface QBDataFile {
Expand Down Expand Up @@ -1518,6 +1548,8 @@ export class QuickBlox {

chat: QBChatModule

ai: QBAIModule

content: QBContentModule

data: QBDataModule
Expand Down
Loading

0 comments on commit 90e31c0

Please sign in to comment.