I have added the library, but I cannot find how get any result. I'm trying to get the answer after I did click on a button. I will pass some text as a variable. However, I cannot see any event that gives me some light in the Run Server Actions. The PostCompletions expects a Request expression, but I'm not sure what it's. Previously, I created an app using a similar code to this one with JS:
let configuration = new Configuration({ apiKey: 'MY_KEY' });
let openai = new OpenAIApi(configuration);
const response = await openai.createChatCompletion({
model: 'gpt-3.5-turbo-0301',
messages: 'MY_REQUEST',
max_tokens: 256
});
let response = response.data.choices[0].message?.content;
Also, is it only for the model 'text-davinci-003'. This one is a little bit easier:
const response = await openai.createCompletion({
model: 'text-davinci-003' ,
prompt: 'MY_REQUEST',
let response = response.data.choices[0].text;
Thanks for any support.
hi, did you play the demo? check the documentation.
@Joao Pais can also add a "try" to the forge asset?
regards,