import requests # Send a GET request response = requests.get("https://api.manifold.markets/v0/slug/chatgpt-chooses-which-option-will-w") data = response.json() # Sort answers by probability in descending order and extract the text field sorted_answers = sorted(data['answers'], key=lambda x: x['probability'], reverse=True) answers_text = [f"- {answer['text']}" for answer in sorted_answers] # Construct the prompt prompt = "I need you to choose which option you want to win. You may choose in whatever way you like, but you must choose one and only one of the options listed here:\n\n" + '\n'.join(answers_text) print(prompt)