GETTING STARTED
Kore.ai XO Platform
Virtual Assistants Overview
Natural Language Processing (NLP)
Concepts and Terminology
Quick Start Guide
Accessing the Platform
Navigating the Kore.ai XO Platform
Building a Virtual Assistant
Help & Learning Resources
Release Notes
Current Version
Recent Updates
Previous Versions
Deprecations
Request a Feature
CONCEPTS
Design
Storyboard
Overview
FAQs
Conversation Designer
Overview
Dialog Tasks
Mock Scenes
Dialog Tasks
Overview
Navigate Dialog Tasks
Build Dialog Tasks
Node Types
Overview
Intent Node
Dialog Node
Dynamic Intent Node
GenAI Node
GenAI Prompt
Entity Node
Form Node
Confirmation Node
Message Nodes
Logic Node
Bot Action Node
Service Node
Webhook Node
Script Node
Process Node
Agent Transfer
Node Connections
Node Connections Setup
Sub-Intent Scoping
Entity Types
Entity Rules
User Prompts or Messages
Voice Call Properties
Knowledge AI
Introduction
Knowledge Graph
Introduction
Terminology
Build a Knowledge Graph
Manage FAQs
Knowledge Extraction
Import or Export Knowledge Graph
Prepare Data for Import
Importing Knowledge Graph
Exporting Knowledge Graph
Auto-Generate Knowledge Graph
Knowledge Graph Analysis
Answer from Documents
Alert Tasks
Small Talk
Digital Skills
Overview
Digital Forms
Digital Views
Introduction
Widgets
Panels
Session and Context Variables
Context Object
Intent Discovery
Train
NLP Optimization
ML Engine
Overview
Model Validation
FM Engine
KG Engine
Traits Engine
Ranking and Resolver
Training Validations
NLP Configurations
NLP Guidelines
LLM and Generative AI
Introduction
LLM Integration
Kore.ai XO GPT Module
Prompts & Requests Library
Co-Pilot Features
Dynamic Conversations Features
Intelligence
Introduction
Event Handlers
Contextual Memory
Contextual Intents
Interruption Management
Multi-intent Detection
Amending Entities
Default Conversations
Conversation Driven Dialog Builder
Sentinment Management
Tone Analysis
Default Standard Responses
Ignore Words & Field Memory
Test & Debug
Overview
Talk to Bot
Utterance Testing
Batch Testing
Conversation Testing
Conversation Testing Overview
Create a Test Suite
Test Editor
Test Case Assertion
Test Case Execution Summary
Glossary
Health and Monitoring
NLP Health
Flow Health
Integrations
Actions
Actions Overview
Asana
Configure
Templates
Azure OpenAI
Configure
Templates
BambooHR
Configure
Templates
Bitly
Configure
Templates
Confluence
Configure
Templates
DHL
Configure
Templates
Freshdesk
Configure
Templates
Freshservice
Configure
Templates
Google Maps
Configure
Templates
Here
Configure
Templates
HubSpot
Configure
Templates
JIRA
Configure
Templates
Microsoft Graph
Configure
Templates
Open AI
Configure
Templates
Salesforce
Configure
Templates
ServiceNow
Configure
Templates
Stripe
Configure
Templates
Shopify
Configure
Templates
Twilio
Configure
Templates
Zendesk
Configure
Templates
Agents
Agent Transfer Overview
Custom (BotKit)
Drift
Genesys
Intercom
NiceInContact
NiceInContact(User Hub)
Salesforce
ServiceNow
Configure Tokyo and Lower versions
Configure Utah and Higher versions
Unblu
External NLU Adapters
Overview
Dialogflow Engine
Test and Debug
Deploy
Channels
Publishing
Versioning
Analyze
Introduction
Dashboard Filters
Overview Dashboard
Conversations Dashboard
Users Dashboard
Performance Dashboard
Custom Dashboards
Introduction
Custom Meta Tags
Create Custom Dashboard
Create Custom Dashboard Filters
LLM and Generative AI Logs
NLP Insights
Task Execution Logs
Conversations History
Conversation Flows
Conversation Insights
Feedback Analytics
Usage Metrics
Containment Metrics
Universal Bots
Introduction
Universal Bot Definition
Universal Bot Creation
Training a Universal Bot
Universal Bot Customizations
Enabling Languages
Store
Manage Assistant
Team Collaboration
Plan & Usage
Overview
Usage Plans
Templates
Support Plans
Invoices
Authorization
Conversation Sessions
Multilingual Virtual Assistants
Get Started
Supported Components & Features
Manage Languages
Manage Translation Services
Multiingual Virtual Assistant Behavior
Feedback Survey
Masking PII Details
Variables
Collections
IVR Settings
General Settings
Assistant Management
Manage Namespace
Data
Overview
Data Table
Table Views
App Definitions
Data as Service
HOW TOs
Build a Travel Planning Assistant
Travel Assistant Overview
Create a Travel Virtual Assistant
Design Conversation Skills
Create an ‘Update Booking’ Task
Create a Change Flight Task
Build a Knowledge Graph
Schedule a Smart Alert
Design Digital Skills
Configure Digital Forms
Configure Digital Views
Train the Assistant
Use Traits
Use Patterns
Manage Context Switching
Deploy the Assistant
Use Bot Functions
Use Content Variables
Use Global Variables
Use Web SDK
Build a Banking Assistant
Design Conversation Skills
Create a Sample Banking Assistant
Create a Transfer Funds Task
Create a Update Balance Task
Create a Knowledge Graph
Set Up a Smart Alert
Design Digital Skills
Configure Digital Forms
Configure Digital Views
Add Data to Data Tables
Update Data in Data Tables
Add Data from Digital Forms
Train the Assistant
Composite Entities
Use Traits
Use Patterns for Intents & Entities
Manage Context Switching
Deploy the Assistant
Configure an Agent Transfer
Use Assistant Functions
Use Content Variables
Use Global Variables
Intent Scoping using Group Node
Analyze the Assistant
Create a Custom Dashboard
Use Custom Meta Tags in Filters
Migrate External Bots
Google Dialogflow Bot
APIs & SDKs
API Reference
API Introduction
Rate Limits
API List
koreUtil Libraries
SDK Reference
SDK Introduction
Web SDK
How the Web SDK Works
SDK Security
SDK Registration
Web Socket Connect and RTM
Tutorials
Widget SDK Tutorial
Web SDK Tutorial
BotKit SDK
BotKit SDK Deployment Guide
Installing the BotKit SDK
Using the BotKit SDK
SDK Events
SDK Functions
Tutorials
BotKit - Blue Prism
BotKit - Flight Search Sample VA
BotKit - Agent Transfer
  1. ホーム
  2. Docs
  3. Virtual Assistants
  4. Builder
  5. Dialog Task
  6. コンテキストオブジェクト

