ai-client-sdk 3.0.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/LICENSE +201 -0
- package/README.md +91 -0
- package/dist/ai-client-sdk.mjs +42193 -0
- package/dist/ai-client-sdk.umd.js +328 -0
- package/dist/index.d.ts +33 -0
- package/dist/utils/agent.d.ts +168 -0
- package/dist/utils/time.d.ts +16 -0
- package/dist/utils/tools.d.ts +39 -0
- package/dist/view/dom.d.ts +55 -0
- package/dist/view/event.d.ts +30 -0
- package/dist/view/index.d.ts +16 -0
- package/dist/view/template.d.ts +17 -0
- package/package.json +94 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Hughe5
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export { tools } from './utils/tools';
|
|
17
|
+
export { Agent, type Message, type StreamResult, type AssistantMessage } from './utils/agent';
|
|
18
|
+
interface Config {
|
|
19
|
+
container: HTMLElement | null;
|
|
20
|
+
}
|
|
21
|
+
export declare class AIChatPanel {
|
|
22
|
+
on: <T extends "send" | "create">(type: T, listener: (...args: {
|
|
23
|
+
send: [message: import(".").Message];
|
|
24
|
+
create: [];
|
|
25
|
+
}[T]) => void | Promise<void>) => void;
|
|
26
|
+
pushMessage: (message: import(".").Message | undefined) => void;
|
|
27
|
+
pushMessages: (messages: import(".").Message[]) => void;
|
|
28
|
+
pushLoadingMessage: () => void;
|
|
29
|
+
updateLoadingMessageReasoningContent: (content: string) => void;
|
|
30
|
+
updateLoadingMessageContent: (content: string) => void;
|
|
31
|
+
finishLoadingMessage: () => void;
|
|
32
|
+
constructor(config: Config);
|
|
33
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Hughe5
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import Ajv from 'ajv';
|
|
17
|
+
declare function abort(): void;
|
|
18
|
+
interface StringParameter {
|
|
19
|
+
type: 'string';
|
|
20
|
+
description?: string;
|
|
21
|
+
enum?: string[];
|
|
22
|
+
pattern?: string;
|
|
23
|
+
format?: string;
|
|
24
|
+
default?: string;
|
|
25
|
+
minLength?: number;
|
|
26
|
+
maxLength?: number;
|
|
27
|
+
}
|
|
28
|
+
interface NumberParameter {
|
|
29
|
+
type: 'number' | 'integer';
|
|
30
|
+
description?: string;
|
|
31
|
+
enum?: number[];
|
|
32
|
+
minimum?: number;
|
|
33
|
+
maximum?: number;
|
|
34
|
+
default?: number;
|
|
35
|
+
exclusiveMinimum?: number;
|
|
36
|
+
exclusiveMaximum?: number;
|
|
37
|
+
multipleOf?: number;
|
|
38
|
+
}
|
|
39
|
+
interface BooleanParameter {
|
|
40
|
+
type: 'boolean';
|
|
41
|
+
description?: string;
|
|
42
|
+
default?: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface ArrayParameter {
|
|
45
|
+
type: 'array';
|
|
46
|
+
description?: string;
|
|
47
|
+
items: Parameters;
|
|
48
|
+
minItems?: number;
|
|
49
|
+
maxItems?: number;
|
|
50
|
+
uniqueItems?: boolean;
|
|
51
|
+
default?: unknown[];
|
|
52
|
+
}
|
|
53
|
+
interface ObjectParameter {
|
|
54
|
+
type: 'object';
|
|
55
|
+
description?: string;
|
|
56
|
+
properties: Record<string, Parameters>;
|
|
57
|
+
required?: string[];
|
|
58
|
+
default?: Record<string, unknown>;
|
|
59
|
+
additionalProperties?: boolean;
|
|
60
|
+
}
|
|
61
|
+
type Parameters = StringParameter | NumberParameter | BooleanParameter | ArrayParameter | ObjectParameter;
|
|
62
|
+
type DefinitionType = 'function';
|
|
63
|
+
interface Definition {
|
|
64
|
+
type: DefinitionType;
|
|
65
|
+
function: {
|
|
66
|
+
name: string;
|
|
67
|
+
description: string;
|
|
68
|
+
parameters: Extract<Parameters, {
|
|
69
|
+
type: 'object';
|
|
70
|
+
}>;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
type ParamType<T extends Parameters> = T extends {
|
|
74
|
+
type: 'string';
|
|
75
|
+
} ? string : T extends {
|
|
76
|
+
type: 'number' | 'integer';
|
|
77
|
+
} ? number : T extends {
|
|
78
|
+
type: 'boolean';
|
|
79
|
+
} ? boolean : T extends {
|
|
80
|
+
type: 'array';
|
|
81
|
+
items: infer I;
|
|
82
|
+
} ? I extends Parameters ? ParamType<I>[] : never : T extends {
|
|
83
|
+
type: 'object';
|
|
84
|
+
properties: infer P;
|
|
85
|
+
required?: infer R;
|
|
86
|
+
} ? RequiredKeys<P extends Record<string, Parameters> ? P : never, R extends readonly string[] | undefined ? R : undefined> : never;
|
|
87
|
+
type RequiredKeysWithRequired<P extends Record<string, Parameters>, R extends string[]> = {
|
|
88
|
+
[K in Extract<keyof P, R[number]>]: ParamType<P[K]>;
|
|
89
|
+
} & {
|
|
90
|
+
[K in Exclude<keyof P, R[number]>]?: ParamType<P[K]>;
|
|
91
|
+
};
|
|
92
|
+
type RequiredKeysNoRequired<P extends Record<string, Parameters>> = {
|
|
93
|
+
[K in keyof P]?: ParamType<P[K]>;
|
|
94
|
+
};
|
|
95
|
+
type RequiredKeys<P extends Record<string, Parameters>, R extends readonly string[] | undefined> = R extends string[] ? RequiredKeysWithRequired<P, R> : RequiredKeysNoRequired<P>;
|
|
96
|
+
type Args<T extends Definition> = ParamType<T['function']['parameters']>;
|
|
97
|
+
type Handler<T extends Definition> = (args: Args<T>) => string | Promise<string>;
|
|
98
|
+
type Tool<T extends Definition = Definition> = {
|
|
99
|
+
def: T;
|
|
100
|
+
handler: Handler<T>;
|
|
101
|
+
};
|
|
102
|
+
declare class ToolManager {
|
|
103
|
+
protected tools: Record<string, Tool>;
|
|
104
|
+
protected ajv: Ajv;
|
|
105
|
+
private validatorCache;
|
|
106
|
+
register<T extends Definition>(def: T, handler: Handler<T>): void;
|
|
107
|
+
getDefinition(name: string): Definition;
|
|
108
|
+
getHandler(name: string): Handler<Definition>;
|
|
109
|
+
remove(name: string): void;
|
|
110
|
+
get definitions(): Definition[];
|
|
111
|
+
getDefinitions(names: string[]): Definition[];
|
|
112
|
+
private getValidator;
|
|
113
|
+
validate(name: string, args: unknown): boolean;
|
|
114
|
+
call<T extends Definition>(name: string, args: Args<T>): Promise<string>;
|
|
115
|
+
}
|
|
116
|
+
interface Config {
|
|
117
|
+
model: string;
|
|
118
|
+
url: string;
|
|
119
|
+
systemMessageContent?: string;
|
|
120
|
+
maxRounds?: number;
|
|
121
|
+
}
|
|
122
|
+
type ToolCall = {
|
|
123
|
+
id: string;
|
|
124
|
+
function: {
|
|
125
|
+
name: string;
|
|
126
|
+
arguments: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
interface SimpleMessage {
|
|
130
|
+
role: 'system' | 'user';
|
|
131
|
+
content: string;
|
|
132
|
+
}
|
|
133
|
+
interface AssistantMessage {
|
|
134
|
+
role: 'assistant';
|
|
135
|
+
content: string;
|
|
136
|
+
reasoning_content?: string;
|
|
137
|
+
tool_calls?: ToolCall[] | null;
|
|
138
|
+
}
|
|
139
|
+
interface ToolMessage {
|
|
140
|
+
role: 'tool';
|
|
141
|
+
content: string;
|
|
142
|
+
tool_call_id: string;
|
|
143
|
+
}
|
|
144
|
+
type Message = SimpleMessage | AssistantMessage | ToolMessage;
|
|
145
|
+
interface Params {
|
|
146
|
+
tools?: string[];
|
|
147
|
+
roundsLeft?: number;
|
|
148
|
+
}
|
|
149
|
+
interface Chunk {
|
|
150
|
+
choices: Array<{
|
|
151
|
+
delta: AssistantMessage;
|
|
152
|
+
}>;
|
|
153
|
+
}
|
|
154
|
+
type StreamResult = AsyncGenerator<Chunk, AssistantMessage | StreamResult | undefined, void>;
|
|
155
|
+
declare class Agent extends ToolManager {
|
|
156
|
+
model: string;
|
|
157
|
+
url: string;
|
|
158
|
+
messages: Message[];
|
|
159
|
+
maxRounds: number;
|
|
160
|
+
defaultParams: Params;
|
|
161
|
+
constructor(config: Config);
|
|
162
|
+
pushMessage(message: Message): void;
|
|
163
|
+
pushMessages(messages: Message[]): void;
|
|
164
|
+
merge<T extends object, S extends object>(target: T | null, source: S, fieldsToConcat?: (keyof (T & S))[]): T & S;
|
|
165
|
+
invoke(params?: Params): Promise<AssistantMessage | undefined>;
|
|
166
|
+
invokeStream(params?: Params): StreamResult;
|
|
167
|
+
}
|
|
168
|
+
export { type Parameters, type Definition, type Args, type Handler, type Message, type AssistantMessage, type StreamResult, abort, ToolManager, Agent, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Hughe5
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseRelativeDate(text: string): string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Hughe5
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const tools: {
|
|
17
|
+
parse_relative_date: {
|
|
18
|
+
def: {
|
|
19
|
+
type: "function";
|
|
20
|
+
function: {
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
parameters: {
|
|
24
|
+
type: "object";
|
|
25
|
+
properties: {
|
|
26
|
+
input: {
|
|
27
|
+
type: "string";
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
required: string[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
handler: (params: {
|
|
36
|
+
input: string;
|
|
37
|
+
}) => string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Hughe5
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { Message } from '../utils/agent';
|
|
17
|
+
interface Elements {
|
|
18
|
+
root: ShadowRoot;
|
|
19
|
+
userInputContainer: HTMLElement;
|
|
20
|
+
userInput: HTMLTextAreaElement;
|
|
21
|
+
submitIcon: HTMLButtonElement;
|
|
22
|
+
stopIcon: HTMLButtonElement;
|
|
23
|
+
messagesContainer: HTMLElement;
|
|
24
|
+
createButton: HTMLButtonElement;
|
|
25
|
+
}
|
|
26
|
+
declare function cacheElements(root: ShadowRoot): Elements;
|
|
27
|
+
declare function getElements(): Elements;
|
|
28
|
+
declare class MessagesContainerRender {
|
|
29
|
+
#private;
|
|
30
|
+
createCopyButton(message: Message): Element | null;
|
|
31
|
+
createMessage(message: Message): HTMLDivElement;
|
|
32
|
+
updateMessageContent(messageElement: Element, content: string): void;
|
|
33
|
+
pushMessage: (message: Message | undefined) => void;
|
|
34
|
+
pushMessages: (messages: Message[]) => void;
|
|
35
|
+
pushLoadingMessage: () => void;
|
|
36
|
+
finishLoadingMessage: () => void;
|
|
37
|
+
updateLoadingMessageContent: (content: string) => void;
|
|
38
|
+
updateLoadingMessageReasoningContent: (content: string) => void;
|
|
39
|
+
clear(): void;
|
|
40
|
+
setPaddingBottom(): void;
|
|
41
|
+
}
|
|
42
|
+
declare const userInputRender: {
|
|
43
|
+
value: string;
|
|
44
|
+
clear(): void;
|
|
45
|
+
focus(): void;
|
|
46
|
+
};
|
|
47
|
+
declare const buttonRender: {
|
|
48
|
+
default(): void;
|
|
49
|
+
chatting(): void;
|
|
50
|
+
};
|
|
51
|
+
declare const alertRender: {
|
|
52
|
+
show(text: string): void;
|
|
53
|
+
};
|
|
54
|
+
declare const messagesContainerRender: MessagesContainerRender;
|
|
55
|
+
export { cacheElements, getElements, messagesContainerRender, userInputRender, buttonRender, alertRender, };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Hughe5
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { type Message } from '../utils/agent';
|
|
17
|
+
declare function bindEvents(): void;
|
|
18
|
+
type EventType = 'send' | 'create';
|
|
19
|
+
type EventParams = {
|
|
20
|
+
send: [message: Message];
|
|
21
|
+
create: [];
|
|
22
|
+
};
|
|
23
|
+
type EventListener<T extends EventType> = (...args: EventParams[T]) => void | Promise<void>;
|
|
24
|
+
declare class EventManager {
|
|
25
|
+
private events;
|
|
26
|
+
on: <T extends EventType>(type: T, listener: EventListener<T>) => void;
|
|
27
|
+
emit: <T extends EventType>(type: T, ...args: EventParams[T]) => Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
declare const eventManager: EventManager;
|
|
30
|
+
export { bindEvents, eventManager };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Hughe5
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const init: (root: ShadowRoot) => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Hughe5
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
declare const template: HTMLTemplateElement;
|
|
17
|
+
export { template };
|
package/package.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ai-client-sdk",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "一款 AI 集成套件,适配任意前端框架,兼容多种大模型、聊天面板、Function Calling、Agent、工作流等。",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Hughe5",
|
|
7
|
+
"email": "2100921003@qq.com",
|
|
8
|
+
"url": "https://github.com/Hughe5"
|
|
9
|
+
},
|
|
10
|
+
"contributors": [
|
|
11
|
+
{
|
|
12
|
+
"name": "shichzh",
|
|
13
|
+
"email": "1767604480@qq.com",
|
|
14
|
+
"url": "https://github.com/shichzh"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"license": "Apache-2.0",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/shichzh/ai-client-sdk.git"
|
|
21
|
+
},
|
|
22
|
+
"types": "dist/index.d.ts",
|
|
23
|
+
"main": "./dist/ai-client-sdk.umd.js",
|
|
24
|
+
"module": "./dist/ai-client-sdk.mjs",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/ai-client-sdk.mjs",
|
|
29
|
+
"require": "./dist/ai-client-sdk.umd.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"LICENSE",
|
|
35
|
+
"README.md"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"dev": "vite",
|
|
39
|
+
"build": "vite build && tsc -p tsconfig.build.json",
|
|
40
|
+
"lint": "eslint . --ext .js,.mjs,.cjs,.ts,.tsx --fix",
|
|
41
|
+
"lint:check": "eslint . --ext .js,.mjs,.cjs,.ts,.tsx",
|
|
42
|
+
"format": "prettier . --write",
|
|
43
|
+
"format:check": "prettier . --check",
|
|
44
|
+
"test": "vitest",
|
|
45
|
+
"test:run": "vitest run",
|
|
46
|
+
"test:coverage": "vitest run --coverage",
|
|
47
|
+
"check-license": "addlicense -check -c \"Hughe5\" -l apache \"examples\" \"src\""
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"ai",
|
|
51
|
+
"artificial-intelligence",
|
|
52
|
+
"ai-sdk",
|
|
53
|
+
"ai-integration",
|
|
54
|
+
"function-calling",
|
|
55
|
+
"chatbot",
|
|
56
|
+
"multi-model",
|
|
57
|
+
"frontend",
|
|
58
|
+
"frontend-sdk",
|
|
59
|
+
"web-sdk",
|
|
60
|
+
"llm",
|
|
61
|
+
"large-language-model",
|
|
62
|
+
"openai-compatible",
|
|
63
|
+
"ai-client",
|
|
64
|
+
"chat",
|
|
65
|
+
"ai-chat",
|
|
66
|
+
"ai-tools",
|
|
67
|
+
"pure-javascript"
|
|
68
|
+
],
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"ajv": "^8.17.1",
|
|
71
|
+
"chrono-node": "^2.8.3",
|
|
72
|
+
"dayjs": "^1.11.13",
|
|
73
|
+
"dompurify": "^3.2.7",
|
|
74
|
+
"lodash-es": "^4.17.21",
|
|
75
|
+
"prettier": "^3.6.2",
|
|
76
|
+
"rehype-stringify": "^10.0.1",
|
|
77
|
+
"remark-gfm": "^4.0.1",
|
|
78
|
+
"remark-parse": "^11.0.0",
|
|
79
|
+
"remark-rehype": "^11.1.2",
|
|
80
|
+
"unified": "^11.0.5",
|
|
81
|
+
"unist-util-visit": "^5.0.0"
|
|
82
|
+
},
|
|
83
|
+
"devDependencies": {
|
|
84
|
+
"@types/lodash-es": "^4.17.12",
|
|
85
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
86
|
+
"eslint": "^9.30.1",
|
|
87
|
+
"globals": "^16.3.0",
|
|
88
|
+
"jiti": "^2.5.1",
|
|
89
|
+
"typescript": "^5.8.3",
|
|
90
|
+
"typescript-eslint": "^8.41.0",
|
|
91
|
+
"vite": "^7.1.12",
|
|
92
|
+
"vitest": "^3.2.4"
|
|
93
|
+
}
|
|
94
|
+
}
|