diff --git a/src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj b/src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj index 3997a390..dce40024 100644 --- a/src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj +++ b/src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj @@ -48,11 +48,11 @@ - - + + @@ -82,10 +82,13 @@ PreserveNewest + + PreserveNewest + PreserveNewest - + PreserveNewest @@ -157,15 +160,12 @@ PreserveNewest - + PreserveNewest PreserveNewest - - PreserveNewest - PreserveNewest diff --git a/src/Infrastructure/BotSharp.Core/data/agents/00000000-0000-0000-0000-000000000000/functions.json b/src/Infrastructure/BotSharp.Core/data/agents/00000000-0000-0000-0000-000000000000/functions.json deleted file mode 100644 index 116398b3..00000000 --- a/src/Infrastructure/BotSharp.Core/data/agents/00000000-0000-0000-0000-000000000000/functions.json +++ /dev/null @@ -1,43 +0,0 @@ -[ - { - "name": "load_attachment", - "description": "If the user's request is related to analyzing files and/or images, you can call this function to analyze files and images.", - "parameters": { - "type": "object", - "properties": { - "user_request": { - "type": "string", - "description": "The request posted by user, which is related to analyzing requested files. User can request for multiple files to process at one time." - }, - "file_types": { - "type": "string", - "description": "The file types requested by user to analyze, such as image, png, jpeg, and pdf. There can be multiple file types in a single request. An example output is, 'image,pdf'." - } - }, - "required": [ "user_request", "file_types" ] - } - }, - - { - "name": "handle_http_request", - "description": "If the user requests to send an http request, you need to capture the http method and request content, and then call this function to send the http request.", - "parameters": { - "type": "object", - "properties": { - "request_url": { - "type": "string", - "description": "The http url that is requested. It can be an absolute url that starts with 'http' or 'https', or a relative url that starts with '/'" - }, - "http_method": { - "type": "string", - "description": "The http method that is requested, e.g., GET, POST, PUT, and DELETE." - }, - "request_content": { - "type": "string", - "description": "The http request content. It must be in json format.." - } - }, - "required": [ "request_url", "http_method" ] - } - } -] \ No newline at end of file diff --git a/src/Infrastructure/BotSharp.Core/data/agents/00000000-0000-0000-0000-000000000000/functions/load_attachment.json b/src/Infrastructure/BotSharp.Core/data/agents/00000000-0000-0000-0000-000000000000/functions/load_attachment.json new file mode 100644 index 00000000..a30e7f9a --- /dev/null +++ b/src/Infrastructure/BotSharp.Core/data/agents/00000000-0000-0000-0000-000000000000/functions/load_attachment.json @@ -0,0 +1,18 @@ +{ + "name": "load_attachment", + "description": "If the user's request is related to analyzing files and/or images, you can call this function to analyze files and images.", + "parameters": { + "type": "object", + "properties": { + "user_request": { + "type": "string", + "description": "The request posted by user, which is related to analyzing requested files. User can request for multiple files to process at one time." + }, + "file_types": { + "type": "string", + "description": "The file types requested by user to analyze, such as image, png, jpeg, and pdf. There can be multiple file types in a single request. An example output is, 'image,pdf'." + } + }, + "required": [ "user_request", "file_types" ] + } +} \ No newline at end of file diff --git a/src/Infrastructure/BotSharp.Core/data/agents/01dcc3e5-0af7-49e6-ad7a-a760bd12dc4b/functions/human_intervention_needed.json b/src/Infrastructure/BotSharp.Core/data/agents/01dcc3e5-0af7-49e6-ad7a-a760bd12dc4b/functions/human_intervention_needed.json new file mode 100644 index 00000000..8ddc6539 --- /dev/null +++ b/src/Infrastructure/BotSharp.Core/data/agents/01dcc3e5-0af7-49e6-ad7a-a760bd12dc4b/functions/human_intervention_needed.json @@ -0,0 +1,18 @@ +{ + "name": "human_intervention_needed", + "description": "If user wants to speak to human customer service.", + "parameters": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "why customer needs customer service." + }, + "summary": { + "type": "string", + "description": "the whole conversation summary with important information" + } + }, + "required": [ "reason", "summary" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.AzureOpenAI/BotSharp.Plugin.AzureOpenAI.csproj b/src/Plugins/BotSharp.Plugin.AzureOpenAI/BotSharp.Plugin.AzureOpenAI.csproj index 9d500ad7..c1264b9b 100644 --- a/src/Plugins/BotSharp.Plugin.AzureOpenAI/BotSharp.Plugin.AzureOpenAI.csproj +++ b/src/Plugins/BotSharp.Plugin.AzureOpenAI/BotSharp.Plugin.AzureOpenAI.csproj @@ -1,7 +1,7 @@ - net8.0 + $(TargetFramework) enable $(LangVersion) $(BotSharpVersion) diff --git a/src/Plugins/BotSharp.Plugin.HttpHandler/BotSharp.Plugin.HttpHandler.csproj b/src/Plugins/BotSharp.Plugin.HttpHandler/BotSharp.Plugin.HttpHandler.csproj index 2607cb15..a893d71c 100644 --- a/src/Plugins/BotSharp.Plugin.HttpHandler/BotSharp.Plugin.HttpHandler.csproj +++ b/src/Plugins/BotSharp.Plugin.HttpHandler/BotSharp.Plugin.HttpHandler.csproj @@ -11,6 +11,8 @@ + + @@ -26,6 +28,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + diff --git a/src/Plugins/BotSharp.Plugin.HttpHandler/data/agents/00000000-0000-0000-0000-000000000000/functions/handle_http_request.json b/src/Plugins/BotSharp.Plugin.HttpHandler/data/agents/00000000-0000-0000-0000-000000000000/functions/handle_http_request.json new file mode 100644 index 00000000..5a0221a7 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.HttpHandler/data/agents/00000000-0000-0000-0000-000000000000/functions/handle_http_request.json @@ -0,0 +1,22 @@ +{ + "name": "handle_http_request", + "description": "If the user requests to send an http request, you need to capture the http method and request content, and then call this function to send the http request.", + "parameters": { + "type": "object", + "properties": { + "request_url": { + "type": "string", + "description": "The http url that is requested. It can be an absolute url that starts with 'http' or 'https', or a relative url that starts with '/'" + }, + "http_method": { + "type": "string", + "description": "The http method that is requested, e.g., GET, POST, PUT, and DELETE." + }, + "request_content": { + "type": "string", + "description": "The http request content. It must be in json format.." + } + }, + "required": [ "request_url", "http_method" ] + } +} \ No newline at end of file diff --git a/src/Infrastructure/BotSharp.Core/data/agents/00000000-0000-0000-0000-000000000000/templates/handle_http_request.fn.liquid b/src/Plugins/BotSharp.Plugin.HttpHandler/data/agents/00000000-0000-0000-0000-000000000000/templates/handle_http_request.fn.liquid similarity index 100% rename from src/Infrastructure/BotSharp.Core/data/agents/00000000-0000-0000-0000-000000000000/templates/handle_http_request.fn.liquid rename to src/Plugins/BotSharp.Plugin.HttpHandler/data/agents/00000000-0000-0000-0000-000000000000/templates/handle_http_request.fn.liquid diff --git a/src/Plugins/BotSharp.Plugin.SqlDriver/BotSharp.Plugin.SqlDriver.csproj b/src/Plugins/BotSharp.Plugin.SqlDriver/BotSharp.Plugin.SqlDriver.csproj index afb53ae8..c43a4097 100644 --- a/src/Plugins/BotSharp.Plugin.SqlDriver/BotSharp.Plugin.SqlDriver.csproj +++ b/src/Plugins/BotSharp.Plugin.SqlDriver/BotSharp.Plugin.SqlDriver.csproj @@ -13,6 +13,10 @@ + + + + @@ -21,15 +25,27 @@ PreserveNewest - - PreserveNewest - PreserveNewest + + PreserveNewest + PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + diff --git a/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions/get_table_columns.json b/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions/get_table_columns.json new file mode 100644 index 00000000..35f93002 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions/get_table_columns.json @@ -0,0 +1,14 @@ +{ + "name": "get_table_columns", + "description": "Get related table columns and foreign key informations", + "parameters": { + "type": "object", + "properties": { + "table": { + "type": "string", + "description": "table name" + } + }, + "required": [ "table" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions/lookup_dictionary.json b/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions/lookup_dictionary.json new file mode 100644 index 00000000..2123be32 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions/lookup_dictionary.json @@ -0,0 +1,30 @@ +{ + "name": "lookup_dictionary", + "description": "Get id from dictionary table by keyword if tool or solution mentioned this approach", + "parameters": { + "type": "object", + "properties": { + "table": { + "type": "string", + "description": "table name" + }, + "keyword": { + "type": "string", + "description": "table name" + }, + "reason": { + "type": "string", + "description": "the reason why you need to call lookup_dictionary" + }, + "columns": { + "type": "array", + "description": "columns", + "items": { + "type": "string", + "description": "column" + } + } + }, + "required": [ "table", "keyword", "reason", "columns" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions/sql_insert.json b/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions/sql_insert.json new file mode 100644 index 00000000..94dfe35d --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions/sql_insert.json @@ -0,0 +1,56 @@ +{ + "name": "sql_insert", + "description": "Insert query is generated if the record doesn't exist.", + "parameters": { + "type": "object", + "properties": { + "sql_statement": { + "type": "string", + "description": "INSERT SQL statement. The value should use the parameter name like @field." + }, + "reason": { + "type": "string", + "description": "reason" + }, + "table": { + "type": "string", + "description": "related table" + }, + "parameters": { + "type": "array", + "description": "a list of parameters in the statement match with the variables", + "items": { + "type": "object", + "description": "{name:'', value:''}", + "properties": { + "name": { + "type": "string", + "description": "field name" + }, + "value": { + "type": "string", + "description": "real value inferred by the context" + } + }, + "required": [ "name", "value" ] + } + }, + "return_field": { + "type": "object", + "description": "the name and alias for the return field", + "properties": { + "name": { + "type": "string", + "description": "field name" + }, + "alias": { + "type": "string", + "description": "meaningful field alias" + } + }, + "required": [ "name", "alias" ] + } + }, + "required": [ "sql_statement", "reason", "table", "parameters", "return_field" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions/sql_select.json b/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions/sql_select.json new file mode 100644 index 00000000..956af5ef --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions/sql_select.json @@ -0,0 +1,56 @@ +{ + "name": "sql_select", + "description": "Get the specific value from table", + "parameters": { + "type": "object", + "properties": { + "sql_statement": { + "type": "string", + "description": "SQL statement with SELECT" + }, + "reason": { + "type": "string", + "description": "reason" + }, + "table": { + "type": "string", + "description": "related table" + }, + "parameters": { + "type": "array", + "description": "data criteria for the query", + "items": { + "type": "object", + "description": "the name and value for the parameter", + "properties": { + "name": { + "type": "string", + "description": "field name" + }, + "value": { + "type": "string", + "description": "real value inferred by the context" + } + }, + "required": [ "name", "value" ] + } + }, + "return_field": { + "type": "object", + "description": "the name and alias for the return field", + "properties": { + "name": { + "type": "string", + "description": "field in the table" + }, + "alias": { + "type": "string", + "description": "meaningful field alias" + } + }, + "required": [ "name", "value" ] + } + }, + "required": [ "sql_statement", "reason", "table", "parameters", "return_field" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/BotSharp.Plugin.WebDriver.csproj b/src/Plugins/BotSharp.Plugin.WebDriver/BotSharp.Plugin.WebDriver.csproj index a39eed3d..d7b640e2 100644 --- a/src/Plugins/BotSharp.Plugin.WebDriver/BotSharp.Plugin.WebDriver.csproj +++ b/src/Plugins/BotSharp.Plugin.WebDriver/BotSharp.Plugin.WebDriver.csproj @@ -25,6 +25,20 @@ + + + + + + + + + + + + + + @@ -47,6 +61,48 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/change_checkbox.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/change_checkbox.json new file mode 100644 index 00000000..ce9a34d9 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/change_checkbox.json @@ -0,0 +1,22 @@ +{ + "name": "change_checkbox", + "description": "Check or uncheck checkbox", + "parameters": { + "type": "object", + "properties": { + "element_text": { + "type": "string", + "description": "the element title" + }, + "update_value": { + "type": "string", + "description": "check or uncheck" + }, + "match_rule": { + "type": "string", + "description": "text matching rule: EndWith, StartWith, Contains, Match" + } + }, + "required": [ "element_text", "update_value", "match_rule" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/change_list_value.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/change_list_value.json new file mode 100644 index 00000000..ca2aef75 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/change_list_value.json @@ -0,0 +1,18 @@ +{ + "name": "change_list_value", + "description": "Update value from dropdown list or radio button", + "parameters": { + "type": "object", + "properties": { + "element_name": { + "type": "string", + "description": "the html selection element name." + }, + "update_value": { + "type": "string", + "description": "the value in the list." + } + }, + "required": [ "element_name", "update_value" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/check_radio_button.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/check_radio_button.json new file mode 100644 index 00000000..80e029b8 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/check_radio_button.json @@ -0,0 +1,22 @@ +{ + "name": "check_radio_button", + "description": "Check value in a radio button", + "parameters": { + "type": "object", + "properties": { + "element_text": { + "type": "string", + "description": "the element title" + }, + "update_value": { + "type": "string", + "description": "the value in the radio button." + }, + "match_rule": { + "type": "string", + "description": "text matching rule: EndWith, StartWith, Contains, Match" + } + }, + "required": [ "update_value", "element_text", "match_rule" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/click_button.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/click_button.json new file mode 100644 index 00000000..b19a11fd --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/click_button.json @@ -0,0 +1,14 @@ +{ + "name": "click_button", + "description": "Click a button in a web page.", + "parameters": { + "type": "object", + "properties": { + "element_name": { + "type": "string", + "description": "the html element name." + } + }, + "required": [ "element_name" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/click_element.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/click_element.json new file mode 100644 index 00000000..e5b08f16 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/click_element.json @@ -0,0 +1,30 @@ +{ + "name": "click_element", + "description": "Click or check an element contains some text", + "parameters": { + "type": "object", + "properties": { + "element_type": { + "type": "string", + "description": "the element tag name" + }, + "element_text": { + "type": "string", + "description": "text or placeholder shown in the element." + }, + "attribute_name": { + "type": "string", + "description": "attribute name in the element" + }, + "attribute_value": { + "type": "string", + "description": "attribute value in the element" + }, + "match_rule": { + "type": "string", + "description": "text matching rule: EndWith, StartWith, Contains, Match" + } + }, + "required": [ "element_type", "element_text", "match_rule" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/close_browser.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/close_browser.json new file mode 100644 index 00000000..15656adc --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/close_browser.json @@ -0,0 +1,10 @@ +{ + "name": "close_browser", + "description": "Close browser", + "parameters": { + "type": "object", + "properties": { + }, + "required": [] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/extract_data_from_page.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/extract_data_from_page.json new file mode 100644 index 00000000..447bc313 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/extract_data_from_page.json @@ -0,0 +1,14 @@ +{ + "name": "extract_data_from_page", + "description": "Extract data from current web page.", + "parameters": { + "type": "object", + "properties": { + "question": { + "type": "string", + "description": "the information user wants to know" + } + }, + "required": [ "question" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/go_to_page.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/go_to_page.json new file mode 100644 index 00000000..dfc37d16 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/go_to_page.json @@ -0,0 +1,14 @@ +{ + "name": "go_to_page", + "description": "go to another page", + "parameters": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "page url start with https://" + } + }, + "required": [ "url" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/input_user_password.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/input_user_password.json new file mode 100644 index 00000000..5e8c795e --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/input_user_password.json @@ -0,0 +1,14 @@ +{ + "name": "input_user_password", + "description": "Input password in current web page", + "parameters": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "user password" + } + }, + "required": [ "password" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/input_user_text.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/input_user_text.json new file mode 100644 index 00000000..2447b987 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/input_user_text.json @@ -0,0 +1,30 @@ +{ + "name": "input_user_text", + "description": "Input non-sensitive text in current web page.", + "parameters": { + "type": "object", + "properties": { + "element_text": { + "type": "string", + "description": "text or placeholder shown in the element." + }, + "input_text": { + "type": "string", + "description": "non-sensitive text user provided." + }, + "press_enter": { + "type": "boolean", + "description": "whether to press Enter key" + }, + "attribute_name": { + "type": "string", + "description": "attribute name in the element" + }, + "attribute_value": { + "type": "string", + "description": "attribute value in the element" + } + }, + "required": [ "element_text", "input_text" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/open_browser.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/open_browser.json new file mode 100644 index 00000000..e8a74a74 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/open_browser.json @@ -0,0 +1,14 @@ +{ + "name": "open_browser", + "description": "open a browser", + "parameters": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "website url starts with https://" + } + }, + "required": [ "url" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/scroll_page.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/scroll_page.json new file mode 100644 index 00000000..ee6d23d4 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/scroll_page.json @@ -0,0 +1,14 @@ +{ + "name": "scroll_page", + "description": "Scroll page down or up", + "parameters": { + "type": "object", + "properties": { + "direction": { + "type": "string", + "description": "down, up, left, right" + } + }, + "required": [ "direction" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/send_http_request.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/send_http_request.json new file mode 100644 index 00000000..6bce7491 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/send_http_request.json @@ -0,0 +1,18 @@ +{ + "name": "send_http_request", + "description": "Send http request to remote server", + "parameters": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "page url start with https://" + }, + "payload": { + "type": "string", + "description": "request body" + } + }, + "required": [ "url", "payload" ] + } +} \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/take_screenshot.json b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/take_screenshot.json new file mode 100644 index 00000000..158f72a9 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.WebDriver/data/agents/f3ae2a0f-e6ba-4ee1-a0b9-75d7431ff32b/functions/take_screenshot.json @@ -0,0 +1,10 @@ +{ + "name": "take_screenshot", + "description": "Tak screenshot to show current page screen", + "parameters": { + "type": "object", + "properties": { + }, + "required": [] + } +} \ No newline at end of file diff --git a/tests/BotSharp.Plugin.PizzaBot/BotSharp.Plugin.PizzaBot.csproj b/tests/BotSharp.Plugin.PizzaBot/BotSharp.Plugin.PizzaBot.csproj index 4328eb4d..723295af 100644 --- a/tests/BotSharp.Plugin.PizzaBot/BotSharp.Plugin.PizzaBot.csproj +++ b/tests/BotSharp.Plugin.PizzaBot/BotSharp.Plugin.PizzaBot.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 @@ -24,13 +24,18 @@ + + + + + @@ -87,6 +92,21 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + diff --git a/tests/BotSharp.Plugin.PizzaBot/data/agents/b284db86-e9c2-4c25-a59e-4649797dd130/functions/get_order_status.json b/tests/BotSharp.Plugin.PizzaBot/data/agents/b284db86-e9c2-4c25-a59e-4649797dd130/functions/get_order_status.json new file mode 100644 index 00000000..49de63fe --- /dev/null +++ b/tests/BotSharp.Plugin.PizzaBot/data/agents/b284db86-e9c2-4c25-a59e-4649797dd130/functions/get_order_status.json @@ -0,0 +1,14 @@ +{ + "name": "get_order_status", + "description": "get order status like delivery remaining time", + "parameters": { + "type": "object", + "properties": { + "order_number": { + "type": "string", + "description": "order number." + } + }, + "required": [ "order_number" ] + } +} \ No newline at end of file diff --git a/tests/BotSharp.Plugin.PizzaBot/data/agents/c2b57a74-ae4e-4c81-b3ad-9ac5bff982bd/functions/get_pizza_price.json b/tests/BotSharp.Plugin.PizzaBot/data/agents/c2b57a74-ae4e-4c81-b3ad-9ac5bff982bd/functions/get_pizza_price.json new file mode 100644 index 00000000..e2eaac31 --- /dev/null +++ b/tests/BotSharp.Plugin.PizzaBot/data/agents/c2b57a74-ae4e-4c81-b3ad-9ac5bff982bd/functions/get_pizza_price.json @@ -0,0 +1,18 @@ +{ + "name": "get_pizza_price", + "description": "call this function to get the pizza price", + "parameters": { + "type": "object", + "properties": { + "pizza_type": { + "type": "string", + "description": "The pizza type." + }, + "quantity": { + "type": "string", + "description": "quantity of pizza." + } + }, + "required": [ "pizza_type", "quantity" ] + } +} \ No newline at end of file diff --git a/tests/BotSharp.Plugin.PizzaBot/data/agents/c2b57a74-ae4e-4c81-b3ad-9ac5bff982bd/functions/get_pizza_types.json b/tests/BotSharp.Plugin.PizzaBot/data/agents/c2b57a74-ae4e-4c81-b3ad-9ac5bff982bd/functions/get_pizza_types.json new file mode 100644 index 00000000..61471e2a --- /dev/null +++ b/tests/BotSharp.Plugin.PizzaBot/data/agents/c2b57a74-ae4e-4c81-b3ad-9ac5bff982bd/functions/get_pizza_types.json @@ -0,0 +1,9 @@ +{ + "name": "get_pizza_types", + "description": "get all pizza types", + "parameters": { + "type": "object", + "properties": {}, + "required": [] + } +} \ No newline at end of file diff --git a/tests/BotSharp.Plugin.PizzaBot/data/agents/c2b57a74-ae4e-4c81-b3ad-9ac5bff982bd/functions/place_an_order.json b/tests/BotSharp.Plugin.PizzaBot/data/agents/c2b57a74-ae4e-4c81-b3ad-9ac5bff982bd/functions/place_an_order.json new file mode 100644 index 00000000..d5514fba --- /dev/null +++ b/tests/BotSharp.Plugin.PizzaBot/data/agents/c2b57a74-ae4e-4c81-b3ad-9ac5bff982bd/functions/place_an_order.json @@ -0,0 +1,22 @@ +{ + "name": "place_an_order", + "description": "Place an order when user has confirmed the pizza type and quantity.", + "parameters": { + "type": "object", + "properties": { + "pizza_type": { + "type": "string", + "description": "The pizza type." + }, + "quantity": { + "type": "number", + "description": "quantity of pizza." + }, + "unit_price": { + "type": "number", + "description": "unit price" + } + }, + "required": [ "pizza_type", "quantity", "unit_price" ] + } +} \ No newline at end of file diff --git a/tests/BotSharp.Plugin.PizzaBot/data/agents/fe8c60aa-b114-4ef3-93cb-a8efeac80f75/functions/make_payment.json b/tests/BotSharp.Plugin.PizzaBot/data/agents/fe8c60aa-b114-4ef3-93cb-a8efeac80f75/functions/make_payment.json new file mode 100644 index 00000000..82782c94 --- /dev/null +++ b/tests/BotSharp.Plugin.PizzaBot/data/agents/fe8c60aa-b114-4ef3-93cb-a8efeac80f75/functions/make_payment.json @@ -0,0 +1,18 @@ +{ + "name": "make_payment", + "description": "call this function to make payment", + "parameters": { + "type": "object", + "properties": { + "order_number": { + "type": "string", + "description": "order number." + }, + "total_amount": { + "type": "string", + "description": "total amount." + } + }, + "required": [ "order_number", "total_amount" ] + } +} \ No newline at end of file