Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Architect flow publish failing while integrating ChatGPT Data Action

    Posted 10-09-2023 02:28
    No replies, thread closed.

    Hello folks,

    I am trying to create a flow in architect that will retrieve transcript summarization from ChatGPT. While the data action is successful separately to perform the task however when i am using the Data Action in the flow, it is not allowing me to publish the flow.

     Requesting your inputs here. Data Action JSON you can find below-

    --------------------------------------------------------------------------------------------

    {
      "name": "SummarizeTranscript - Exported 2023-10-09 @ 11:52",
      "integrationType": "custom-rest-actions",
      "actionType": "custom",
      "config": {
        "request": {
          "requestUrlTemplate": "https://api.openai.com/v1/chat/completions",
          "requestType": "POST",
          "headers": {
            "Authorization": "Bearer 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",
            "Content-Type": "application/json"
          },
          "requestTemplate": "{\n   \"model\":\"gpt-3.5-turbo\",\n   \"messages\":[\n      {\n         \"role\": \"user\",\n         \"content\": \"make a summary in one paragraph and not more than 100 words of ${input.transcript}\"\n      }\n   ],\n   \"temperature\":0.7\n}"
        },
        "response": {
          "translationMap": {
            "messageValue": "$.choices[0].message.content"
          },
          "translationMapDefaults": {},
          "successTemplate": "{\"response\": \"$esc.jsonString(${messageValue})\"}"
        }
      },
      "contract": {
        "input": {
          "inputSchema": {
            "type": "object",
            "properties": {
              "transcript": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        },
        "output": {
          "successSchema": {
            "type": "object",
            "properties": {
              "response": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        }
      },
      "secure": false
    }


    #ArchitectureandDesign

    ------------------------------
    Swarup Das
    Accenture Solutions Private Limited
    ------------------------------


  • 2.  RE: Architect flow publish failing while integrating ChatGPT Data Action

    Posted 10-09-2023 12:05
    No replies, thread closed.

    1) If that authorization bearer value is real, go change your password.  In the future, always strip out any value that comes from real auth credentials.
    2) What specific error are you getting?



    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 3.  RE: Architect flow publish failing while integrating ChatGPT Data Action

    Posted 02-07-2024 22:01
    No replies, thread closed.

    Hey Swarup, 

    How did you go with the summarization? 
    Keen to see how you dealt with getting the transcript from the URL and making sense of it before passing it to ChatGPT

    Will 



    ------------------------------
    Will Bellerby
    CXLOGIQ LIMITED
    ------------------------------



  • 4.  RE: Architect flow publish failing while integrating ChatGPT Data Action

    Posted 02-08-2024 05:46
    No replies, thread closed.

    Hey all, 

    I have done this - although in a different way. 

    I want to raise something here that I'm sure you're aware of but good for visibility to a wider audience. If you are passing full transcripts to OpenAi please be aware of their use of the data. If the transcripts contain PII it's a risky (potentially illegal) move from a security and privacy perspective. Generally using the OAI endpoints leads to training the model etc. 

    I have currently deployed a voice and chat summarisation, wrap-up code picking, resolution setting etc bot with an OAI Azure deployment. Even though this way does not use your data for training and is secure, we treat the transcript before sending the data to the model. Making a best effort to remove PII prior. We use the recording API to get the raw conversation json, and then parse the conversation to make it easier(?)/more consistent for the model to summarise. 

    We then give it pre instructions 

    "

    You are a contact center representative. You have a transcript of a conversation with a customer. Your task is to summarize this conversation for the notes section in our call system. In your summary:
     
    Focus on the main issue raised by the customer, the solutions or suggestions you offered, and any agreed actions or follow-up steps.
    Do not include any personal information such as names, dates of birth, or email addresses.
    Keep the summary concise yet informative, ideally within 100 words.
    Use clear and straightforward language, avoiding industry-specific jargon.
    If you encounter ambiguous or unclear information in the conversation, note it as unclear.
    Your summaries will be reviewed, and you will receive feedback to help improve future summaries
     
    Below is the conversation:"
    This then gives the model clear instructions for expected output.

    We then take the response, rebuild the note along with any agent-submitted notes and re-write it back into Genesys, along with any updates to wrap code or call resolution tag. 
    I would be happy to chat with anyone doing this as I'm always looking for ways to better our deployment or help others :)


    ------------------------------
    Lawrence Drayton
    Prvidr Pty Ltd
    ------------------------------



  • 5.  RE: Architect flow publish failing while integrating ChatGPT Data Action

    Posted 02-08-2024 19:55
    Edited by Will Bellerby 02-08-2024 19:54
    No replies, thread closed.

    Thanks Lawrence.

    Regarding PII and PCI, don't forget you can enable automatic redaction of such data. I'm sure you know but adding for anyone else reading.

    https://help.mypurecloud.com/articles/enable-automatic-redaction-of-sensitive-information/



    ------------------------------
    Will Bellerby
    CXLOGIQ LIMITED
    ------------------------------



  • 6.  RE: Architect flow publish failing while integrating ChatGPT Data Action

    Posted 02-08-2024 21:29
    No replies, thread closed.

    Yes, correct - though I think depending on the API, the limiting of PII is done at the front end of Genesys and not at the raw transcript. So depending on how you are retrieving the content it can still have PII



    ------------------------------
    Lawrence Drayton
    Prvidr Pty Ltd
    ------------------------------



  • 7.  RE: Architect flow publish failing while integrating ChatGPT Data Action

    Posted 02-08-2024 22:03
    No replies, thread closed.

    Well, after a bit of fun on a Friday afternoon... I took away the Recording > Recording > ViewSensitiveData permission from my data action Oauth role, ran the Transcript API and got the below result:

    [
      "hi",
      "hello you are speaking with how can i help",
      "hi i just want to make a payment on my account",
      "sure thing what's what's your credit card number",
      "my credit card number is [CARD_NUMBER]",
      "the expiry date is [CARD_EXPIRY_DATE] and the name is [CARD_EXPIRY_DATE]",
      "that's excellent thank you very much i'll just process your payment now",
      "thanks",
      "okay that's all done is there anything else i can help you with",
      "no not today thank you",
      "okay great have a great day",
      "goodbye",
      "goodbye"
    ]



    ------------------------------
    Will Bellerby
    CXLOGIQ LIMITED
    ------------------------------



  • 8.  RE: Architect flow publish failing while integrating ChatGPT Data Action

    Posted 02-08-2024 22:27
    No replies, thread closed.

    Ah brilliant! Really good to know actually! I'll be changing my workflow to use an oauth that does not have the view sensitive data permission - makes my life easier!

    Thanks so much for that mate :)



    ------------------------------
    Lawrence Drayton
    Prvidr Pty Ltd
    ------------------------------