コンテキストオブジェクト

Contextオブジェクトは、ダイアログ実行のためのデータおよびすべてのインテント(ダイアログタスク、アクション、アラートと情報タスク、およびFAQ)にわたって保持するコンテナオブジェクトです。Kore.aiの自然言語処理(NLP)エンジンは、特定されたインテント、抽出されたエンティティ、および履歴をこのオブジェクトに入力します。Contextオブジェクトのキーは、ダイアログタスクとインテントの遷移条件において使用されます。また、contextオブジェクトには、システム変数およびセッション変数を追加してアクセスすることができます。 Context のオブジェクトキーをURLで使用するときの構文は、次のようにオブジェクト名を二重括弧で囲みます。https://quora.com/{{context.entities.topic}}/rss Context オブジェクトは、エンティティノードの動的な値と同様に、スクリプトノードでも参照でき、Kore.ai SDKへのペイロード応答に渡すことができます。ダイアログタスクの実行に影響を与えるために、ビジネスロジックに基づいて Context オブジェクトのキー値を更新することができます。このプラットフォームは、セッション変数も作成および管理しており、それは、こちらから参照できます。

次の表では、Contextのオブジェクトキーについて説明します。これらは、作成された時期と入力された時期に基づき、グローバルコンテキストとダイアログコンテキストに分類されています。詳細はこちらをご参照ください。

キー カテゴリ 説明 使用例
インテント ダイアログ NLPインタプリターが認識するインテント。 構文: context.intent.<< intent name >>
エンティティ ダイアログ ユーザープロンプトと、そのプロンプトに対して認識されたユーザー入力に基づくキー/値ペアの配列。

構文:context.entities.<< entity name >>以下のコード例では、context.entitiesオブジェクトを使用して、口座間の資金振替の確認として、金額と口座名の値にアクセスしています。

