my-ai-chat-framework 2.7.0 → 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/CHANGELOG.md +65 -0
- package/LICENSE +20 -20
- package/README.md +100 -13
- package/README_ZH.md +375 -0
- package/dist/my-ai-chat-framework.browser.es.js +758 -248
- package/dist/my-ai-chat-framework.browser.es.js.map +1 -1
- package/dist/my-ai-chat-framework.browser.umd.js +762 -247
- package/dist/my-ai-chat-framework.browser.umd.js.map +1 -1
- package/dist/my-ai-chat-framework.node.cjs.js +762 -247
- package/dist/my-ai-chat-framework.node.cjs.js.map +1 -1
- package/docs/DEVELOPER.md +479 -0
- package/package.json +31 -8
- package/src/adapters/openai.js +82 -7
- package/src/core/ChatService.js +415 -61
- package/src/core/Errors.js +59 -59
- package/src/core/MessageStore.js +27 -0
- package/src/core/Pipeline.js +48 -0
- package/src/core/SystemPromptStore.js +118 -118
- package/src/index.js +6 -4
- package/src/plugins/model-registry.js +223 -187
- package/src/plugins/tool-calling.js +215 -185
- package/src/utils/MessageFormatter.js +204 -204
- package/src/utils/typeCheck.js +11 -11
- package/src/utils/url.js +17 -17
package/src/core/Errors.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 自定义错误类
|
|
3
|
-
* 用于区分不同类型的错误,方便用户通过 `error.name` 或 `instanceof` 处理
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// API 错误 (如 401 认证失败、400 参数错误、429 限流等)
|
|
7
|
-
export class APIError extends Error {
|
|
8
|
-
/**
|
|
9
|
-
* @param {string} message - 错误消息(通常来自 API 响应)
|
|
10
|
-
* @param {number} statusCode - HTTP 状态码
|
|
11
|
-
* @param {any} originalError - 原始错误对象或相关信息
|
|
12
|
-
* @param {string} responseText - 原始响应文本(如果有)
|
|
13
|
-
*/
|
|
14
|
-
constructor(message, statusCode, originalError, responseText) {
|
|
15
|
-
super(message)
|
|
16
|
-
this.name = 'APIError'
|
|
17
|
-
this.statusCode = statusCode
|
|
18
|
-
this.originalError = originalError
|
|
19
|
-
this.responseText = responseText
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// 网络错误 (fetch 失败、连接超时等)
|
|
24
|
-
export class NetworkError extends Error {
|
|
25
|
-
/**
|
|
26
|
-
* @param {string} message - 错误消息
|
|
27
|
-
* @param {any} originalError - 原始错误对象或相关信息
|
|
28
|
-
*/
|
|
29
|
-
constructor(message, originalError) {
|
|
30
|
-
super(message)
|
|
31
|
-
this.name = 'NetworkError'
|
|
32
|
-
this.originalError = originalError
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// 配置错误 (缺少必要配置项、配置项类型错误等)
|
|
37
|
-
export class ConfigurationError extends Error {
|
|
38
|
-
/**
|
|
39
|
-
* @param {string} message - 错误消息
|
|
40
|
-
*/
|
|
41
|
-
constructor(message) {
|
|
42
|
-
super(message)
|
|
43
|
-
this.name = 'ConfigurationError'
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// 解析错误 (解析 API 响应失败、响应格式不正确,不符合预期等)
|
|
48
|
-
export class ParsingError extends Error {
|
|
49
|
-
/**
|
|
50
|
-
* @param {string} message - 错误消息
|
|
51
|
-
* @param {any} originalError - 原始错误对象或相关信息
|
|
52
|
-
* @param {string} responseText - 原始响应文本(如果有)
|
|
53
|
-
**/
|
|
54
|
-
constructor(message, originalError, responseText) {
|
|
55
|
-
super(message)
|
|
56
|
-
this.name = 'ParsingError'
|
|
57
|
-
this.originalError = originalError
|
|
58
|
-
this.responseText = responseText
|
|
59
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 自定义错误类
|
|
3
|
+
* 用于区分不同类型的错误,方便用户通过 `error.name` 或 `instanceof` 处理
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// API 错误 (如 401 认证失败、400 参数错误、429 限流等)
|
|
7
|
+
export class APIError extends Error {
|
|
8
|
+
/**
|
|
9
|
+
* @param {string} message - 错误消息(通常来自 API 响应)
|
|
10
|
+
* @param {number} statusCode - HTTP 状态码
|
|
11
|
+
* @param {any} originalError - 原始错误对象或相关信息
|
|
12
|
+
* @param {string} responseText - 原始响应文本(如果有)
|
|
13
|
+
*/
|
|
14
|
+
constructor(message, statusCode, originalError, responseText) {
|
|
15
|
+
super(message)
|
|
16
|
+
this.name = 'APIError'
|
|
17
|
+
this.statusCode = statusCode
|
|
18
|
+
this.originalError = originalError
|
|
19
|
+
this.responseText = responseText
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// 网络错误 (fetch 失败、连接超时等)
|
|
24
|
+
export class NetworkError extends Error {
|
|
25
|
+
/**
|
|
26
|
+
* @param {string} message - 错误消息
|
|
27
|
+
* @param {any} originalError - 原始错误对象或相关信息
|
|
28
|
+
*/
|
|
29
|
+
constructor(message, originalError) {
|
|
30
|
+
super(message)
|
|
31
|
+
this.name = 'NetworkError'
|
|
32
|
+
this.originalError = originalError
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// 配置错误 (缺少必要配置项、配置项类型错误等)
|
|
37
|
+
export class ConfigurationError extends Error {
|
|
38
|
+
/**
|
|
39
|
+
* @param {string} message - 错误消息
|
|
40
|
+
*/
|
|
41
|
+
constructor(message) {
|
|
42
|
+
super(message)
|
|
43
|
+
this.name = 'ConfigurationError'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// 解析错误 (解析 API 响应失败、响应格式不正确,不符合预期等)
|
|
48
|
+
export class ParsingError extends Error {
|
|
49
|
+
/**
|
|
50
|
+
* @param {string} message - 错误消息
|
|
51
|
+
* @param {any} originalError - 原始错误对象或相关信息
|
|
52
|
+
* @param {string} responseText - 原始响应文本(如果有)
|
|
53
|
+
**/
|
|
54
|
+
constructor(message, originalError, responseText) {
|
|
55
|
+
super(message)
|
|
56
|
+
this.name = 'ParsingError'
|
|
57
|
+
this.originalError = originalError
|
|
58
|
+
this.responseText = responseText
|
|
59
|
+
}
|
|
60
60
|
}
|
package/src/core/MessageStore.js
CHANGED
|
@@ -91,6 +91,32 @@ export class MessageStore {
|
|
|
91
91
|
}
|
|
92
92
|
return [];
|
|
93
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* 撤回到指定消息 id 的上一个用户消息,删除两者之间的所有消息
|
|
96
|
+
* 适用于重发
|
|
97
|
+
* @param {string} id — 目标消息 id
|
|
98
|
+
* @returns {Array} 被删除的消息列表
|
|
99
|
+
*/
|
|
100
|
+
undoToPreviousUser(id) {
|
|
101
|
+
// 从后往前找到指定消息及其上一个用户消息,删除两者之间的所有消息
|
|
102
|
+
let targetIndex = -1;
|
|
103
|
+
let previousUserIndex = -1;
|
|
104
|
+
for (let i = this._messages.length - 1; i >= 0; i--) {
|
|
105
|
+
if (this._messages[i].id === id) {
|
|
106
|
+
targetIndex = i;
|
|
107
|
+
}
|
|
108
|
+
if (targetIndex >= 0 && this._messages[i].role === 'user') {
|
|
109
|
+
previousUserIndex = i;
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (targetIndex >= 0 && previousUserIndex >= 0) {
|
|
114
|
+
const removed = this._messages.splice(previousUserIndex + 1, targetIndex - previousUserIndex);
|
|
115
|
+
return removed;
|
|
116
|
+
}
|
|
117
|
+
return [];
|
|
118
|
+
}
|
|
119
|
+
|
|
94
120
|
|
|
95
121
|
/**
|
|
96
122
|
* 更新消息:按 id 查找并合并 changes,不新增消息
|
|
@@ -109,4 +135,5 @@ export class MessageStore {
|
|
|
109
135
|
}
|
|
110
136
|
return null;
|
|
111
137
|
}
|
|
138
|
+
|
|
112
139
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pipeline —— 极简顺序管道(v3.0 提案 · 阶段 1)
|
|
3
|
+
*
|
|
4
|
+
* 三个概念(对照 pipeline-demo.html):
|
|
5
|
+
* - 小车 ctx —— 本次请求的全部"状态",车间之间只通过它交接
|
|
6
|
+
* - 车间 stage —— { name, run(ctx) },只干一件事,不认别的车间
|
|
7
|
+
* - 调度 run() —— for + await,顺序执行(线性,无"回程";洋葱能力留给阶段 2 的 after 车间)
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export class Pipeline {
|
|
11
|
+
constructor() {
|
|
12
|
+
this._stages = [];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 注册一个车间(追加到末尾)。
|
|
17
|
+
* @param {{name: string, run: (ctx: object) => void | Promise<void>}} stage
|
|
18
|
+
* @returns {Pipeline} this,支持链式
|
|
19
|
+
*/
|
|
20
|
+
register(stage) {
|
|
21
|
+
if (!stage || typeof stage.run !== 'function') {
|
|
22
|
+
throw new TypeError('Pipeline.register: stage 需要 { name, run(ctx) },运行 run 必须是函数');
|
|
23
|
+
}
|
|
24
|
+
this._stages.push(stage);
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** 按名字移除车间(移除不存在的名字是安全的) */
|
|
29
|
+
unregister(name) {
|
|
30
|
+
this._stages = this._stages.filter(s => s.name !== name);
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** 列出当前车间名(调试用) */
|
|
35
|
+
names() {
|
|
36
|
+
return this._stages.map(s => s.name);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** 把小车开过所有车间;返回 ctx(车间可改 ctx 上的字段) */
|
|
40
|
+
async run(ctx) {
|
|
41
|
+
for (const stage of this._stages) {
|
|
42
|
+
await stage.run(ctx);
|
|
43
|
+
}
|
|
44
|
+
return ctx;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default Pipeline;
|
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SystemPromptStore — 系统提示词存储
|
|
3
|
-
*
|
|
4
|
-
* 职责:管理多条 system prompt 的增删改查与开关
|
|
5
|
-
* 与 MessageStore 分离,因为 system prompt 是"AI 行为准则",不是对话事件
|
|
6
|
-
*
|
|
7
|
-
* 每条记录格式:
|
|
8
|
-
* {
|
|
9
|
-
* id: string,
|
|
10
|
-
* content: string,
|
|
11
|
-
* enabled: boolean,
|
|
12
|
-
* timestamp: number
|
|
13
|
-
* }
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
export class SystemPromptStore {
|
|
17
|
-
constructor() {
|
|
18
|
-
this._prompts = [];
|
|
19
|
-
this._idCounter = 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* 添加一条 system prompt
|
|
24
|
-
* @param {string} content — 提示词内容
|
|
25
|
-
* @param {boolean} [enabled=true] — 是否启用
|
|
26
|
-
* @returns {Object} 添加的记录
|
|
27
|
-
*/
|
|
28
|
-
add(content, enabled = true) {
|
|
29
|
-
if (!content || typeof content !== 'string' || !content.trim()) {
|
|
30
|
-
throw new Error('[SystemPromptStore] content 必须是非空字符串');
|
|
31
|
-
}
|
|
32
|
-
const record = {
|
|
33
|
-
id: `sys_${Date.now()}_${++this._idCounter}`,
|
|
34
|
-
content: content.trim(),
|
|
35
|
-
enabled: Boolean(enabled),
|
|
36
|
-
timestamp: Date.now()
|
|
37
|
-
};
|
|
38
|
-
this._prompts.push(record);
|
|
39
|
-
return record;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* 删除指定索引的 system prompt
|
|
44
|
-
* @param {number} index
|
|
45
|
-
* @returns {Object} 被删除的记录
|
|
46
|
-
*/
|
|
47
|
-
remove(index) {
|
|
48
|
-
if (index < 0 || index >= this._prompts.length) {
|
|
49
|
-
throw new Error(`[SystemPromptStore] 索引越界: ${index}`);
|
|
50
|
-
}
|
|
51
|
-
return this._prompts.splice(index, 1)[0];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* 切换指定索引的启用/禁用状态
|
|
56
|
-
* @param {number} index
|
|
57
|
-
* @returns {boolean} 切换后的状态
|
|
58
|
-
*/
|
|
59
|
-
toggle(index) {
|
|
60
|
-
if (index < 0 || index >= this._prompts.length) {
|
|
61
|
-
throw new Error(`[SystemPromptStore] 索引越界: ${index}`);
|
|
62
|
-
}
|
|
63
|
-
this._prompts[index].enabled = !this._prompts[index].enabled;
|
|
64
|
-
return this._prompts[index].enabled;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* 更新指定索引的 content
|
|
69
|
-
* @param {number} index
|
|
70
|
-
* @param {string} content
|
|
71
|
-
*/
|
|
72
|
-
update(index, content) {
|
|
73
|
-
if (index < 0 || index >= this._prompts.length) {
|
|
74
|
-
throw new Error(`[SystemPromptStore] 索引越界: ${index}`);
|
|
75
|
-
}
|
|
76
|
-
if (!content || typeof content !== 'string' || !content.trim()) {
|
|
77
|
-
throw new Error('[SystemPromptStore] content 必须是非空字符串');
|
|
78
|
-
}
|
|
79
|
-
this._prompts[index].content = content.trim();
|
|
80
|
-
this._prompts[index].timestamp = Date.now();
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* 清空并用一条 content 替换(便捷方法,常用于 config.system = '...')
|
|
85
|
-
* @param {string} content
|
|
86
|
-
*/
|
|
87
|
-
set(content) {
|
|
88
|
-
this._prompts = [];
|
|
89
|
-
if (content && typeof content === 'string' && content.trim()) {
|
|
90
|
-
this.add(content, true);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* 按 enabled 筛选后,转为适配器可用的格式
|
|
96
|
-
* @returns {Array<{role:'system', content:string}>}
|
|
97
|
-
*/
|
|
98
|
-
getEnabled() {
|
|
99
|
-
return this._prompts
|
|
100
|
-
.filter(p => p.enabled)
|
|
101
|
-
.map(p => ({ role: 'system', content: p.content }));
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* 返回所有记录(含 enabled 状态,用于 UI 展示)
|
|
106
|
-
* @returns {Array}
|
|
107
|
-
*/
|
|
108
|
-
getAll() {
|
|
109
|
-
return [...this._prompts];
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* 清空所有 system prompt
|
|
114
|
-
*/
|
|
115
|
-
clear() {
|
|
116
|
-
this._prompts = [];
|
|
117
|
-
}
|
|
118
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* SystemPromptStore — 系统提示词存储
|
|
3
|
+
*
|
|
4
|
+
* 职责:管理多条 system prompt 的增删改查与开关
|
|
5
|
+
* 与 MessageStore 分离,因为 system prompt 是"AI 行为准则",不是对话事件
|
|
6
|
+
*
|
|
7
|
+
* 每条记录格式:
|
|
8
|
+
* {
|
|
9
|
+
* id: string,
|
|
10
|
+
* content: string,
|
|
11
|
+
* enabled: boolean,
|
|
12
|
+
* timestamp: number
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export class SystemPromptStore {
|
|
17
|
+
constructor() {
|
|
18
|
+
this._prompts = [];
|
|
19
|
+
this._idCounter = 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 添加一条 system prompt
|
|
24
|
+
* @param {string} content — 提示词内容
|
|
25
|
+
* @param {boolean} [enabled=true] — 是否启用
|
|
26
|
+
* @returns {Object} 添加的记录
|
|
27
|
+
*/
|
|
28
|
+
add(content, enabled = true) {
|
|
29
|
+
if (!content || typeof content !== 'string' || !content.trim()) {
|
|
30
|
+
throw new Error('[SystemPromptStore] content 必须是非空字符串');
|
|
31
|
+
}
|
|
32
|
+
const record = {
|
|
33
|
+
id: `sys_${Date.now()}_${++this._idCounter}`,
|
|
34
|
+
content: content.trim(),
|
|
35
|
+
enabled: Boolean(enabled),
|
|
36
|
+
timestamp: Date.now()
|
|
37
|
+
};
|
|
38
|
+
this._prompts.push(record);
|
|
39
|
+
return record;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 删除指定索引的 system prompt
|
|
44
|
+
* @param {number} index
|
|
45
|
+
* @returns {Object} 被删除的记录
|
|
46
|
+
*/
|
|
47
|
+
remove(index) {
|
|
48
|
+
if (index < 0 || index >= this._prompts.length) {
|
|
49
|
+
throw new Error(`[SystemPromptStore] 索引越界: ${index}`);
|
|
50
|
+
}
|
|
51
|
+
return this._prompts.splice(index, 1)[0];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 切换指定索引的启用/禁用状态
|
|
56
|
+
* @param {number} index
|
|
57
|
+
* @returns {boolean} 切换后的状态
|
|
58
|
+
*/
|
|
59
|
+
toggle(index) {
|
|
60
|
+
if (index < 0 || index >= this._prompts.length) {
|
|
61
|
+
throw new Error(`[SystemPromptStore] 索引越界: ${index}`);
|
|
62
|
+
}
|
|
63
|
+
this._prompts[index].enabled = !this._prompts[index].enabled;
|
|
64
|
+
return this._prompts[index].enabled;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 更新指定索引的 content
|
|
69
|
+
* @param {number} index
|
|
70
|
+
* @param {string} content
|
|
71
|
+
*/
|
|
72
|
+
update(index, content) {
|
|
73
|
+
if (index < 0 || index >= this._prompts.length) {
|
|
74
|
+
throw new Error(`[SystemPromptStore] 索引越界: ${index}`);
|
|
75
|
+
}
|
|
76
|
+
if (!content || typeof content !== 'string' || !content.trim()) {
|
|
77
|
+
throw new Error('[SystemPromptStore] content 必须是非空字符串');
|
|
78
|
+
}
|
|
79
|
+
this._prompts[index].content = content.trim();
|
|
80
|
+
this._prompts[index].timestamp = Date.now();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* 清空并用一条 content 替换(便捷方法,常用于 config.system = '...')
|
|
85
|
+
* @param {string} content
|
|
86
|
+
*/
|
|
87
|
+
set(content) {
|
|
88
|
+
this._prompts = [];
|
|
89
|
+
if (content && typeof content === 'string' && content.trim()) {
|
|
90
|
+
this.add(content, true);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 按 enabled 筛选后,转为适配器可用的格式
|
|
96
|
+
* @returns {Array<{role:'system', content:string}>}
|
|
97
|
+
*/
|
|
98
|
+
getEnabled() {
|
|
99
|
+
return this._prompts
|
|
100
|
+
.filter(p => p.enabled)
|
|
101
|
+
.map(p => ({ role: 'system', content: p.content }));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* 返回所有记录(含 enabled 状态,用于 UI 展示)
|
|
106
|
+
* @returns {Array}
|
|
107
|
+
*/
|
|
108
|
+
getAll() {
|
|
109
|
+
return [...this._prompts];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* 清空所有 system prompt
|
|
114
|
+
*/
|
|
115
|
+
clear() {
|
|
116
|
+
this._prompts = [];
|
|
117
|
+
}
|
|
118
|
+
}
|
package/src/index.js
CHANGED
|
@@ -2,10 +2,12 @@ export { ChatService } from './core/ChatService.js';
|
|
|
2
2
|
export { MessageStore } from './core/MessageStore.js';
|
|
3
3
|
export { SystemPromptStore } from './core/SystemPromptStore.js';
|
|
4
4
|
export { EventEmitter } from './core/EventEmitter.js';
|
|
5
|
-
export { openaiAdapter } from './adapters/openai.js';
|
|
6
|
-
export { toolCallingPlugin } from './plugins/tool-calling.js';
|
|
7
|
-
export { modelRegistryPlugin } from './plugins/model-registry.js';
|
|
5
|
+
export { openaiAdapter, createOpenAIAdapter } from './adapters/openai.js';
|
|
6
|
+
export { toolCallingPlugin, createToolCallingPlugin } from './plugins/tool-calling.js';
|
|
7
|
+
export { modelRegistryPlugin, createModelRegistryPlugin } from './plugins/model-registry.js';
|
|
8
8
|
export { MessageFormatter } from './utils/MessageFormatter.js';
|
|
9
9
|
export { assembleMessages } from './utils/MessageFormatter.js';
|
|
10
10
|
|
|
11
|
-
export { APIError, NetworkError, ConfigurationError, ParsingError } from './core/Errors.js';
|
|
11
|
+
export { APIError, NetworkError, ConfigurationError, ParsingError } from './core/Errors.js';
|
|
12
|
+
export { assertAdapter } from './core/ChatService.js';
|
|
13
|
+
export { Pipeline } from './core/Pipeline.js';
|