@auipage/agent 0.1.0 → 0.2.0-alpha.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/AUTHORS.txt +6 -6
- package/CHANGELOG +29 -4
- package/README.md +136 -154
- package/dist/index.js +1024 -616
- package/package.json +3 -3
- package/src/callFuns.js +44 -35
- package/src/createTool.js +101 -60
- package/src/index.js +41 -21
- package/src/runConversation.js +65 -56
- package/types/agent.d.ts +58 -47
- package/types/create-tool.d.ts +44 -38
- package/types/index.d.ts +20 -20
- package/types/tool.d.ts +15 -15
package/types/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @auipage/agent 类型入口
|
|
3
|
-
*
|
|
4
|
-
* 智能体对话循环:工具调用编排、思维链回调,以及前后端工具桥接。
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
Agent,
|
|
9
|
-
type AgentOptions,
|
|
10
|
-
type Logback,
|
|
11
|
-
type Thinkback
|
|
12
|
-
} from "./agent.js";
|
|
13
|
-
|
|
14
|
-
export type { AgentTool } from "./tool.js";
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
CreateTool,
|
|
18
|
-
type MessageSender,
|
|
19
|
-
type CreateToolInput
|
|
20
|
-
} from "./create-tool.js";
|
|
1
|
+
/**
|
|
2
|
+
* @auipage/agent 类型入口
|
|
3
|
+
*
|
|
4
|
+
* 智能体对话循环:工具调用编排、思维链回调,以及前后端工具桥接。
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
Agent,
|
|
9
|
+
type AgentOptions,
|
|
10
|
+
type Logback,
|
|
11
|
+
type Thinkback
|
|
12
|
+
} from "./agent.js";
|
|
13
|
+
|
|
14
|
+
export type { AgentTool } from "./tool.js";
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
CreateTool,
|
|
18
|
+
type MessageSender,
|
|
19
|
+
type CreateToolInput
|
|
20
|
+
} from "./create-tool.js";
|
package/types/tool.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agent 直接执行的工具形态
|
|
3
|
-
*/
|
|
4
|
-
import type { ToolDescription, ToolExecutor } from "@auipage/types";
|
|
5
|
-
|
|
6
|
-
export interface AgentTool {
|
|
7
|
-
/** 符合模型 tools 规范的描述对象 */
|
|
8
|
-
description: ToolDescription;
|
|
9
|
-
/**
|
|
10
|
-
* 工具执行函数。
|
|
11
|
-
* 注意:普通工具必须提供;只有经 CreateTool 桥接的“前端工具”
|
|
12
|
-
* 才允许在创建时缺省(由 CreateTool.create 补齐 execute)。
|
|
13
|
-
*/
|
|
14
|
-
execute: ToolExecutor;
|
|
15
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Agent 直接执行的工具形态
|
|
3
|
+
*/
|
|
4
|
+
import type { ToolDescription, ToolExecutor } from "@auipage/types";
|
|
5
|
+
|
|
6
|
+
export interface AgentTool {
|
|
7
|
+
/** 符合模型 tools 规范的描述对象 */
|
|
8
|
+
description: ToolDescription;
|
|
9
|
+
/**
|
|
10
|
+
* 工具执行函数。
|
|
11
|
+
* 注意:普通工具必须提供;只有经 CreateTool 桥接的“前端工具”
|
|
12
|
+
* 才允许在创建时缺省(由 CreateTool.create 补齐 execute)。
|
|
13
|
+
*/
|
|
14
|
+
execute: ToolExecutor;
|
|
15
|
+
}
|