var today = new Date();
if(today.getHours() < 21)
 {
   print("You have requested to transfer " +context.entities.Amount + 
         " USD from " +context.entities.FromAccountName +
         " to " +context.entities.ToAccountName + " account. " +  
         " Your funds will be shown immediately though transfer will be shown in tomorrow's date in your transaction history. Shall I go ahead? ");
  }
 else
 {
  print("You have requested to transfer " +context.entities.Amount + 
        " USD from " +context.entities.FromAccountName +
        " to " +context.entities.ToAccountName + " account. Shall I go ahead? " +
         context.accdata[0].transactions.length);
  }
特性 ダイアログ 指定されたコンテキストに設定された特性
currentLanguage (introduced in ver7.1) グローバル 現在の会話言語
suggestedLanguages (introduced in ver7.1) グローバル ユーザーの最初の発話からプラットフォームが検出したすべての言語のリスト、信頼度の高い順に表示。これは、各会話の開始時にリセットされます。
履歴 グローバル NLPインタプリターを使用した各コンポーネントの nodeId を含む配列。

ダイアログフローにおいて実行される順次的、履歴的なノードパスを定義するオブジェクトの配列。

  • nodeId – ノードタイプと増分番号を使用するこのノードのダイアログタスクフローID。例:intent0、service2など。
  • state – 指定されたタイムスタンプに対するオブジェクトのステータス。以下から1つ:
    • processing – ボットプラットフォームがノードの処理を開始します
    • processed – ノードとノードの接続が処理され、次のノードが見つかりましたが、ダイアログはまだそのノードに移動していません。
    • waitingForUserInput – ユーザーは入力を指示されましたが、まだ受信されていません。
    • pause – 現在のダイアログタスクを一時停止して、別のタスクを開始します。
    • resume – 一時停止のステータスにある現在のダイアログは、開始した別のタスクが完了した後、フローの同じ地点で継続しています。
    • waitingForServerResponse – サーバーのリクエストは、非同期の応答を待っています。
    • error – エラーが発生しました。例:ループ制限に達し、サーバーやスクリプトノードの実行が失敗。
    • end – ダイアログは、ダイアログフローの最後に達しました。
  • type – ダイアログタスクのタイプ。以下から1つ:
    • intent – ダイアログタスクとは、ユーザーのインテントやタスクのことです。
    • faq – ダイアログタスクはナレッジグラフです。
  • componentName – ノードの名前。
  • timestamp – ノード実行時のJSON日付タイムスタンプ。例:1492794646000。
onHoldTasks ダイアログ 会話の進行中に保留されているすべてのタスクの配列。これは、評価目的で使用できる読み取り専用のリストです。(Ver 7.1で導入)
サービスノード名 ダイアログ サービスノード実行用のオブジェクトのコレクションです。
  • response – リクエストステータスと応答本文をJSONペイロードとして返します。
    • statusCode – リクエストのHTTPステータスコード。例:200 OK。
    • body – サービスリクエストからのJSONペイロードの応答本文。
resultsFound ダイアログ 結果が返ってくる場合は、true
message_tone グローバル ダイアログタスクの現在のノードで認識された口調の喜怒哀楽とスコアの配列。
  • tone_name – 検出された口調の名前。以下から1つ:
    • angry
    • disgust
    • fear
    • sad
    • joy
    • positive – 発話の一般的な肯定性を評価するために使用される特別な口調。
  • count
  • level – く口調の喜怒哀楽のレベル:-3から+3まで。以下から1つ:
    • +3 – ユーザーは確かに口調の喜怒哀楽を表した。
    • +2 – ユーザーは口調の喜怒哀楽を表した。
    • +1 – ユーザーは口調の喜怒哀楽を表したようだ。
    • 0 – ユーザーの口調の喜怒哀楽はニュートラルだ。
    • -1 – ユーザーは口調の喜怒哀楽を抑え気味だ。
    • -2 – ユーザーは口調の喜怒哀楽を抑えた。
    • -3 – ユーザーは確かに口調の喜怒哀楽を抑えた。
dialog_tone グローバル [ダイアログタスク]セッション全体の平均的な認識された口調の喜怒哀楽とスコアの配列。
  • tone_name – 検出された口調の名前。以下から1つ:
    • angry
    • disgust
    • fear
    • sad
    • joy
    • positive – 発話の一般的な肯定性を評価するために使用される特別な口調。
  • count
  • level – く口調の喜怒哀楽のレベル:-3から+3まで。以下から1つ:
    • +3 – ユーザーは確かに口調の喜怒哀楽を表した。
    • +2 – ユーザーは口調の喜怒哀楽を表した。
    • +1 – ユーザーは口調の喜怒哀楽を表したようだ。
    • 0 – ユーザーの口調の喜怒哀楽はニュートラルだ。
    • -1 – ユーザーは口調の喜怒哀楽を抑え気味だ。
    • -2 – ユーザーは口調の喜怒哀楽を抑えた。
    • -3 – ユーザーは確かに口調の喜怒哀楽を抑えた。
