Hi,
I'm building an app where the user has to fill in about 10 Text inputs. After filling those in they click a button. In the onselect on that button I'm converting the input to parameters for OpenAI, combining them in a varPrompt. After that, the button is supposed to send this to OpenAI.
To connect to openAI i'm using a connector. You can find the info on the connector over here: https://learn.microsoft.com/en-us/connectors/openaiip/
This is the code i'm using
ClearCollect(Colresponse,
OpenAI_conn.CompletionV2({
model: "gpt-3.5-turbo",
prompt: "example text " & varPrompt,
n: 1,
best_of: 1,
temperature: 0.3,
max_tokens: 150,
top_p: 1.0,
frequency_penalty: 0,
presence_penalty: 0,
stop: [""]
})
);
i keep getting the error Invalid number of arguments: received 1, expected 2-3
hi,
try removing the curly brackets from the call to CompletionV2
ClearCollect(Colresponse,
OpenAI_conn.CompletionV2(
model: "gpt-3.5-turbo",
prompt: "example text " & varPrompt,
n: 1,
best_of: 1,
temperature: 0.3,
max_tokens: 150,
top_p: 1.0,
frequency_penalty: 0,
presence_penalty: 0,
stop: [""])
);
If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.
Gill