Skip to main content

Notifications

Copilot Studio - Calling Actions from Copilot S...
Answered

Intergating ChatGPT OpenAI with HTTP request in PVA

(0) ShareShare
ReportReport
Posted on by 23

I am setting up the OpenAI ChatGPT configuration using the API through an HTTP request but encountered this error. The parameters have been set up and successfully tested on Postman; however, when trying on PVA (Power Virtual Agents),
I get the error "Sorry, something went wrong. Error code: SystemError. Conversation ID: 6a2e80ed-0616-481c-a90d-f57a0df49cd8. Time (UTC): 11/9/2023 4:08:20 AM." I will provide the HTTP configuration image below.

Sonnt_0-1699513800044.png

 

Sonnt_0-1699503268165.png

Categories:
  • jpiabrantes Profile Picture
    jpiabrantes 29 on at
    Re: Intergating ChatGPT OpenAI with HTTP request in PVA

    I am also trying to call OpenAI API from CoPilot Studio. Is there a way to use the user message in Body (JSON) of the HTTP Request?

  • Verified answer
    Sonnt Profile Picture
    Sonnt 23 on at
    Re: Intergating ChatGPT OpenAI with HTTP request in PVA

    Dear @Damian2@HenryJammes 
    You should be change response data type as "Get from sample data" 
    and Go to Test and select a value variable.
    Thank you!
    Best,
    Sonnt

    Sonnt_3-1699689168696.png

    Sonnt_4-1699689250113.png

    Sonnt_5-1699689264713.png

     

  • Sonnt Profile Picture
    Sonnt 23 on at
    Re: Intergating ChatGPT OpenAI with HTTP request in PVA

    Hi @HenryJammes 
    Thank for you suggestion,
    I changed the "Content-Type" key in my header, it is the same original OpenAI header (figure 1), but the same issue (figure 2-3). 
    I have an ideal about my issues, can you suggest me about 'Save response as' in HTTP request
    based on Open AI responses. 
    {
    "id": "chatcmpl-123",
    "object": "chat.completion",
    "created": 1677652288,
    "model": "gpt-3.5-turbo-0613",
    "system_fingerprint": "fp_44709d6fcb",
    "choices": [{
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "\n\nHello there, how may I assist you today?",
    },
    "finish_reason": "stop"
    }],
    "usage": {
    "prompt_tokens": 9,
    "completion_tokens": 12,
    "total_tokens": 21
    }
    }
    Thanks you so much!
    Best,
    Sonnt,

    Sonnt_0-1699685084761.png

    Sonnt_1-1699685341297.pngSonnt_2-1699685358008.png

     


     

  • HenryJammes Profile Picture
    HenryJammes on at
    Re: Intergating ChatGPT OpenAI with HTTP request in PVA

    Question: can you check how you wrote the "Content-Type" key in your header?
    API Reference - OpenAI API

  • Sonnt Profile Picture
    Sonnt 23 on at
    Re: Intergating ChatGPT OpenAI with HTTP request in PVA

    Dear @HenryJammes ,
    I already converted the content to Formula (Power Fx) as your suggestion, but the same this issue. 
    If you tested for succession, please to share for us, 
    Thank you so much!
    Best, 
    Sonnt 

    Sonnt_0-1699584800230.png

     



  • HenryJammes Profile Picture
    HenryJammes on at
    Re: Intergating ChatGPT OpenAI with HTTP request in PVA

    Hi @Sonnt@Damian2,

     

    Not 100% sure it's the same issue, but there is one known issue for which a fix is coming.

    The error occurs when you use JSON in your request's body.

     

    As a workaround, instead of JSON, can you convert the content to Formula (Power Fx) and try again?

     

    Henry

  • Sonnt Profile Picture
    Sonnt 23 on at
    Re: Intergating ChatGPT OpenAI with HTTP request in PVA

    Dear Damian,
    We are waiting for this issue from Microsoft experts.
    Thank you

  • DamianSu Profile Picture
    DamianSu 10 on at
    Re: Intergating ChatGPT OpenAI with HTTP request in PVA

    Hello, I have the same problem. I'm trying to integrate Language Studio Custom Question Answering but it's not working. From Postman and even in Bot Framework Composer it works normally. I tried every possible option to do it...
    Screenshot 2023-11-09 094109.jpgScreenshot 2023-11-09 094202.png

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,495

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,822

Leaderboard

Featured topics