<< nodename >>.response.body ダイアログ サービスノードからのHTTP JSONレ応答。 構文: context.<< node name >>.response.body 以下のコード例では、サービスノードからの応答をメッセージがノードでエンドユーザーに表示されています。
print(JSON.stringify(context.fetchopportunitiesnode.response.body));
定義済み開発者のキー ダイアログ 開発者が定義したキーと値のペア。 構文: context.<< varName >> 例: context.customerId

コンテキストオブジェクトの例 コンテキストオブジェクトを含むペイロード応答を以下に示します。

"context":{
   "bot":"Kore Banking Documentation",
   "botid":"st-b4a22e86-XXXX-575c-b888-e106d083a251",
   "taskid":"dg-df510618-XXXX-5a0b-8370-ee042b3e5b47",
   "intent":"Agent",
   "intentType":"dialog",
   "entities":{
      "Name":12345,
      "number":1234
   },
   "userInputs":{
      "originalInput":{
         "sentence":" agent",
         "timestamp":1501244143000
      }
   },
   "history":[
      {
         "originalSentence":"agent",
         "timestamp":1501244143000
      },
      {
         "dialogState":"started",
         "timestamp":1501244143000
      },
      {
         "nodeId":"intent0",
         "state":"processed",
         "type":"intent",
         "componentName":"Agent",
         "timestamp":1501244143000
      },
      {
         "nodeId":"entity1",
         "state":"processing",
         "type":"entity",
         "componentName":"Name",
         "timestamp":1501244143000
      },
      {
         "nodeId":"entity1",
         "state":"waitingForUserInput",
         "type":"entity",
         "componentName":"Name",
         "timestamp":1501244143000
      },
      {
         "nodeId":"entity1",
         "state":"processed",
         "type":"entity",
         "componentName":"Name",
         "timestamp":1501244149000
      },
      {
         "nodeId":"entity4",
         "state":"processing",
         "type":"entity",
         "componentName":"number",
         "timestamp":1501244149000
      },
      {
         "nodeId":"entity4",
         "state":"waitingForUserInput",
         "type":"entity",
         "componentName":"number",
         "timestamp":1501244149000
      },
      {
         "nodeId":"entity4",
         "state":"processed",
         "type":"entity",
         "componentName":"number",
         "timestamp":1501244156000
      },
      {
         "nodeId":"agentTransfer3",
         "state":"processing",
         "type":"agentTransfer",
         "componentName":"agenttransfer",
         "timestamp":1501244156000
      },
      {
         "dialogState":"transferredToAgent",
         "timestamp":1501244156000
      }
   ],
   "dialog_tone":[
      {
         "tone_name":"positive",
         "level":1
      }
   ],
   "message_tone":[
      {
         "tone_name":"positive",
         "level":1
      }
   ],
  "currentTags": {
    "tags": [
      "name"
    ]
  },
  "historicTags": [
    {
      "tags": [
        "name"
      ]
    }
  ],
   "session":{
      "EnterpriseContext":{
         "5":"500",
         "TestData-Ent":"1000234",
         "ec1":"Enterprise Context session variable from processor",
         "Enterprise_G_Smith_Email":"george.smith@kore.com",
         "enterprisesessiondialog":"enterprisesessiondialogvalue",
         "enterprisecustomprocessor":"enterprisecustomprocessorvalue",
         "enterprisepreprocessor":"enterprisepreprocessorvalue",
         "EnterpriseContext":"EnterpriseContextvalueresponse",
         "Entersession123":"Entersession123value",
         "EnterpriseContext Summary":"TestingSpread",
         "enterprisecontext":"enterprisecontextvalue",
         "ec2":"Enterprise Context session variable from channel response",
         "EC":"ec session variable from intializer",
         "enterprisepreprocessorkey":"enterprisepreprocessorvalue"
      },
      "BotContext":{
      },
      "UserContext":{
         "profColour":"#3651fc",
         "workinghours":{
            "workdays":"Mon, Tue, Wed, Thu, Fri, Sat, Sun",
            "workstart":"12:00 AM",
            "workend":"12:00 PM"
         },
         "dept":"Product Development",
         "jTitle":"Documentation Manager",
         "profImage":"profile.png",
         "activationStatus":"active",
         "emailId":"help.docs@kore.com",
         "firstName":"Help",
         "lastName":"Docs",
         "orgId":"o-b30656ae-XXXX-XXXX-9181-065f7de34be9",
         "_id":"u-4b9f02a3-XXXX-XXXX-b5cc-6df81c0af603",
         "customData":null,
         "identities":[
            {
               "val":"help.docs@kore.com",
               "type":"email"
            },
            {
               "val":"kore/u-4b9f02a3-XXXX-XXXX-b5cc-6df81c0af603",
               "type":"mapped"
            }
         ]
      },
      "UserSession":{
      },
      "BotUserSession":{
         "isReturningUser": true,
         "lastMessage":{
            "channel":"rtm",
            "messagePayload":{
               "clientMessageId":1501244152843,
               "message":{
                  "body":"1234"
               },
               "resourceid":"/bot.message",
               "botInfo":{
                  "chatBot":"Kore Banking Documentation",
                  "taskBotId":"st-b4a22e86-XXXX-XXXX-b888-e106d083a251"
               },
               "client":"botbuilder",
               "meta":{
                  "timezone":"America/New_York",
                  "locale":"en-US"
               },
               "id":1501244152843
            }
         },
     "lastUserMessageTime": "2021-07-12T07:07:17.278Z"
      },
      "opts":{
         "userId":"u-4b9f02a3-XXXX-XXXX-b5cc-6df81c0af603",
         "streamId":"st-b4a22e86-XXXX-XXXX-b888-e106d083a251"
      }
   }
},
"channel":{
   "_id":"dc-5b4a742a-XXXX-XXXX-938f-520912935456",
   "channelInfos":{
      "requestId":"ms-26aae382-XXXX-XXXX-8bf1-a9e076770956",
      "message":"The bot is not accessible via Web / Mobile Client.",
      "body":"1234",
      "client":"botbuilder",
      "handle":{
         "spanId":"8cab2ce2f6aabc47",
         "traceId":"8cab2ce2f6aabc47",
         "taskBotId":"st-b4a22e86-XXXX-XXXX-b888-e106d083a251",
         "clientId":"5a37bf24-XXXX-XXXX-a816-f9602db08149",
         "userId":"u-4b9f02a3-XXXX-XXXX-b5cc-6df81c0af603",
         "handleId":"54e95c2b-XXXX-XXXX-ba6b-384d4166f1b2"
      },
      "botInfo":{
         "taskBotId":"st-b4a22e86-XXXX-XXXX-b888-e106d083a251",
         "chatBot":"Kore Banking Documentation"
      },
      "from":"u-4b9f02a3-3f6f-XXXX-XXXX-6df81c0af603",
      "type":"rtm"
   },
   "__v":0
},
"baseUrl":"https://bots.kore.ai/api/botsdk/stream/st-b4a22e86-XXXX-XXXX-b888-e106d083a251",
"sendUserMessageUrl":"https://bots.kore.ai/api/botsdk/stream/st-b4a22e86-e95b-XXXX-XXXX-e106d083a251/sendUserMessage/1501244156289",
"sendBotMessageUrl":"https://bots.kore.ai/api/botsdk/stream/st-b4a22e86-e95b-XXXX-XXXX-e106d083a251/sendBotMessage/1501244156289"
}

