ChatGPT API

import openai

import os

openai.api_key = “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”

prompt = “Translate the following English text to Korean: ‘Hello, how are you?'”

response = openai.Completion.create(

    engine=”text-davinci-003″,

    prompt=prompt,

    max_tokens=1024,

    n=1,

    stop=None,

    temperature=0.5,

)