Skip to content

Commit

Permalink
Merge pull request #381 from aws-samples/hubin-daily-aics
Browse files Browse the repository at this point in the history
refactor: update api doc
  • Loading branch information
530051970 committed Sep 6, 2024
2 parents 13f1df3 + c69d290 commit 486f3ce
Show file tree
Hide file tree
Showing 2 changed files with 228 additions and 5 deletions.
231 changes: 227 additions & 4 deletions docs/api_doc/apis/api-prod-oas30.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,20 @@ paths:
- aicsaicustomerserviceapiconstructApiAuthorizer94F43DD0: []
/chatbot-management/chatbots:
get:
summary: List chatbots
description: |
GET /chatbot-management/chatbots - This endpoint retrieves a list of chatbots. The results can be paginated using the 'max_items' and 'page_size' query parameters.
parameters:
- name: "page_size"
in: "query"
schema:
type: "string"
description: Maximum number of items to return
- name: page_size
in: query
schema:
type: integer
description: Number of items per page
responses:
"400":
description: "400 response"
Expand All @@ -134,10 +148,19 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/Empty"
$ref: "#/components/schemas/aicusapicoj51o7moLWF0z"
security:
- aicsaicustomerserviceapiconstructApiAuthorizer94F43DD0: []
post:
summary: Create chatbots
description: |
POST /chatbot-management/chatbots - This endpoint creates chatbot for intention injection and chat conversation.
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/aicusapicoXPDy1YuPTCzQ"
required: true
responses:
"400":
description: "400 response"
Expand All @@ -156,7 +179,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/Empty"
$ref: "#/components/schemas/aicusapicoM92ois3mRqdG"
security:
- aicsaicustomerserviceapiconstructApiAuthorizer94F43DD0: []
/chatbot-management/check-chatbot:
Expand Down Expand Up @@ -186,6 +209,20 @@ paths:
# Intention
/intention/executions:
get:
summary: List upload batch of intention management
description: |
GET /intention/executions - This endpoint retrieves a list of batch. The results can be paginated using the 'max_items' and 'page_size' query parameters.
parameters:
- name: "page_size"
in: "query"
schema:
type: "string"
description: Maximum number of items to return
- name: page_size
in: query
schema:
type: integer
description: Number of items per page
responses:
"400":
description: "400 response"
Expand All @@ -204,10 +241,19 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/Empty"
$ref: "#/components/schemas/aicusapicoIEpQmiPSwa8a"
security:
- aicsaicustomerserviceapiconstructApiAuthorizer94F43DD0: []
post:
summary: Create intention upload batch
description: |
POST /intention/executions - This endpoint creates upload batch for intention injection.
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/aicusapicoICmkVHXXdPT7"
required: true
responses:
"400":
description: "400 response"
Expand All @@ -226,11 +272,14 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/Empty"
$ref: "#/components/schemas/aicusapicoW39avaSeAfwl"
security:
- aicsaicustomerserviceapiconstructApiAuthorizer94F43DD0: []
/intention/executions/{executionId}:
get:
summary: Detail a upload batch of intention management
description: |
GET /intention/executions/{executionId} - This endpoint retrieves details of a batch. The result contains execution details and injection details .
parameters:
- name: "intentionId"
in: "path"
Expand Down Expand Up @@ -659,6 +708,94 @@ components:
type: "string"
message:
type: "string"
aicusapicoICmkVHXXdPT7:
title: "PostPayload"
required:
- "chatbotId"
- "index"
- "model"
- "s3Bucket"
- "s3Prefix"
type: "object"
properties:
chatbotId:
type: "string"
index:
type: "string"
model:
type: "string"
s3Prefix:
type: "string"
s3Bucket:
type: "string"
aicusapicoIEpQmiPSwa8a:
title: "ResponsePayload"
type: "object"
properties:
Config:
type: "object"
properties:
PageSize:
type: "integer"
MaxItems:
type: "integer"
Items:
type: "array"
items:
required:
- "chatbotId"
- "createBy"
- "createTime"
- "details"
- "executionId"
- "executionStatus"
- "fileName"
- "index"
- "model"
- "tag"
type: "object"
properties:
executionId:
type: "string"
fileName:
type: "string"
createBy:
type: "string"
chatbotId:
type: "string"
createTime:
type: "string"
executionStatus:
type: "string"
index:
type: "string"
model:
type: "string"
details:
type: "string"
tag:
type: "string"
Count:
type: "integer"
aicusapicoM92ois3mRqdG:
title: "ResponsePayload"
type: "object"
properties:
chatbotId:
type: "string"
groupName:
type: "string"
indexIds:
type: "object"
properties:
qq:
type: "string"
qd:
type: "string"
intention:
type: "string"
Message:
type: "string"
aicsaiapicoFa1ujqwjnv8W:
title: "ResponsePayload"
type: "object"
Expand All @@ -671,6 +808,57 @@ components:
type: "string"
s3Bucket:
type: "string"
aicusapicoW39avaSeAfwl:
title: "ResponsePayload"
type: "object"
properties:
result:
type: "string"
execution_id:
type: "string"
input_payload:
type: "object"
properties:
chatbotId:
type: "string"
groupName:
type: "string"
tableItemId:
type: "string"
fieldName:
type: "string"
index:
type: "string"
model:
type: "string"
aicusapicoXPDy1YuPTCzQ:
title: "PostPayload"
required:
- "chatbotId"
- "index"
- "modelId"
- "modelName"
type: "object"
properties:
modelName:
type: "string"
chatbotId:
type: "string"
modelId:
type: "string"
index:
required:
- "intention"
- "qd"
- "qq"
type: "object"
properties:
qq:
type: "string"
qd:
type: "string"
intention:
type: "string"
aicsaiapicoS7193iOfsONP:
title: "PostPayload"
required:
Expand Down Expand Up @@ -724,6 +912,41 @@ components:
type: "string"
Count:
type: "integer"
aicusapicoj51o7moLWF0z:
title: "ResponsePayload"
type: "object"
properties:
chatbot_ids:
type: "array"
items:
type: "string"
Config:
type: "object"
properties:
PageSize:
type: "integer"
MaxItems:
type: "integer"
Items:
type: "array"
items:
required:
- "ChatbotId"
- "LastModifiedTime"
- "ModelId"
- "ModelName"
type: "object"
properties:
ChatbotId:
type: "string"
ModelName:
type: "string"
LastModifiedTime:
type: "string"
ModelId:
type: "string"
Count:
type: "integer"
aicsaiapicocohEaD85KKTd:
title: "ResponsePayload"
type: "object"
Expand Down
2 changes: 1 addition & 1 deletion source/lambda/etl/chatbot_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def __list_chatbot(event, group_name):
chatbot_model_item = model_table.get_item(
Key={
"groupName": group_name,
"modelId": model_id,
"modelId": f"{chatbot_id}-embedding",
}
).get("Item")
item_json["ModelName"] = chatbot_model_item.get("parameter", {}).get(
Expand Down

0 comments on commit 486f3ce

Please sign in to comment.