“lastUserMessageTime”: “2021-07-12T07:07:17.278Z”

コンテキストオブジェクト

Contextオブジェクトは、ダイアログ実行のためのデータおよびすべてのインテント(ダイアログタスク、アクション、アラートと情報タスク、およびFAQ)にわたって保持するコンテナオブジェクトです。Kore.aiの自然言語処理(NLP)エンジンは、特定されたインテント、抽出されたエンティティ、および履歴をこのオブジェクトに入力します。Contextオブジェクトのキーは、ダイアログタスクとインテントの遷移条件において使用されます。また、contextオブジェクトには、システム変数およびセッション変数を追加してアクセスすることができます。 Context のオブジェクトキーをURLで使用するときの構文は、次のようにオブジェクト名を二重括弧で囲みます。https://quora.com/{{context.entities.topic}}/rss Context オブジェクトは、エンティティノードの動的な値と同様に、スクリプトノードでも参照でき、Kore.ai SDKへのペイロード応答に渡すことができます。ダイアログタスクの実行に影響を与えるために、ビジネスロジックに基づいて Context オブジェクトのキー値を更新することができます。このプラットフォームは、セッション変数も作成および管理しており、それは、こちらから参照できます。

次の表では、Contextのオブジェクトキーについて説明します。これらは、作成された時期と入力された時期に基づき、グローバルコンテキストとダイアログコンテキストに分類されています。詳細はこちらをご参照ください。

