Skip to main content

Notifications

Power Automate - Using Connectors
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:
  • Gdarmon Outlook Profile Picture
    Gdarmon Outlook 372 on at
    Re: Error on OpenAI connector

    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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard

Featured topics