You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"skeleton": "import numpy as np\n\nclass Add_numbers:\n\"\"\"\n This class adds numbers.\n\"\"\"\n\n def __init__(self):\n pass\n\n def add(self, x, y):\n\"\"\"\n Add the two numbers\n :param x: float, first number\n :param y: float, second number\n :return: float, sum of the two numbers\n >>> adder = Add_numbers()\n >>> adder.add(1,2)",
6
+
"solution_code": "No solution code provided.",
7
+
"import_statement": [
8
+
"import numpy as np"
9
+
],
10
+
"class_description": " \"\"\"\n This class adds numbers.\n\"\"\"\n",
"method_description": "def filter(self, request):\n\"\"\"\n Filter the incoming request based on certain rules and conditions.\n :param request: dict, the incoming request details\n :return: bool, True if the request is allowed, False otherwise\n >>> filter = AccessGatewayFilter()\n >>> filter.filter({'path': '/login', 'method': 'POST'})\n True\n\n\"\"\"",
22
+
"test_class": "AddTest",
23
+
"test_code": "pass",
24
+
"dependencies": {
25
+
"Standalone": True,
26
+
"lib_dependencies": [],
27
+
"field_dependencies": [],
28
+
"method_dependencies": []
29
+
}
30
+
}
31
+
]
32
+
}
33
+
34
+
35
+
sample=Sample(
36
+
input='Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n ### Instruction:\n Please complete the class Add_numbers in the following code.\nimport numpy as np\n\nclass Add_numbers:\n """\n This class adds numbers.\n """\n\n def __init__(self):\n pass\n\n def add(self, x, y):\n """\n Add the two numbers\n :param x: float, first number\n :param y: float, second number\n :return: float, sum of the two numbers\n >>> adder = Add_numbers()\n >>> adder.add(1,2)\n\n ### Response:\n ',
37
+
choices=None,
38
+
target='No solution code provided.',
39
+
id='ClassEval_demo',
40
+
metadata={'task_id': 'ClassEval_demo', 'skeleton': 'import numpy as np\n\nclass Add_numbers:\n """\n This class adds numbers.\n """\n\n def __init__(self):\n pass\n\n def add(self, x, y):\n """\n Add the two numbers\n :param x: float, first number\n :param y: float, second number\n :return: float, sum of the two numbers\n >>> adder = Add_numbers()\n >>> adder.add(1,2)', 'test': 'No test code provided.', 'solution_code': 'No solution code provided.', 'import_statement': ['import numpy as np'], 'class_description': ' """\n This class adds numbers.\n """\n', 'methods_info': [{'method_name': 'add', 'method_description': 'def filter(self, request):\n """\n Filter the incoming request based on certain rules and conditions.\n :param request: dict, the incoming request details\n :return: bool, True if the request is allowed, False otherwise\n >>> filter = AccessGatewayFilter()\n >>> filter.filter({\'path\': \'/login\', \'method\': \'POST\'})\n True\n\n """', 'test_class': 'AddTest', 'test_code': 'pass', 'dependencies': {'Standalone': True, 'lib_dependencies': [], 'field_dependencies': [], 'method_dependencies': []}}], 'class_name': 'Add_numbers', 'test_classes': ['AddTest'], 'class_constructor': 'class Add_numbers: \n def __init__(self):\n pass\n\n', 'fields': []},
41
+
sandbox=None,
42
+
files=None,
43
+
setup=None,
44
+
)
45
+
46
+
47
+
prompt=r'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
48
+
49
+
### Instruction:
50
+
Please complete the class Add_numbers in the following code.
input='Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n ### Instruction:\n Please complete the class Add_numbers in the following code.\nimport numpy as np\n\nclass Add_numbers:\n """\n This class adds numbers.\n """\n\n def __init__(self):\n pass\n\n def add(self, x, y):\n """\n Add the two numbers\n :param x: float, first number\n :param y: float, second number\n :return: float, sum of the two numbers\n >>> adder = Add_numbers()\n >>> adder.add(1,2)\n\n ### Response:\n 'choices=Nonetarget='No solution code provided.'id='ClassEval_demo'metadata={'task_id': 'ClassEval_demo', 'skeleton': 'import numpy as np\n\nclass Add_numbers:\n """\n This class adds numbers.\n """\n\n def __init__(self):\n pass\n\n def add(self, x, y):\n """\n Add the two numbers\n :param x: float, first number\n :param y: float, second number\n :return: float, sum of the two numbers\n >>> adder = Add_numbers()\n >>> adder.add(1,2)', 'test': 'No test code provided.', 'solution_code': 'No solution code provided.', 'import_statement': ['import numpy as np'], 'class_description': ' """\n This class adds numbers.\n """\n', 'methods_info': [{'method_name': 'add', 'method_description': 'def filter(self, request):\n """\n Filter the incoming request based on certain rules and conditions.\n :param request: dict, the incoming request details\n :return: bool, True if the request is allowed, False otherwise\n >>> filter = AccessGatewayFilter()\n >>> filter.filter({\'path\': \'/login\', \'method\': \'POST\'})\n True\n\n """', 'test_class': 'AddTest', 'test_code': 'pass', 'dependencies': {'Standalone': True, 'lib_dependencies': [], 'field_dependencies': [], 'method_dependencies': []}}], 'class_name': 'Add_numbers', 'test_classes': ['AddTest'], 'class_constructor': 'class Add_numbers: \n def __init__(self):\n pass\n\n', 'fields': []} sandbox=Nonefiles=Nonesetup=None
0 commit comments