キー カテゴリ 説明 使用例
インテント ダイアログ NLPインタプリターが認識するインテント。 構文: context.intent.<< intent name >>
エンティティ ダイアログ ユーザープロンプトと、そのプロンプトに対して認識されたユーザー入力に基づくキー/値ペアの配列。

構文:context.entities.<< entity name >>以下のコード例では、context.entitiesオブジェクトを使用して、口座間の資金振替の確認として、金額と口座名の値にアクセスしています。

var today = new Date();
if(today.getHours() < 21)
 {
   print("You have requested to transfer " +context.entities.Amount + 
         " USD from " +context.entities.FromAccountName +
         " to " +context.entities.ToAccountName + " account. " +  
         " Your funds will be shown immediately though transfer will be shown in tomorrow's date in your transaction history. Shall I go ahead? ");
  }
 else
 {
  print("You have requested to transfer " +context.entities.Amount + 
        " USD from " +context.entities.FromAccountName +
        " to " +context.entities.ToAccountName + " account. Shall I go ahead? " +
         context.accdata[0].transactions.length);
  }
特性 ダイアログ 指定されたコンテキストに設定された特性
currentLanguage (introduced in ver7.1) グローバル 現在の会話言語
suggestedLanguages (introduced in ver7.1) グローバル ユーザーの最初の発話からプラットフォームが検出したすべての言語のリスト、信頼度の高い順に表示。これは、各会話の開始時にリセットされます。
履歴 グローバル NLPインタプリターを使用した各コンポーネントの nodeId を含む配列。

ダイアログフローにおいて実行される順次的、履歴的なノードパスを定義するオブジェクトの配列。

  • nodeId – ノードタイプと増分番号を使用するこのノードのダイアログタスクフローID。例:intent0、service2など。
  • state – 指定されたタイムスタンプに対するオブジェクトのステータス。以下から1つ:
    • processing – ボットプラットフォームがノードの処理を開始します
    • processed – ノードとノードの接続が処理され、次のノードが見つかりましたが、ダイアログはまだそのノードに移動していません。
    • waitingForUserInput – ユーザーは入力を指示されましたが、まだ受信されていません。
    • pause – 現在のダイアログタスクを一時停止して、別のタスクを開始します。
    • resume – 一時停止のステータスにある現在のダイアログは、開始した別のタスクが完了した後、フローの同じ地点で継続しています。
    • waitingForServerResponse – サーバーのリクエストは、非同期の応答を待っています。
    • error – エラーが発生しました。例:ループ制限に達し、サーバーやスクリプトノードの実行が失敗。
    • end – ダイアログは、ダイアログフローの最後に達しました。
  • type – ダイアログタスクのタイプ。以下から1つ:
    • intent – ダイアログタスクとは、ユーザーのインテントやタスクのことです。
    • faq – ダイアログタスクはナレッジグラフです。
  • componentName – ノードの名前。
  • timestamp – ノード実行時のJSON日付タイムスタンプ。例:1492794646000。
onHoldTasks ダイアログ 会話の進行中に保留されているすべてのタスクの配列。これは、評価目的で使用できる読み取り専用のリストです。(Ver 7.1で導入)
サービスノード名 ダイアログ サービスノード実行用のオブジェクトのコレクションです。
  • response – リクエストステータスと応答本文をJSONペイロードとして返します。
    • statusCode – リクエストのHTTPステータスコード。例:200 OK。
    • body – サービスリクエストからのJSONペイロードの応答本文。
resultsFound ダイアログ 結果が返ってくる場合は、true
message_tone グローバル ダイアログタスクの現在のノードで認識された口調の喜怒哀楽とスコアの配列。
  • tone_name – 検出された口調の名前。以下から1つ:
    • angry
    • disgust
    • fear
    • sad
    • joy
    • positive – 発話の一般的な肯定性を評価するために使用される特別な口調。
  • count
  • level – く口調の喜怒哀楽のレベル:-3から+3まで。以下から1つ:
    • +3 – ユーザーは確かに口調の喜怒哀楽を表した。
    • +2 – ユーザーは口調の喜怒哀楽を表した。
    • +1 – ユーザーは口調の喜怒哀楽を表したようだ。
    • 0 – ユーザーの口調の喜怒哀楽はニュートラルだ。
    • -1 – ユーザーは口調の喜怒哀楽を抑え気味だ。
    • -2 – ユーザーは口調の喜怒哀楽を抑えた。
    • -3 – ユーザーは確かに口調の喜怒哀楽を抑えた。
