{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"bigcodebench","formal_name":"BigCodeBench","introduction":"BigCodeBench poses 1,140 function-level tasks drawn across 139 libraries. It tests whether a model can compose several real APIs correctly rather than write one self-contained function.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://bigcode-bench.github.io/","indexing_mode":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"3a0ca97c-3ef5-550e-a1c0-cc93faec673d","task_key":"default--v0~2e1~2e0~5fhf--3a0ca97c-3ef5-550e-a1c0-cc93faec673d","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 3a0ca97c-3ef5-550e-a1c0-cc93faec673d","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import cgi\\nimport http.server\\nimport json\\ndef task_func():\\n\",\"complete_prompt\":\"import cgi\\nimport http.server\\nimport json\\n\\ndef task_func():\\n    \\\"\\\"\\\"\\n    The function creates an HTTP POST request handler for processing incoming data. The data is expected to be in JSON format with a key 'data'. The handler responds with a 200 success message if the data is valid, or an error message otherwise.\\n\\n    Notes:\\n    - If the 'Content-Type' header is not 'application/json', the server responds with a 400 Bad Request status and a JSON object:\\n      {\\\"status\\\": \\\"error\\\", \\\"message\\\": \\\"Content-Type header is not application/json\\\"}.\\n    - If the received JSON object does not contain a 'data' key, the response is a 400 Bad Request with a JSON object:\\n      {\\\"status\\\": \\\"error\\\", \\\"message\\\": \\\"No data received\\\"}.\\n    - For successfully processed requests, the server responds with a 200 OK status and a JSON object:\\n      {\\\"status\\\": \\\"success\\\", \\\"message\\\": \\\"Data received successfully.\\\"}.\\n\\n    Returns:\\n    class: A class that is a subclass of http.server.BaseHTTPRequestHandler, designed to handle HTTP POST requests.\\n\\n    Requirements:\\n    - cgi\\n    - http.server\\n    - json\\n\\n    Example:\\n    >>> handler = task_func()\\n    >>> server = http.server.HTTPServer(('127.0.0.1', 8080), handler)\\n    >>> server.serve_forever()\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"The function creates an HTTP POST request handler for processing incoming data. The data is expected to be in JSON format with a key 'data'. The handler responds with a 200 success message if the data is valid, or an error message otherwise.\\nNote that: Notes: If the 'Content-Type' header is not 'application/json', the server responds with a 400 Bad Request status and a JSON object: {\\\"status\\\": \\\"error\\\", \\\"message\\\": \\\"Content-Type header is not application/json\\\"}. If the received JSON object does not contain a 'data' key, the response is a 400 Bad Request with a JSON object: {\\\"status\\\": \\\"error\\\", \\\"message\\\": \\\"No data received\\\"}. For successfully processed requests, the server responds with a 200 OK status and a JSON object: {\\\"status\\\": \\\"success\\\", \\\"message\\\": \\\"Data received successfully.\\\"}.\\nThe function should output with:\\n    class: A class that is a subclass of http.server.BaseHTTPRequestHandler, designed to handle HTTP POST requests.\\nYou should write self-contained code starting with:\\n```\\nimport cgi\\nimport http.server\\nimport json\\ndef task_func():\\n```\",\"libs\":\"['http', 'cgi', 'json']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}