Skip to content

[BUG] AzureOpenAIService gives error on Get Completions #3696

Open
@lordneeko

Description

Type of Connector

Custom Connector

Name of Connector

AzureOpenAIService

Describe the bug

The AzureOpenAIService connector gives the same error on both the Dev branch and the Master branch, using both Get Completions and Get Chat Completions.

The error is:
BadRequest. Http request failed: the content was not a valid JSON. Error while parsing JSON: 'Unexpected character encountered while parsing value: U. Path '', line 0, position 0.'

Here are the raw inputs for the call (the JSON error isn't in here)
{ "host": { "connectionReferenceName": "shared_azureopenaiservice-5fc74f43d271e81e40-5ffe705c20f15fa55a", "operationId": "CreateCompletion" }, "parameters": { "deployment-id": "gpt-4o", "api-version": "2022-12-01", "body/prompt": "How are you?", "body/initial_scope": "You are a helpful assistant", "body/max_tokens": 100, "body/temperature": 0.2, "body/top_p": 1, "body/n": 1, "body/echo": false, "body/presence_penalty": 0, "body/frequency_penalty": 0, "body/best_of": 1 } }

I've looked through the code, but cannot figure out what may be causing this error

I've validated that my setup is correct, because the actions "Get Models" and "Get Deployments" work and return the information I expect from the AzureOpenAI service I have running in my Azure environment.

Is this a security bug?

No, this is not a security bug

What is the severity of this bug?

Severity 1 - Connector is broken or there's a very serious issue

To Reproduce

Use the Get Completions or Get Chat Completions actions

Expected behavior

The actions would work and return the results from the service

Environment summary

Power Automate Custom Connector - I used the "Add from GitHub" feature

Additional context

NA

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions