수십 또는 수백 개의 (환경 또는 콘텐츠) 변수를 정의하여 봇 정의에 사용했을 가능성이 있습니다. 이러한 변수는 텍스트 프롬프트나 메시지, JavaScript, 전환 및 서비스 호출 정의를 정의하는 데 사용될 수 있습니다. 사용량에 관계없이 모든 단일 작업에 대해 이러한 변수를 로드하면 봇 응답 시간이 지연되어 사용자 경험에 영향을 줄 수 있습니다. 네임스페이스를 사용해 변수를 분류하고 이러한 네임스페이스를 봇 정의의 다양한 구성 요소에 매핑할 수 있습니다. Kore.ai 플랫폼은 특정 구성 요소를 실행하는 동안 매핑된 네임스페이스에서만 변수를 로드합니다.

활성화

빌드 상단 메뉴 탭의 왼쪽 메뉴 설정 -> 일반 설정 페이지에 액세스하여 변수 분류에 네임스페이스를 사용하도록 선택할 수 있습니다. 여기에서 변수 네임스페이스활성화하는 옵션을 찾을 수 있습니다. 기본적으로 이 옵션은 사용 안 함으로 되어 있습니다.

구현

변수 네임스페이스를 사용하도록 설정한 후 다음을 수행합니다.

  • 기본 네임스페이스는 플랫폼에서 자동으로 생성되며 삭제하거나 수정할 수 없습니다.
  • 모든 작업 및 변수(있는 경우)는 이 기본 네임스페이스와 자동으로 연결됩니다.
  • 네임스페이스를 정의하고 관리할 수 있습니다.
  • 이러한 네임스페이스에 환경 변수 및 콘텐츠 변수를 추가하거나 제거할 수 있습니다. 변수는 하나 이상의 네임스페이스에 속할 수 있습니다. 기본 네임스페이스에서 환경 변수 및 콘텐츠 변수를 제거할 수 없습니다.
  • 다음과 같은 봇 정의의 다양한 구성 요소에 네임스페이스를 매핑할 수 있습니다.
    • 대화 및 알림을 포함하는 작업,
    • 대화 작업의 노드,
    • 지식 작업,
    • 스몰 토크,
    • 표준 응답 및
    • 이벤트 관리자.
  • 구성 요소에 대한 네임스페이스 매핑을 제거하는 경우. 그러나 구성 요소를 네임스페이스로 매핑한 경우 구성 요소를 정의하는 데 하나 이상의 변수를 포함한 경우 이 구성 요소를 실행하지 못할 수 있습니다.

변수 네임스페이스는 매핑된 후 작업 실행 중에 플랫폼에서 다음 단계를 구현합니다.

  • 구성 요소에 매핑된 네임스페이스에 속하는 변수만 로드됩니다.
  • 매핑되지 않은 변수가 구성 요소로 참조되면 "변수를 찾을 수 없음" 오류가 표시됩니다.
  • 작업에서 사용되는 봇 기능에도 동일한 논리가 적용됩니다.

생성

변수(환경 또는 콘텐츠)를 생성할 때 네임스페이스 추가 옵션을 선택할 수 있습니다. 이 옵션을 사용하여 네임스페이스를 생성합니다.

편집

빌드 -> 설정변수(환경 또는 콘텐츠) 페이지에서네임스페이스 관리 옵션을 사용할 수 있습니다.

이 옵션을 사용하여 네임스페이스를 보기, 편집, 또는 삭제할 수 있습니다. 구성 요소에 매핑된 네임스페이스를 삭제하는 것은 제한됩니다. 삭제하기 전에 연결된 모든 구성 요소에서 네임스페이스를 매핑 해제해야 합니다. 앞에서 설명한 것처럼 기본 네임스페이스는 삭제할 수 없습니다.

매핑

네임스페이스를 생성한 후에는 변수, 작업 및 기타 봇 구성 요소에 매핑해야 합니다. 이렇게 하면 실행 중 구성 요소에 매핑된 네임스페이스에 속하는 변수만 로드됩니다.

변수 매핑

변수를 생성할 때 (환경 및 콘텐츠) 네임스페이스를 매핑할 수 있습니다. 기본적으로 변수는 기본 네임스페이스에 할당됩니다. 변수는 여러 네임스페이스에 매핑할 수 있습니다. 나중에 변수 정의를 편집하여 매핑을 변경할 수 있습니다.

구성 요소

모든 구성 요소에는 구성 요소를 특정 네임스페이스와 매핑하는 데 사용할 수 있는 변수 네임스페이스 관리 작업 항목이 있습니다.

작업 – (대화, 알림)

대화 작업의 노드

지식 그래프

스몰 토크

이벤트 관리자

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

おそらく、数十から数百の(環境またはコンテンツ)変数を定義し、ボットの定義に使用していることでしょう。これらの変数は、テキストプロンプトやメッセージ、JavaScript、遷移、およびサービスコールの定義に使用することができました。これらすべての変数を、タスクの使用状況にかかわらず、各タスクにロードすると、ボットの応答時間が遅延し、ユーザー体験に影響を及ぼすことになります。

ネームスペースの使用により、変数を分類し、これらのネームスペースをボット定義のさまざまなコンポーネントにマッピングすることができます。Kore.aiプラットフォームは、特定のコンポーネントを実行する際に、マッピングされたネームスペースからのみ変数をロードします。

有効化

構築のトップメニュータブの左側メニュー構成-> 一般設定ページからアクセスして、変数の分類にネームスペースを使用するかどうかを選択することができます。ここには、変数のネームスペースを“有効化”するというオプションがあります。これは、デフォルトでは無効になっています。

