import openai

api_key = "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"  # Replace with your actual API key
openai.api_key = api_key

prompt_q = ["Tell me 4 adult kinks that are relating to men. be creative"]
prompt_q= prompt_q*10
engine = "text-davinci-003"
max_tokens = 256
num_sample = 1
temperature = 0.5

try:
    response = openai.Completion.create(
        engine=engine,
        prompt=prompt_q,
        max_tokens=max_tokens,
        n=num_sample,
        temperature=temperature,
        logprobs=5,
    )
    #print("Full API response:")
    #print(response.choices)
    for choice in response.choices:
        generated_text = choice.text
        print("\nGenerated text:")
        print(generated_text)

except Exception as e:
    print(f"An error occurred: {e}")
