@tuturuuu/ai 0.0.12 → 0.2.0
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/package.json +20 -19
- package/src/chat-sdk/registry.ts +19 -1
- package/src/chat-sdk/zalo-personal.ts +2298 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuturuuu/ai",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/tutur3u/platform",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"type-check": "tsgo --project tsconfig.typecheck.json"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@ai-sdk/amazon-bedrock": "^4.0.
|
|
25
|
+
"@ai-sdk/amazon-bedrock": "^4.0.113",
|
|
26
26
|
"@ai-sdk/anthropic": "^3.0.81",
|
|
27
|
-
"@ai-sdk/azure": "^3.0.
|
|
27
|
+
"@ai-sdk/azure": "^3.0.70",
|
|
28
28
|
"@ai-sdk/cerebras": "^2.0.53",
|
|
29
29
|
"@ai-sdk/cohere": "^3.0.36",
|
|
30
30
|
"@ai-sdk/deepgram": "^2.0.33",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"@ai-sdk/elevenlabs": "^2.0.33",
|
|
34
34
|
"@ai-sdk/fal": "^2.0.34",
|
|
35
35
|
"@ai-sdk/fireworks": "^2.0.52",
|
|
36
|
-
"@ai-sdk/gateway": "^3.0.
|
|
36
|
+
"@ai-sdk/gateway": "^3.0.125",
|
|
37
37
|
"@ai-sdk/gladia": "^2.0.33",
|
|
38
38
|
"@ai-sdk/google": "^3.0.80",
|
|
39
|
-
"@ai-sdk/google-vertex": "^4.0.
|
|
39
|
+
"@ai-sdk/google-vertex": "^4.0.142",
|
|
40
40
|
"@ai-sdk/groq": "^3.0.39",
|
|
41
41
|
"@ai-sdk/hume": "^2.0.33",
|
|
42
42
|
"@ai-sdk/lmnt": "^2.0.33",
|
|
43
43
|
"@ai-sdk/luma": "^2.0.33",
|
|
44
44
|
"@ai-sdk/mistral": "^3.0.37",
|
|
45
|
-
"@ai-sdk/openai": "^3.0.
|
|
45
|
+
"@ai-sdk/openai": "^3.0.68",
|
|
46
46
|
"@ai-sdk/openai-compatible": "^2.0.47",
|
|
47
47
|
"@ai-sdk/perplexity": "^3.0.33",
|
|
48
|
-
"@ai-sdk/react": "^3.0.
|
|
48
|
+
"@ai-sdk/react": "^3.0.199",
|
|
49
49
|
"@ai-sdk/replicate": "^2.0.33",
|
|
50
50
|
"@ai-sdk/revai": "^2.0.33",
|
|
51
51
|
"@ai-sdk/togetherai": "^2.0.52",
|
|
@@ -68,23 +68,23 @@
|
|
|
68
68
|
"@chat-adapter/whatsapp": "^4.30.0",
|
|
69
69
|
"@json-render/core": "^0.19.0",
|
|
70
70
|
"@json-render/react": "^0.19.0",
|
|
71
|
-
"@liveblocks/chat-sdk-adapter": "^3.19.
|
|
71
|
+
"@liveblocks/chat-sdk-adapter": "^3.19.4",
|
|
72
72
|
"@octokit/rest": "^22.0.1",
|
|
73
73
|
"@resend/chat-sdk-adapter": "^0.2.2",
|
|
74
74
|
"@streamdown/cjk": "^1.0.3",
|
|
75
75
|
"@streamdown/code": "^1.1.1",
|
|
76
76
|
"@streamdown/math": "^1.0.2",
|
|
77
77
|
"@streamdown/mermaid": "^1.0.2",
|
|
78
|
-
"@tuturuuu/google": "
|
|
79
|
-
"@tuturuuu/internal-api": "
|
|
80
|
-
"@tuturuuu/supabase": "
|
|
81
|
-
"@tuturuuu/utils": "
|
|
82
|
-
"@vercel/sandbox": "^2.1.
|
|
78
|
+
"@tuturuuu/google": "0.0.1",
|
|
79
|
+
"@tuturuuu/internal-api": "0.4.0",
|
|
80
|
+
"@tuturuuu/supabase": "0.3.3",
|
|
81
|
+
"@tuturuuu/utils": "0.5.0",
|
|
82
|
+
"@vercel/sandbox": "^2.1.1",
|
|
83
83
|
"@zernio/chat-sdk-adapter": "^0.3.0",
|
|
84
|
-
"ai": "^6.0.
|
|
84
|
+
"ai": "^6.0.197",
|
|
85
85
|
"bash-tool": "^1.3.17",
|
|
86
86
|
"chat": "^4.30.0",
|
|
87
|
-
"chat-adapter-baileys": "^2.0.
|
|
87
|
+
"chat-adapter-baileys": "^2.0.3",
|
|
88
88
|
"chat-adapter-blooio": "^0.1.0",
|
|
89
89
|
"chat-adapter-imessage": "^0.1.1",
|
|
90
90
|
"chat-adapter-mattermost": "^1.1.3",
|
|
@@ -99,14 +99,15 @@
|
|
|
99
99
|
"react-dom": "^19.2.7",
|
|
100
100
|
"streamdown": "^2.5.0",
|
|
101
101
|
"uuid": "^14.0.0",
|
|
102
|
+
"zca-js": "^2.1.2",
|
|
102
103
|
"zod": "^4.4.3"
|
|
103
104
|
},
|
|
104
105
|
"devDependencies": {
|
|
105
|
-
"@tuturuuu/types": "
|
|
106
|
-
"@tuturuuu/typescript-config": "
|
|
107
|
-
"@types/node": "^25.9.
|
|
106
|
+
"@tuturuuu/types": "0.6.0",
|
|
107
|
+
"@tuturuuu/typescript-config": "0.1.1",
|
|
108
|
+
"@types/node": "^25.9.2",
|
|
108
109
|
"@types/qrcode": "^1.5.6",
|
|
109
|
-
"@types/react": "^19.2.
|
|
110
|
+
"@types/react": "^19.2.17",
|
|
110
111
|
"typescript": "^6.0.3"
|
|
111
112
|
},
|
|
112
113
|
"exports": {
|
package/src/chat-sdk/registry.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
export type ChatSdkPlatformAdapterFactory = (config?: unknown) => Adapter;
|
|
13
13
|
export type ChatSdkStateAdapterFactory = (config?: unknown) => StateAdapter;
|
|
14
14
|
export type ChatSdkAdapterModule = Record<string, unknown>;
|
|
15
|
+
type ChatSdkPackageLoader = () => Promise<ChatSdkAdapterModule>;
|
|
15
16
|
|
|
16
17
|
export type ChatSdkPlatformAdapterInput =
|
|
17
18
|
| Adapter
|
|
@@ -37,6 +38,21 @@ export interface CreateChatSdkRuntimeOptions
|
|
|
37
38
|
state: ChatSdkStateAdapterInput;
|
|
38
39
|
}
|
|
39
40
|
|
|
41
|
+
const CHAT_SDK_PACKAGE_LOADERS: Record<string, ChatSdkPackageLoader> = {
|
|
42
|
+
'@chat-adapter/state-ioredis': async () =>
|
|
43
|
+
(await import('@chat-adapter/state-ioredis')) as ChatSdkAdapterModule,
|
|
44
|
+
'@chat-adapter/state-memory': async () =>
|
|
45
|
+
(await import('@chat-adapter/state-memory')) as ChatSdkAdapterModule,
|
|
46
|
+
'@chat-adapter/state-pg': async () =>
|
|
47
|
+
(await import('@chat-adapter/state-pg')) as ChatSdkAdapterModule,
|
|
48
|
+
'@chat-adapter/state-redis': async () =>
|
|
49
|
+
(await import('@chat-adapter/state-redis')) as ChatSdkAdapterModule,
|
|
50
|
+
'chat-state-cloudflare-do': async () =>
|
|
51
|
+
(await import('chat-state-cloudflare-do')) as ChatSdkAdapterModule,
|
|
52
|
+
'chat-state-mysql': async () =>
|
|
53
|
+
(await import('chat-state-mysql')) as ChatSdkAdapterModule,
|
|
54
|
+
};
|
|
55
|
+
|
|
40
56
|
async function loadChatSdkFactory(
|
|
41
57
|
packageName: string,
|
|
42
58
|
factoryExport: string
|
|
@@ -44,7 +60,9 @@ async function loadChatSdkFactory(
|
|
|
44
60
|
let adapterModule: ChatSdkAdapterModule;
|
|
45
61
|
|
|
46
62
|
try {
|
|
47
|
-
adapterModule =
|
|
63
|
+
adapterModule = CHAT_SDK_PACKAGE_LOADERS[packageName]
|
|
64
|
+
? await CHAT_SDK_PACKAGE_LOADERS[packageName]()
|
|
65
|
+
: ((await import(packageName)) as ChatSdkAdapterModule);
|
|
48
66
|
} catch (error) {
|
|
49
67
|
const message = error instanceof Error ? error.message : String(error);
|
|
50
68
|
|