導入

変数のネームスペースを有効にした場合:

  • デフォルトのネームスペースは、プラットフォームによって自動的に作成され、削除または変更することはできません。
  • すべてのタスクと変数は、自動的にこのデフォルトのネームスペースに関連付けられます。
  • ネームスペースを定義および管理することができます。
  • これらのネームスペースに、環境変数とコンテンツ変数を追加または削除することができます。変数は、1つ以上ネームスペースに属することができます。デフォルトのネームスペースから環境変数とコンテンツ変数を削除することはできません。
  • ネームスペースを、次のようなボット定義のさまざまなコンポーネントにマッピングすることができます。
    • ダイアログおよびアラートを含むタスク
    • ダイアログタスクのノード
    • ナレッジタスク
    • スモールトーク
    • 標準応答
    • イベントハンドラ
  • コンポーネントのネームスペースマッピングを削除する場合。しかし、任意のネームスペースでコンポーネントをマッピングした場合、コンポーネントの定義に1つ以上の変数が含まれていると、これらのコンポーネントの実行に失敗する可能性があります。

変数名空間がマッピングされると、タスク実行時にプラットフォームによって以下の手順が実行されます。

  • コンポーネントにマッピングされたネームスペースに属する変数のみがロードされます。
  • マッピングされていない変数がコンポーネントから参照されている場合、“変数が見つかりません”というエラーが発生します。
  • タスク内で使用されるボット関数にも同様のロジックが適用されます。

作成

変数(環境またはコンテンツ)を作成する際に、ネームスペースの追加というオプションがあります。ネームスペースを作成するには、このオプションを使用します。

編集

構築->構成変数(環境またはコンテンツ)ページでは、ネームスペースの管理というオプションがあります。

ネームスペースの表示、編集、または削除には、このオプションを使用します。任意のコンポーネントにマッピングされているネームスペースの削除は制限されています。削除する前に、ネームスペースを関連するすべてのコンポーネントからマッピング解除する必要があります。前述のとおり、デフォルトのネームスペースを削除することはできません。

マッピング

ネームスペースは、その作成後、変数、タスク、その他のボットコンポーネントにマッピングする必要があります。これによって、コンポーネントにマッピングされたネームスペースに属する変数のみが、実行時にロードされるようになります。

変数のマッピング

変数(環境とコンテンツ)の作成時に、ネームスペースをマッピングすることができます。デフォルトでは、変数はデフォルトのネームスペースに割り当てられています。1つの変数を複数のネームスペースにマッピングすることができます。後から変数定義を編集することによって、マッピングを変更することができます。

コンポーネント

すべてのコンポーネントには、変数ネームスペースの管理というアクションアイテムがあり、これを使用すると、コンポーネントを特定ネームスペースへマッピングすることができます。

タスク – (ダイアログ、アラート)

ダイアログタスクのノード

ナレッジグラフ

スモールトーク

イベントハンドラ

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Chances are you have defined tens or hundreds of (Environment or Content) variables and used them in the bot definitions. These variables could have been used in defining text prompts or messages, JavaScript, transitions, and service call definitions. Loading all these variables for every single task irrespective of their usage would lead to delays in bot response times impacting the user experience.

Using Namespaces you can categorize variables and map these namespaces to various components of the bot definition. Kore.ai platform would load the variables only from the mapped namespaces while executing specific components.

Enabling

You can opt to use the Namespaces for variable categorization by accessing from the Build top menu tab left menu Configurations -> General Settings page. You will find the option to Enable the Variable Namespaces here. By default it is disabled.

Implementation

Once Variable Namespaces is enabled:

  • A Default namespace is automatically created by the platform which cannot be deleted or modified;
  • All tasks and variables, if any, are automatically associated with this default namespace;
  • You can define and manage namespaces;
  • You can add or remove the Environment and Content variables to these namespaces. A variable can belong to one or more namespaces. You cannot remove the Environment and Content variables from the default namespace.
  • You can map namespaces to the various components of the bot definition like:
    • Tasks which include Dialog, and Alert;
    • Nodes in Dialog Task;
    • Knowledge Task;
    • Small Talk;
    • Standard Responses; and
    • Event Handlers.
  • If you remove the namespace mapping for the components. But if you mapped components with any namespace, then the execution of these components may fail if you have included one or more variables in defining the component.

Once Variable Namespaces are mapped, the following steps are implemented by the platform during the task execution :

  • only the variables that belong to the namespace mapped to a component will be loaded;
  • if the variable that is not mapped is referenced by the component, it will flag a “variable not found” error;
  • the same logic applies to Bot functions used within the tasks.

Creation

When creating a variable (environment or content), you have an option to Add Namespace. Use this option to create a namespace.

Editing

From the Variables (Environment or Content) page under Build -> Configurations, you have the option to Manage Namespaces.

Use this option to view, edit, or delete namespaces. Deleting a namespace that is mapped to any component is restricted. You need to unmap the namespace from all associated components before deletion. As mentioned earlier, you cannot delete the default namespace.

 

Mapping

Once created, the namespace needs to be mapped to variables, tasks, and other bot components. This will ensure that only the variables that belong to the namespace mapped to a component would be loaded at the time of execution.

Variable Mapping

At the time of variable creation (environment and content), you can map the namespace. By default, the variables would be assigned to the default namespace. A variable can be mapped to multiple namespaces. You can change the mapping later by editing the variable definition.

Components

All the components have a Manage Variable Namespaces action item which can be used to map the component with a particular namespace.

Tasks – (Dialog, Alert)

Nodes within Dialog Tasks

Knowledge Graph

Small Talk

Event Handlers

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed