Example of connecting exten.bot to the dify.ai platform for function processing

Integration Capabilities:

Setting up a Workflow in Dify.ai:

Publishing and API Key:

Connecting an OpenAI Real Time Bot on exten.bot:

Example of describing the get_time function (the subscriber’s phone number will be sent as the value of the user parameter to the dify.ai server).

{
    "name": "get_time", 
    "type": "function", 
    "parameters": {
        "type": "object", 
        "required": [], 
        "properties": {}
        }, 
    "description": "If the user wants to know the current time"
}

Input schema template for processing the function on the Dify.ai server

{
    "user": "{user}",
    "inputs": {
        "function_name": "{function_name}",
    },
    "response_mode": "blocking"
}

Or a slightly more advanced function “two_numbers” (operation with numbers):

{
    "name": "two_numbers",
    "type": "function",
    "parameters": {
      "type": "object",
      "required": ["number1", "number2"],
      "properties": {
        "number1": {
          "type": "number",
          "description": "First number"
        },
        "number2": {
          "type": "number",
          "description": "Second number"
        }
      }
    },
    "description": "If the user wants to provide two numbers, ask for and process two numbers."
  }

Input schema template for processing the function on the Dify.ai server

{
    "user": "{user}",
    "inputs": {
        "function_name": "{function_name}",
        "number1": "{number1}",
        "number2": "{number2}"
    },
    "response_mode": "blocking"
}

Done: now user voice commands are processed via Dify.ai automated workflow.