Private Sub Button3_Click
Py.ImportModule("openai")
Dim script As String = $"
openai.api_key = "YOUR_API_KEY"
prompt = f'What is the capital of Brazil??'
response = openai.ChatCompletion.create(
model='gpt-3.5-turbo',
messages=[{"role": "user", "content": prompt}]
)
result = response.choices[0].message.content.strip()
"$
Py.RunStatement(script).Print
End Sub