@tencent-ai/agent-server 0.1.0-next.731 → 0.1.0-next.989
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/.genie/dist/backend/index.js +1 -1
- package/README.md +34 -5
- package/package.json +8 -24
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Tencent AI Agent Server
|
|
2
2
|
|
|
3
3
|
### 安装应用
|
|
4
4
|
```
|
|
5
|
-
npm
|
|
5
|
+
npm i @tencent-ai/agent-server
|
|
6
6
|
```
|
|
7
7
|
|
|
8
8
|
### 配置环境变量
|
|
@@ -49,9 +49,9 @@ npm run server
|
|
|
49
49
|
|
|
50
50
|
### 接口
|
|
51
51
|
|
|
52
|
-
-
|
|
52
|
+
- craft发起对话(通用代码生成模式)
|
|
53
53
|
```
|
|
54
|
-
url: /api/v1/
|
|
54
|
+
url: /api/v1/craft/completions
|
|
55
55
|
method: POST
|
|
56
56
|
payload: {
|
|
57
57
|
"messages":[{"role":"user","content":"写一个排序算法"}]
|
|
@@ -62,7 +62,7 @@ payload: {
|
|
|
62
62
|
|
|
63
63
|
示例:
|
|
64
64
|
```
|
|
65
|
-
fetch("http://localhost:3000/api/v1/
|
|
65
|
+
fetch("http://localhost:3000/api/v1/craft/completions", {
|
|
66
66
|
"headers": {
|
|
67
67
|
"content-type": "application/json",
|
|
68
68
|
},
|
|
@@ -71,3 +71,32 @@ fetch("http://localhost:3000/api/v1/chat", {
|
|
|
71
71
|
});
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
+
- swe发起对话(SWE-Bench 模式)
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
url: /api/v1/swe/completions
|
|
78
|
+
method: POST
|
|
79
|
+
payload: {
|
|
80
|
+
"messages":[{"role":"user","content":"在 `tests/test_math.py` 中为 `utils/math.py` 的 `square(n)` 函数添加测试。"}]
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
使用说明:
|
|
85
|
+
- 请将示例中的消息内容替换为您的具体工程任务
|
|
86
|
+
- 任务描述应包含必要的上下文,例如:
|
|
87
|
+
* 需要修改的代码文件路径
|
|
88
|
+
* 具体的Bug描述或功能需求
|
|
89
|
+
* 相关的代码片段(如有)
|
|
90
|
+
|
|
91
|
+
对话发起后,将会流式返回数据。
|
|
92
|
+
|
|
93
|
+
示例:
|
|
94
|
+
```
|
|
95
|
+
fetch("http://localhost:3000/api/v1/swe/completions", {
|
|
96
|
+
"headers": {
|
|
97
|
+
"content-type": "application/json",
|
|
98
|
+
},
|
|
99
|
+
"body": "{\"messages\":[{\"role\":\"user\",\"content\":\"在 `tests/test_math.py` 中为 `utils/math.py` 的 `square(n)` 函数添加测试。\"}]}",
|
|
100
|
+
"method": "POST",
|
|
101
|
+
});
|
|
102
|
+
```
|
package/package.json
CHANGED
|
@@ -1,39 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencent-ai/agent-server",
|
|
3
|
-
"version": "0.1.0-next.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.0-next.989+6b366fc9",
|
|
4
|
+
"description": "Tencent AI Agent Server",
|
|
5
5
|
"main": ".genie/dist/backend/index.js",
|
|
6
6
|
"typings": "lib/node/index.d.ts",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"dependencies": {},
|
|
8
9
|
"bin": {
|
|
9
10
|
"agent-server": "./bin/agent-server"
|
|
10
11
|
},
|
|
11
|
-
"publishConfig": {
|
|
12
|
-
"access": "public",
|
|
13
|
-
"name": "@tencent-ai/agent-server"
|
|
14
|
-
},
|
|
12
|
+
"publishConfig": {},
|
|
15
13
|
"keywords": [
|
|
16
|
-
"genie-component",
|
|
17
|
-
"cell-component",
|
|
18
14
|
"agent-server"
|
|
19
15
|
],
|
|
20
16
|
"files": [
|
|
21
17
|
".genie/dist/backend/**/*",
|
|
22
18
|
"bin"
|
|
23
19
|
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"watch": "genie-component watch",
|
|
29
|
-
"clean": "genie-component clean",
|
|
30
|
-
"test": "genie-component test:js",
|
|
31
|
-
"prepublishOnly": "chmod +x ./prepublish.sh && ./prepublish.sh",
|
|
32
|
-
"postpublish": "mv package.json.bak package.json"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@celljs/cli": "3.6.4",
|
|
36
|
-
"@genie/component": "0.0.0"
|
|
37
|
-
},
|
|
38
|
-
"gitHead": "506d1978648ab169a4b261a32aabcf2c10e20cdf"
|
|
39
|
-
}
|
|
20
|
+
"scripts": {},
|
|
21
|
+
"devDependencies": {},
|
|
22
|
+
"gitHead": "6b366fc93fc0798efc0a67a458039a8b09a0548f"
|
|
23
|
+
}
|