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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard