diff --git a/README.md b/README.md index d676716..a99fbcd 100644 --- a/README.md +++ b/README.md @@ -247,24 +247,28 @@ $client->task->summarizeConversation([ } ``` -#### ➡️ Categorize Conversation +#### ➡️ Categorize Conversations -* **Method:** `$client->task->categorizeConversation(data)` -* **Reference:** [Categorize Conversation](https://docs.mirage-ai.com/references/api/v1/#categorize-conversation) +* **Method:** `$client->task->categorizeConversations(data)` +* **Reference:** [Categorize Conversations](https://docs.mirage-ai.com/references/api/v1/#categorize-conversations) * **Request:** ```php -$client->task->categorizeConversation([ - "transcript" => [ +$client->task->categorizeConversations([ + "conversations" => [ [ - "from" => "customer", - "text" => "Hello! I have a question about the Crisp chatbot, I am trying to setup a week-end auto-responder, how can I do that?" - ], + "transcript" => [ + [ + "from" => "customer", + "text" => "Hello! I have a question about the Crisp chatbot, I am trying to setup a week-end auto-responder, how can I do that?" + ], - [ - "from" => "agent", - "text" => "Hi. Baptiste here. I can provide you an example bot scenario that does just that if you'd like?" + [ + "from" => "agent", + "text" => "Hi. Baptiste here. I can provide you an example bot scenario that does just that if you'd like?" + ] + ] ] ] ]); @@ -277,7 +281,9 @@ $client->task->categorizeConversation([ "reason": "processed", "data": { - "category": "Chatbot Configuration Issue" + "categories": [ + "Chatbot Configuration Issue" + ] } } ``` diff --git a/resources/Task.php b/resources/Task.php index e6ade24..af0a2af 100644 --- a/resources/Task.php +++ b/resources/Task.php @@ -28,8 +28,8 @@ public function summarizeConversation($data) { return $this->parent->_post("/task/summarize/conversation", $data); } - public function categorizeConversation($data) { - return $this->parent->_post("/task/categorize/conversation", $data); + public function categorizeConversations($data) { + return $this->parent->_post("/task/categorize/conversations", $data); } public function rankQuestion($data) {