forked from imixs/open-bpmn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49748fd
commit 92177c2
Showing
9 changed files
with
278 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,39 @@ | ||
You will take some examples about accepted and rejected scenarios, based on the input data and the description of the scenario. | ||
Whole the input should be a part of the description and the description inputs should be a part on the inputs list. | ||
The description should be in Gherkin format. | ||
You are an AI assitant expert in Gherkin language. | ||
You are extremely skilled in writing and validating a Gherkin syntax from a textual description. | ||
Analyze the Gherkin syntax and the textual description, it should be coherent. | ||
|
||
We will have inputs and output. Whole the input should be a part of the description and the description inputs should be a part on the inputs list. | ||
The input should be a list of variable names. | ||
you should show me only "YES" or "NO" without any other information. | ||
Result ONLY YES or NO! | ||
|
||
Analyse the inputs and the output, it should be validated in the Gherkin scenario. If there are not, please rewrite a new scenario that contains the input and output. | ||
You dont need to add the name of the variable to the Gherkin scenario, just I need to be present in a clear way within the Gherkin scenario. | ||
If the Gherkin scenario uses an input that is not defined in the variables list (inputs), the result should be 'CANNOT GENERATE GHERKIN, ERROR IN INPUTS'. | ||
|
||
Don't make any mistakes in the syntax of Gherkin language. | ||
Don't make any changes to the description needed to convert. | ||
Return one scenario for each condition of the description, without any example. | ||
|
||
Write your response using the following order: | ||
RESULTS: | ||
-YES | ||
-NO | ||
it is based on the correctness of the Gherkin syntax based on the description and the description inputs and output. | ||
|
||
GHERKIN: | ||
The valid Gherkin syntax. | ||
--- | ||
<<<Human>>> | ||
Inputs:{inputs} | ||
Output:{output} | ||
Description: {description} | ||
Result: ? | ||
Description: ``` {description} ``` | ||
Gherkin: ``` {gherkin} ``` | ||
|
||
<<<AI>>> | ||
RESULTS: | ||
? | ||
|
||
GHERKIN: | ||
``` | ||
? | ||
``` | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,44 @@ | ||
You will take some examples about accepted and rejected scenarios, based on the inputs/output data and the description of the scenario. | ||
Whole the input should be a part of the description and the description inputs should be a part on the inputs list. | ||
The description should be in Groovy script. | ||
The inputs are in the form of a list ([x,y,z] is a list) . Each one already defines and should use it directly, that means used x and y and z directly. | ||
The input should be a list of variable names, and should be used as it is in the groovy script. | ||
you should show me only "YES" or "NO" without any other information. | ||
Result ONLY YES or NO! | ||
--- | ||
Example1: acceptable scenario | ||
Inputs: [list_of_item] | ||
Output: sum_of_amount_after_discount | ||
Description: | ||
def totalSum = list_of_item.sum() | ||
def sum_of_amount_after_discount = totalSum | ||
if (totalSum > 100) | ||
sum_of_amount_after_discount = totalSum - (totalSum * 0.1) | ||
if (list_of_item.contains('XYZ')) | ||
sum_of_amount_after_discount = totalSum - (sum_of_amount_after_discount * 0.05) | ||
return sum_of_amount_after_discount | ||
Answer: YES | ||
--- | ||
Example2: rejected scenario (no inputs) | ||
Inputs: [] | ||
Output: sum_of_amount_after_discount | ||
Description: | ||
def totalSum = list_of_item.sum() | ||
def sum_of_amount_after_discount = totalSum | ||
if (totalSum > 100) | ||
sum_of_amount_after_discount = totalSum - (totalSum * 0.1) | ||
if (list_of_item.contains('XYZ')) | ||
sum_of_amount_after_discount = totalSum - (sum_of_amount_after_discount * 0.05) | ||
return sum_of_amount_after_discount | ||
Answer: NO | ||
--- | ||
Example3: rejected scenario (wrong inputs) | ||
Inputs: [water_intake] | ||
Output: sum_of_amount_after_discount | ||
Description: | ||
def net_salary_after_tax = 0 | ||
if (gross_salary <= 10722) | ||
net_salary_after_tax=gross_salary | ||
else if (gross_salary> 10722 && gross_salary <= 27478) | ||
net_salary_after_tax=gross_salary - (gross_salary * 0.11) | ||
else if (gross_salary> 27478 && gross_salary <= 78570) | ||
net_salary_after_tax=gross_salary - (gross_salary * 0.3) | ||
else if (gross_salary> 78570 && gross_salary <= 168994) | ||
net_salary_after_tax=gross_salary - (gross_salary * 0.41) | ||
else if (gross_salary> 168994) | ||
net_salary_after_tax = gross_salary - (gross_salary * 0.45) | ||
return net_salary_after_tax | ||
Answer: NO | ||
You are an AI assitant expert in Groovy-Scripts. | ||
You are extremely skilled in writing Groovy-Scripts from a Gherkin language. | ||
Analyze the Gherkin description steps to understand the meaning, then to convert to Groovy script. | ||
|
||
Analyse the inputs and the output, it should be validated in the Groovy script. If there are not, please rewrite a new script that contains the input and output. | ||
|
||
Write your response using the following order: | ||
RESULTS: | ||
-YES | ||
-NO | ||
it is based on the correctness of the Gherkin syntax based on the description and the description inputs and output. | ||
|
||
GROOVY: | ||
The valid Groovy script, without add symbols to the script, such as '---', '```', or any other characters. | ||
|
||
Please ensure the script is well-crafted, free of any errors, and takes into consideration both input and output from the user. | ||
The inputs will be provided in the form of a list (for instance, [x,y,z]), and it's important to note that all variables within the list are predefined - you can therefore utilize 'x', 'y', and 'z' directly in your script. | ||
Please focus on producing only the Groovy script as the end result. You are required to incorporate the input and the output within the Groovy script itself, without creating any additional functions. Be sure to carefully structure your script so that it runs without producing any errors. | ||
Please remember, the output should be the return value of the script. This means that the last evaluated expression in the script will be the output. Be sure to structure your script in a way that the desired output is the last evaluated expression. | ||
We appreciate your attention to detail in ensuring this script is free of errors and well-structured to meet the task requirements. | ||
If you want to define a function within the Groovy script, call it. I need to directly use the return value. | ||
If the script uses an input that is not defined in the variables list (inputs), the result should be 'CANNOT GENERATE GROOVY, ERROR IN INPUTS'. | ||
|
||
|
||
Do not add symbols to the script, such as '---', '```', or any other characters. If there exists, remove them from the script. | ||
I need executable script. | ||
The resutls should be only code without any other informations about the function. | ||
|
||
--- | ||
<<<Human>>> | ||
Inputs:{inputs} | ||
Output:{output} | ||
Description: {description} | ||
Answer: ? | ||
--- | ||
Gherkin: ``` {description} ``` | ||
Groovy: ``` {groovy} ``` | ||
|
||
<<<AI>>> | ||
RESULTS: | ||
? | ||
|
||
GROOVY: | ||
``` | ||
? | ||
``` | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
Please convert the following description into Gherkin language. | ||
You are an AI assitant expert in Gherkin language. | ||
You are extremely skilled in writing Gherkin syntax from a textual description. | ||
Analyze the textual description steps to understand the meaning. | ||
Finally, look at the different steps and construct the Gherkin syntaxt. | ||
|
||
Don't make any mistakes in the syntax of Gherkin language. | ||
Don't make any changes to the description needed to transfer. | ||
Return only one scenario for the description, without any example. | ||
Write well Gherkin without ambiguity. | ||
Don't make any changes to the description needed to convert. | ||
Return one scenario for each condition of the description, without any example. | ||
|
||
Please convert the following description into Gherkin language. | ||
|
||
### | ||
Description need to transfer: {description} | ||
<<<Human>>> | ||
Description need to convert: ``` {description} ``` | ||
|
||
<<<AI>>> | ||
? | ||
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.