Home    
Home  >  API Reference  >  V-Agent

Method /v1/vagent/{VAGNT}/conv/{VACNV}/sequence/process

Description:

This method is used to process natural language in the form of text. The request returns structured data in XML format with the appropriate answer.

Method reference:

Method Resource
POST /v1/vagent/{VAGNT}/conv/{VACNV}/sequence/process


Resources:

Name Resource
{VAGNT} V-Agent Instance Resource ID
{VACNV} V-Agent Conversation Resource ID or "NEW" if starting a new conversation


POST Parameters:

Name Description
channel:id ID of channel
Possible values: "ipmsg:telegram", "ipmsg:facebook", "web", "api"
conv:seq:text Sequence of text to process


Example


curl -v -X POST -H "Accept: application/xml" 
                -H "Content-type: application/x-www-form-urlencoded; charset=UTF-8"
                -H "Authorization: DCS-V1" -H "AccessKeyId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
                -H "Timestamp: 1475577278578" 
                -H "Signature: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                -d "channel:id=api" 
                -d "conv:seq:text=Where is the nearest office ?" 
                https://eu-central.dcs.dataknowl.com/v1/vagent/{VAGNT}/conv/{VACNV}/sequence/process

where:
{VAGNT} is the V-Agent RID
{VACNV} is the Conversation RID, or NEW to start a new conversation



Response


<?xml version="1.0" encoding="UTF-8"?>
<response>
   <status>
      <code>200</code>
      <message>success</message>
      <timestamp>2017-01-25 15:38:57:631 +0000</timestamp>
   </status>
   <service>
      <provider>DataKnowl Cloud Services</provider>
      <id>DCS</id>
      <version>1.0</version>
   </service>
   <result>
      <processing status="200" msg="OK">
         <conversation>
            <rid new="true">VACNVxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</rid>
         </conversation>
         <input>
            <sequence>
               <text>Where is the nearest office ?</text>
            </sequence>
         </input>
         <reply>
            <sequence>
                <text>
                   Our nearest office is located in Burlingame, 533 Airport Boulevard.
                </text>
            </sequence>
         </reply>
      </processing>
   </result>
</response>

© 2019 Complexity Intelligence, LLC