Conversational Abilities, JSON Forms Integration, and Resumable Flows
Description: This PR introduces several key enhancements to improve the functionality of our bot:
-
Conversational Capabilities: We're implementing conversational capabilities in the bot, enabling it to ask clarifying questions before executing any POST call. This will enhance the user experience by providing a more interactive and intuitive interaction with the bot.
-
JSON Forms Integration: To make interactions even more user-friendly, we're integrating JSON forms with the bot. This integration will allow us to dynamically generate forms based on the Swagger spec. Users will find it easier to provide input and navigate through the process.
-
Resumable Flows API: We're introducing resumable flows API, which enables users to view a list of flows that were initiated and are currently waiting for user input. This feature enhances the bot's flexibility and allows users to manage their interactions more effectively.
These enhancements aim to make our bot more versatile and user-centric. Your feedback and input on these changes are highly appreciated.
/handle call
(base) ➜ ~ curl --location 'http://127.0.0.1:5000/handle' \
--header 'Content-Type: application/json' \
--data '{
"swagger_url": "https://petstore3.swagger.io/api/v3/openapi.yaml",
"namespace": "workflows",
"server_base_url": "https://petstore3.swagger.io/api/v3",
"base_prompt": "You are a helpful ai assistant",
"text": "Add and retrieve a pet and then add order for the pet"
}'
Api response
{
"flow_index": 0,
"form": {
"example": "{\"id\": 10, \"name\": \"doggie\", \"category\": {\"id\": 1, \"name\": \"Dogs\"}, \"photoUrls\": [\"image\"], \"tags\": [{\"id\": 3810985264972928423, \"name\": \"option\"}], \"status\": \"pending\"}",
"form_data": {
"category": {
"id": 2,
"name": "Cats"
},
"id": 11,
"name": "new_pet",
"photoUrls": [
"image1",
"image2"
],
"status": "available",
"tags": [
{
"id": 123456789,
"name": "tag1"
},
{
"id": 987654321,
"name": "tag2"
}
]
},
"json_schema": {
"properties": {
"category": {
"properties": {
"id": {
"example": 1,
"format": "int64",
"type": "integer"
},
"name": {
"example": "Dogs",
"type": "string"
}
},
"type": "object",
"xml": {
"name": "category"
}
},
"id": {
"example": 10,
"format": "int64",
"type": "integer"
},
"name": {
"example": "doggie",
"type": "string"
},
"photoUrls": {
"items": {
"type": "string",
"xml": {
"name": "photoUrl"
}
},
"type": "array",
"xml": {
"wrapped": true
}
},
"status": {
"description": "pet status in the store",
"enum": [
"available",
"pending",
"sold"
],
"type": "string"
},
"tags": {
"items": {
"properties": {
"id": {
"format": "int64",
"type": "integer"
},
"name": {
"type": "string"
}
},
"type": "object",
"xml": {
"name": "tag"
}
},
"type": "array",
"xml": {
"wrapped": true
}
}
}
},
"prev_api_response": ""
},
"step_index": 0
}