Show Result接口
功能介绍
get the result of the code generation request.
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v2/aims/codemodelserver/code-generation/results
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
request_id |
是 |
String |
the unique if of the request |
请求参数
无
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
request_status |
String |
the status of the request 枚举值:
|
tasks |
Array of TaskModel objects |
task list |
request_type |
String |
the type of the request |
参数 |
参数类型 |
描述 |
---|---|---|
docker_id |
String |
the docker_id |
exception |
String |
exception |
generated_snippet |
String |
the generated_snippet |
language |
String |
code language |
model_id |
String |
model_id |
record_time |
String |
record_time |
request_id |
String |
the unique id of request |
snippet |
String |
the snippet of code |
start_time |
String |
start_time |
status |
String |
status |
task_id |
Integer |
task_id |
time_consuming |
Number |
the time_consuming |
请求示例
get the result of the code generation request.
POST https://{endpoint}/v2/aims/codemodelserver/code-generation/results?request_id=d980c2b5242eb97aa07a1f6645a6793a
响应示例
状态码: 200
Successful Response
{ "tasks" : [ { "request_id" : "d980c2b5242eb97aa07a1f6645a6793a", "task_id" : 0, "language" : "python", "snippet" : "def add(x, y):\n return x + y", "generated_snippet" : "", "docker_id" : "02:55:ac:10:00:36", "start_time" : "2022-11-21T19:48:30", "record_time" : "2022-11-21T19:48:30", "time_consuming" : 0.022447, "status" : "success", "exception" : null, "model_id" : "300M" } ], "request_status" : "completed", "request_type" : "function" }
状态码
状态码 |
描述 |
---|---|
200 |
Successful Response |
错误码
请参见错误码。