@butlerbot/sdk 0.0.3 → 0.0.4
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/types/ai_response_v3.d.ts +30 -4
- package/package.json +43 -43
- package/readme.md +2 -0
|
@@ -10,15 +10,21 @@ export type AIChatResultSuccess = {
|
|
|
10
10
|
usage: any;
|
|
11
11
|
};
|
|
12
12
|
export type AIChatResult = AIChatResultFail | AIChatResultSuccess;
|
|
13
|
+
type AIChatProfileDisplayEntity = {
|
|
14
|
+
name?: string;
|
|
15
|
+
avatarUrl?: string;
|
|
16
|
+
};
|
|
13
17
|
export type BaseAIResponseMetadata = {
|
|
14
18
|
/** The model that generated this message */
|
|
15
19
|
model: string;
|
|
16
20
|
/** The actual model ID that generated this message */
|
|
17
21
|
modelId: string;
|
|
18
|
-
/**
|
|
22
|
+
/** The time when this action started (represents time of first action, meaning in streamed messages it'll hold the time the first chunk was sent) */
|
|
23
|
+
firstTimestamp: number;
|
|
24
|
+
/** Epoch time for when this happened (represents time of last action, meaning in streamed messages it'll hold the time the last chunk was sent) */
|
|
19
25
|
timestamp: number;
|
|
20
26
|
};
|
|
21
|
-
|
|
27
|
+
type AIMessageResponse = {
|
|
22
28
|
/** Specifies type to be a message */
|
|
23
29
|
type: "message";
|
|
24
30
|
payload: {
|
|
@@ -29,7 +35,26 @@ export type AIMessageResponse = {
|
|
|
29
35
|
/** Whether this message was completed */
|
|
30
36
|
completed: boolean;
|
|
31
37
|
};
|
|
32
|
-
metadata: BaseAIResponseMetadata & {
|
|
38
|
+
metadata: BaseAIResponseMetadata & {
|
|
39
|
+
/** Display data for this message response, such as the author's name and profile picture */
|
|
40
|
+
display?: AIChatProfileDisplayEntity;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export type AIFileResponse = {
|
|
44
|
+
/** Specifies type to be a message */
|
|
45
|
+
type: "file";
|
|
46
|
+
payload: {
|
|
47
|
+
/** URL location of the file */
|
|
48
|
+
url?: string;
|
|
49
|
+
/** Base64 representation of the file */
|
|
50
|
+
base64?: string;
|
|
51
|
+
/** The media type of the file */
|
|
52
|
+
mediaType: string;
|
|
53
|
+
};
|
|
54
|
+
metadata: BaseAIResponseMetadata & {
|
|
55
|
+
/** Display data for this message response, such as the author's name and profile picture */
|
|
56
|
+
display?: AIChatProfileDisplayEntity;
|
|
57
|
+
};
|
|
33
58
|
};
|
|
34
59
|
export type AIResponseStatusResponse = {
|
|
35
60
|
/** Specifies type to be a status update for the response */
|
|
@@ -59,4 +84,5 @@ export type AIToolResponse = {
|
|
|
59
84
|
};
|
|
60
85
|
metadata: BaseAIResponseMetadata & {};
|
|
61
86
|
};
|
|
62
|
-
export type AIResponse = AIMessageResponse | AIToolResponse | AIConvoStatusResponse | AIResponseStatusResponse;
|
|
87
|
+
export type AIResponse = AIMessageResponse | AIToolResponse | AIConvoStatusResponse | AIResponseStatusResponse | AIFileResponse;
|
|
88
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
2
|
+
"name": "@butlerbot/sdk",
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"description": "The official ButlerBot SDK",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/**/*"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"pack": "npm run build && npm pack --pack-destination=\"G:\\tarballs\"",
|
|
13
|
+
"update": "npm run build && npm publish --access public",
|
|
14
|
+
"test": "jest"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"butlerbot",
|
|
18
|
+
"alfred",
|
|
19
|
+
"sdk",
|
|
20
|
+
"chatbot",
|
|
21
|
+
"ai",
|
|
22
|
+
"butler"
|
|
23
|
+
],
|
|
24
|
+
"author": "Fragly",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/isdevco/alfred5_sdk.git"
|
|
29
|
+
},
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/isdevco/alfred5_sdk/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://butlerbot.net",
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=14.0.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^22.13.10",
|
|
39
|
+
"typescript": "^5.8.2"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"eventsource": "^3.0.5"
|
|
43
|
+
}
|
|
44
|
+
}
|