gpt-4o-2024-08-06· OpenAI
WildChat-4.8M (AI2)
Please generate a unique programming task in JSON format with the following structure: {…
- User
Please generate a unique programming task in JSON format with the following structure: { "Title": "Task Name", "Task Description": "Description of the task.", "Function Signature": "def function_name(parameters) -> return_type:", "Solve": "", "Input": "Description of the input parameters.", "Output": "Description of the expected output.", "Examples": [ { "input": "Example input here", "output": "Expected output here" }, { "input": "Another example input here", "output": "Another expected output here" } ] } Ensure that:
- The task includes nested structures.
- The task must avoid the following titles: .
- The task should be unique and complex.
- The "Solve" section should remain empty.
- Assistant
{ "Title": "Transform Nested Dictionary to Nested String Representation", "Task Description": "Write a function that takes a nested dictionary and transforms it into a nested string representation, where each level of nesting is represented by increasing levels of indentation with a specified number of spaces. Each key-value pair should be represented in the format 'key: value', with nested dictionaries being expanded recursively.", "Function Signature": "def transform_nested_dict_to_string(nested_dict: dict, indent_spaces: int) -> str:", "Solve": "", "Input": "The function receives two inputs: a nested dictionary containing various levels of nested dictionaries, and an integer representing the number of spaces for indentation at each level.", "Output": "A string that represents the nested dictionary, formatted with the specified indentation for each level of nesting.", "Examples": [ { "input": "{'name': 'Alice', 'details': {'age': 25, 'address': {'city': 'Wonderland', 'zipcode': '12345'}}}, 4", "output": "'name: Alice\\n details:\\n age: 25\\n address:\\n city: Wonderland\\n zipcode: 12345\\n'" }, { "input": "{'key1': 'value1', 'key2': {'subkey1': 'subvalue1', 'subkey2': {'deepkey': 'deepvalue'}}}, 2", "output": "'key1: value1\\n key2:\\n subkey1: subvalue1\\n subkey2:\\n deepkey: deepvalue\\n'" } ] }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.