Hi All
I may be doing something wrong here but trying to have a play with the new service responses from the conversation.process.
Apart from simply messing around, my aim is to add some randomness to some of our automated messages.
I find that quite often I get the following response:
Sorry, I had a problem talking to OpenAI: The server is overloaded or not ready yet.
Which is fine but I dont want that randomly read out.
If I use developer tools to run this service I get the following response when it works:
response:
speech:
plain:
speech: >-
Why don't scientists trust atoms?
Because they make up everything!
extra_data: null
card: {}
language: en-GB
response_type: action_done
data:
targets: []
success: []
failed: []
conversation_id: xxxxxxxxxxxxxxxxx
When it doesnât work I get the following:
response:
speech:
plain:
speech: >-
Sorry, I had a problem talking to OpenAI: The server is overloaded or
not ready yet.
extra_data: null
card: {}
language: en-GB
response_type: error
data:
code: unknown
conversation_id: xxxxxxxxxxxxxxxxxx
So I thought I could simply template the response by using the âresponse.response_typeâ.
The idea being that if it is âaction_doneâ then read the speech response and if its âerrorâ read out a static message for example.
Something like: (sudo)
message: >-
{% if ('response.response_type' == 'action_done') %}
read out the response {% else %}
read our original static message {% endif %}
But I cant get it to work and I donâs see the full response data as shown above when using dev tools to call the service in the automation and/or script traces - so is it simply not there OR am I not templating correctly?
Any input appreciated
Thanks