dialog_tone グローバル [ダイアログタスク]セッション全体の平均的な認識された口調の喜怒哀楽とスコアの配列。
  • tone_name – 検出された口調の名前。以下から1つ:
    • angry
    • disgust
    • fear
    • sad
    • joy
    • positive – 発話の一般的な肯定性を評価するために使用される特別な口調。
  • count
  • level – く口調の喜怒哀楽のレベル:-3から+3まで。以下から1つ:
    • +3 – ユーザーは確かに口調の喜怒哀楽を表した。
    • +2 – ユーザーは口調の喜怒哀楽を表した。
    • +1 – ユーザーは口調の喜怒哀楽を表したようだ。
    • 0 – ユーザーの口調の喜怒哀楽はニュートラルだ。
    • -1 – ユーザーは口調の喜怒哀楽を抑え気味だ。
    • -2 – ユーザーは口調の喜怒哀楽を抑えた。
    • -3 – ユーザーは確かに口調の喜怒哀楽を抑えた。
<< nodename >>.response.body ダイアログ サービスノードからのHTTP JSONレ応答。 構文: context.<< node name >>.response.body 以下のコード例では、サービスノードからの応答をメッセージがノードでエンドユーザーに表示されています。
print(JSON.stringify(context.fetchopportunitiesnode.response.body));
定義済み開発者のキー ダイアログ 開発者が定義したキーと値のペア。 構文: context.<< varName >> 例: context.customerId

コンテキストオブジェクトの例 コンテキストオブジェクトを含むペイロード応答を以下に示します。

