File size: 378 Bytes
ee66a6d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os
import openai

secret_value_0 = os.environ.get("openai")

openai.api_key = secret_value_0

model_engine = "text-davinci-002"
prompt_template = "Say hello world" #prompt_template

response = openai.Completion.create(
    engine=model_engine,
    prompt=prompt_template,
    max_tokens=124,
    temperature=0.8,
    n=1,
    stop=None,
)

print(response.choices[0].text)