web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Error on OpenAI connector
Power Automate
Unanswered

Error on OpenAI connector

(0) ShareShare
ReportReport
Posted on by

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

Categories:
I have the same question (0)
  • Gdarmon Outlook Profile Picture
    372 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 378

#2
Valantis Profile Picture

Valantis 329

#3
David_MA Profile Picture

David_MA 283 Super User 2026 Season 1

Last 30 days Overall leaderboard