"context":{
   "bot":"Kore Banking Documentation",
   "botid":"st-b4a22e86-XXXX-575c-b888-e106d083a251",
   "taskid":"dg-df510618-XXXX-5a0b-8370-ee042b3e5b47",
   "intent":"Agent",
   "intentType":"dialog",
   "entities":{
      "Name":12345,
      "number":1234
   },
   "userInputs":{
      "originalInput":{
         "sentence":" agent",
         "timestamp":1501244143000
      }
   },
   "history":[
      {
         "originalSentence":"agent",
         "timestamp":1501244143000
      },
      {
         "dialogState":"started",
         "timestamp":1501244143000
      },
      {
         "nodeId":"intent0",
         "state":"processed",
         "type":"intent",
         "componentName":"Agent",
         "timestamp":1501244143000
      },
      {
         "nodeId":"entity1",
         "state":"processing",
         "type":"entity",
         "componentName":"Name",
         "timestamp":1501244143000
      },
      {
         "nodeId":"entity1",
         "state":"waitingForUserInput",
         "type":"entity",
         "componentName":"Name",
         "timestamp":1501244143000
      },
      {
         "nodeId":"entity1",
         "state":"processed",
         "type":"entity",
         "componentName":"Name",
         "timestamp":1501244149000
      },
      {
         "nodeId":"entity4",
         "state":"processing",
         "type":"entity",
         "componentName":"number",
         "timestamp":1501244149000
      },
      {
         "nodeId":"entity4",
         "state":"waitingForUserInput",
         "type":"entity",
         "componentName":"number",
         "timestamp":1501244149000
      },
      {
         "nodeId":"entity4",
         "state":"processed",
         "type":"entity",
         "componentName":"number",
         "timestamp":1501244156000
      },
      {
         "nodeId":"agentTransfer3",
         "state":"processing",
         "type":"agentTransfer",
         "componentName":"agenttransfer",
         "timestamp":1501244156000
      },
      {
         "dialogState":"transferredToAgent",
         "timestamp":1501244156000
      }
   ],
   "dialog_tone":[
      {
         "tone_name":"positive",
         "level":1
      }
   ],
   "message_tone":[
      {
         "tone_name":"positive",
         "level":1
      }
   ],
  "currentTags": {
    "tags": [
      "name"
    ]
  },
  "historicTags": [
    {
      "tags": [
        "name"
      ]
    }
  ],
   "session":{
      "EnterpriseContext":{
         "5":"500",
         "TestData-Ent":"1000234",
         "ec1":"Enterprise Context session variable from processor",
         "Enterprise_G_Smith_Email":"george.smith@kore.com",
         "enterprisesessiondialog":"enterprisesessiondialogvalue",
         "enterprisecustomprocessor":"enterprisecustomprocessorvalue",
         "enterprisepreprocessor":"enterprisepreprocessorvalue",
         "EnterpriseContext":"EnterpriseContextvalueresponse",
         "Entersession123":"Entersession123value",
         "EnterpriseContext Summary":"TestingSpread",
         "enterprisecontext":"enterprisecontextvalue",
         "ec2":"Enterprise Context session variable from channel response",
         "EC":"ec session variable from intializer",
         "enterprisepreprocessorkey":"enterprisepreprocessorvalue"
      },
      "BotContext":{
      },
      "UserContext":{
         "profColour":"#3651fc",
         "workinghours":{
            "workdays":"Mon, Tue, Wed, Thu, Fri, Sat, Sun",
            "workstart":"12:00 AM",
            "workend":"12:00 PM"
         },
         "dept":"Product Development",
         "jTitle":"Documentation Manager",
         "profImage":"profile.png",
         "activationStatus":"active",
         "emailId":"help.docs@kore.com",
         "firstName":"Help",
         "lastName":"Docs",
         "orgId":"o-b30656ae-XXXX-XXXX-9181-065f7de34be9",
         "_id":"u-4b9f02a3-XXXX-XXXX-b5cc-6df81c0af603",
         "customData":null,
         "identities":[
            {
               "val":"help.docs@kore.com",
               "type":"email"
            },
            {
               "val":"kore/u-4b9f02a3-XXXX-XXXX-b5cc-6df81c0af603",
               "type":"mapped"
            }
         ]
      },
      "UserSession":{
      },
      "BotUserSession":{
         "isReturningUser": true,
         "lastMessage":{
            "channel":"rtm",
            "messagePayload":{
               "clientMessageId":1501244152843,
               "message":{
                  "body":"1234"
               },
               "resourceid":"/bot.message",
               "botInfo":{
                  "chatBot":"Kore Banking Documentation",
                  "taskBotId":"st-b4a22e86-XXXX-XXXX-b888-e106d083a251"
               },
               "client":"botbuilder",
               "meta":{
                  "timezone":"America/New_York",
                  "locale":"en-US"
               },
               "id":1501244152843
            }
         },
     "lastUserMessageTime": "2021-07-12T07:07:17.278Z"
      },
      "opts":{
         "userId":"u-4b9f02a3-XXXX-XXXX-b5cc-6df81c0af603",
         "streamId":"st-b4a22e86-XXXX-XXXX-b888-e106d083a251"
      }
   }
},
"channel":{
   "_id":"dc-5b4a742a-XXXX-XXXX-938f-520912935456",
   "channelInfos":{
      "requestId":"ms-26aae382-XXXX-XXXX-8bf1-a9e076770956",
      "message":"The bot is not accessible via Web / Mobile Client.",
      "body":"1234",
      "client":"botbuilder",
      "handle":{
         "spanId":"8cab2ce2f6aabc47",
         "traceId":"8cab2ce2f6aabc47",
         "taskBotId":"st-b4a22e86-XXXX-XXXX-b888-e106d083a251",
         "clientId":"5a37bf24-XXXX-XXXX-a816-f9602db08149",
         "userId":"u-4b9f02a3-XXXX-XXXX-b5cc-6df81c0af603",
         "handleId":"54e95c2b-XXXX-XXXX-ba6b-384d4166f1b2"
      },
      "botInfo":{
         "taskBotId":"st-b4a22e86-XXXX-XXXX-b888-e106d083a251",
         "chatBot":"Kore Banking Documentation"
      },
      "from":"u-4b9f02a3-3f6f-XXXX-XXXX-6df81c0af603",
      "type":"rtm"
   },
   "__v":0
},
"baseUrl":"https://bots.kore.ai/api/botsdk/stream/st-b4a22e86-XXXX-XXXX-b888-e106d083a251",
"sendUserMessageUrl":"https://bots.kore.ai/api/botsdk/stream/st-b4a22e86-e95b-XXXX-XXXX-e106d083a251/sendUserMessage/1501244156289",
"sendBotMessageUrl":"https://bots.kore.ai/api/botsdk/stream/st-b4a22e86-e95b-XXXX-XXXX-e106d083a251/sendBotMessage/1501244156289"
}

“lastUserMessageTime”: “2021-07-12T07:07:17.278Z”

メニュー