@tencent-ai/agent-server 0.0.4 → 0.0.10

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/README.md CHANGED
@@ -10,10 +10,9 @@ npm i @tencent-ai/agent-server
10
10
  在项目根目录下新建.env文件,配置相关的OPEN API的信息
11
11
 
12
12
  ```
13
- # OpenAI API Key
14
- OPENAI_API_KEY=
15
- MODEL_NAME=
13
+ MODEL_ID=
16
14
  BASE_URL=
15
+ TOKEN=
17
16
  ```
18
17
 
19
18
  ### 启动服务
@@ -49,9 +48,9 @@ npm run server
49
48
 
50
49
  ### 接口
51
50
 
52
- - 发起对话
51
+ - craft发起对话(通用代码生成模式)
53
52
  ```
54
- url: /api/v1/swe/completion
53
+ url: /api/v1/craft/completions
55
54
  method: POST
56
55
  payload: {
57
56
  "messages":[{"role":"user","content":"写一个排序算法"}]
@@ -62,7 +61,7 @@ payload: {
62
61
 
63
62
  示例:
64
63
  ```
65
- fetch("http://localhost:3000/api/v1/swe/completion", {
64
+ fetch("http://localhost:3000/api/v1/craft/completions", {
66
65
  "headers": {
67
66
  "content-type": "application/json",
68
67
  },
@@ -70,3 +69,33 @@ fetch("http://localhost:3000/api/v1/swe/completion", {
70
69
  "method": "POST",
71
70
  });
72
71
  ```
72
+
73
+ - swe发起对话(SWE-Bench 模式)​​
74
+
75
+ ```
76
+ url: /api/v1/swe/completions
77
+ method: POST
78
+ payload: {
79
+ "messages":[{"role":"user","content":"在 `tests/test_math.py` 中为 `utils/math.py` 的 `square(n)` 函数添加测试。"}]
80
+ }
81
+ ```
82
+
83
+ ​使用说明​:
84
+ - 请将示例中的消息内容替换为您的具体工程任务
85
+ - 任务描述应包含必要的上下文,例如:
86
+ * 需要修改的代码文件路径
87
+ * 具体的Bug描述或功能需求
88
+ * 相关的代码片段(如有)
89
+
90
+ 对话发起后,将会流式返回数据。
91
+
92
+ 示例:
93
+ ```
94
+ fetch("http://localhost:3000/api/v1/swe/completions", {
95
+ "headers": {
96
+ "content-type": "application/json",
97
+ },
98
+ "body": "{\"messages\":[{\"role\":\"user\",\"content\":\"在 `tests/test_math.py` 中为 `utils/math.py` 的 `square(n)` 函数添加测试。\"}]}",
99
+ "method": "POST",
100
+ });
101
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencent-ai/agent-server",
3
- "version": "0.0.4",
3
+ "version": "0.0.10",
4
4
  "description": "Tencent AI Agent Server",
5
5
  "main": ".genie/dist/backend/index.js",
6
6
  "typings": "lib/node/index.d.ts",
@@ -9,7 +9,9 @@
9
9
  "bin": {
10
10
  "agent-server": "./bin/agent-server"
11
11
  },
12
- "publishConfig": {},
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
13
15
  "keywords": [
14
16
  "agent-server"
15
17
  ],
@@ -19,5 +21,5 @@
19
21
  ],
20
22
  "scripts": {},
21
23
  "devDependencies": {},
22
- "gitHead": "e55f04dc487dc3de4a55abfa62aad263fab40154"
24
+ "gitHead": "37ea19db9c246b9656da491092ce2aa2cb98f4f6"
23
25
  }