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 / HTTP Connector for Ope...
Power Automate
Unanswered

HTTP Connector for OpenAI with DataSources error

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi there,

 

I am using the HTTP connector for calls to the OpenAI API on Azure. It works great.

I am now trying to add in the JSON files "Datasources" to leverage Azure Cognitive Search.

 

{
"dataSources": [
{
"type": "AzureCognitiveSearch",
"parameters": {
"endpoint": "https://XXXXXXXXXXXXXXX.search.windows.net",
"key": "XXXXXXXXXXXXXXXXXXXXXXX",
"indexName": "XXXXXXXX"
}
}
],
"messages": [
{
"role": "system",
"content": "You are a Digital Assistant ........"
},
{
"role": "user",
"content": "@{variables('text')}. Write an @{variables('media')}"
}
],
"temperature": 0.5,
"top_p": 0.95,
"frequency_penalty": 0,
"presence_penalty": 0,
"max_tokens": 800,
"stop": null
}

 

I got an error when running the automation: "Unrecognized request argument supplied: dataSources".

ref: Using your data with Azure OpenAI Service - Azure OpenAI | Microsoft Learn

any clue?

thanks

Jerome

Categories:
I have the same question (0)
  • mrzhou Profile Picture
    7 on at

    I have the same question. Can anyone answer it😀

  • JEROMEMAS Profile Picture
    Microsoft Employee on at

    Hi, apparently this has nothing to do with PowerAutomate. Using the same JSON I am getting the same error when POSTing it with Visual Studio Code.

    {
    "error": {
    "message": "Unrecognized request argument supplied: dataSources",
    "type": "invalid_request_error",
    "param": null,
    "code": null
    }
    }

  • JEROMEMAS Profile Picture
    Microsoft Employee on at

    the doc Azure OpenAI Service REST API reference - Azure OpenAI | Microsoft Learn mentioned that the supported version is api-version=2023-06-01-preview .. I even tried the 2023-07-01-preview .... same results!

  • JEROMEMAS Profile Picture
    Microsoft Employee on at

    Ok .. got it. We should add "extensions" in the URL https://xxxxxxx/openai/deployments/gpt35/extensions/chat/completions?api-version=2023-07-01-preview

  • mrzhou Profile Picture
    7 on at
    Great, thank you very much.
  • murphy-brian Profile Picture
    4 on at

    How did you figure out the "extensions" in the URL? This has been driving me crazy and I even deployed the WEB App and hacked the code to compare it to what I was trying to use in POSTMAN.  

  • murphy-brian Profile Picture
    4 on at

    Never mind I went back and read each example in the documentation and see the "extensions" in the url when you include the "datasources" in payload.

  • CCCProject Profile Picture
    11 on at

    I included the extensions in the URL but it still keeps giving me the error: 

     

    The extensions chat completions operation must have at least one extension.

     

     

    Here's my body:

     

    { 
     "messages": [ 
     { 
     "role": "user", 
     "content": "Hi" 
     } 
     ], 
     "extensions": [ 
     { 
     "type": "default", 
     "settings": { 
     "temperature": 0.7, 
     "top_p": 0.95, 
     "frequency_penalty": 0, 
     "presence_penalty": 0, 
     "max_tokens": 110, 
     "stop": null 
     } 
     } 
     ], 
     "azureSearchEndpoint": "https://XXXX.net", 
     "azureSearchKey": "XXXXXXXXXX", 
     "azureSearchIndexName": "XXXXXXX" 
    } 

     

     

    P.S. there's no issue with the usual HTTP request to it, it's just the addition of the document that's making the isssues.

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard