From fb3c8d7cdc41399fdc0b3e44c60663a0fb38181b Mon Sep 17 00:00:00 2001 From: Philippe ROQUES-GEOFFROY Date: Sat, 24 Jun 2023 19:57:52 +0200 Subject: [PATCH] Update nlp-intent-logics.md Fixed typos for a better understand-ability --- docs/v4/nlp-intent-logics.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/v4/nlp-intent-logics.md b/docs/v4/nlp-intent-logics.md index 42c60f4e3..594ca77ed 100644 --- a/docs/v4/nlp-intent-logics.md +++ b/docs/v4/nlp-intent-logics.md @@ -9,7 +9,8 @@ When the NLP has detected an intent there are some options to execute own logic * [onIntent method after answer generation](#onintent-method-after-answer-generation) ## Actions vs. Pipelines -The main difference between these two types of logic is that actions are really defined methods that are assigned "in code" in your JavaScript.Pipelines are defined in the Pipeline FIle and can also contain javaScript snippets, but are more the "configuration approach". +The main difference between these two types of logic is that actions are really defined methods that are assigned "in code" in your JavaScript. +Pipelines are defined in the Pipeline File, and can also contain javaScript snippets, but are more the "configuration approach". Actions can manipulate the context and all other data of the NLP process and can, when executed before answer generation, allow to inject new context data to be used in the answer generation. Alternatively (when executed after answer generation) the action can overwrite the final answer and manipulate the context for the next call. @@ -89,11 +90,11 @@ Beside using actions you can also configure a pipeline which is then executed. Details and an example of a pipeline with onIntent logic can be found in [Quickstart](./quickstart.md#adding-logic-to-an-intent). -The PipeLine is always executed as last step before returning the respone. This means you can easily overwrite the full answer and manipulate the data returned and manipulate the context for the next call. But in this case you need to generate the answer yourself completely. +The Pipeline is always executed as last step before returning the response. This means you can easily overwrite the full answer and manipulate the data returned and manipulate the context for the next call. But in this case you need to generate the answer yourself completely. ## onIntent method after answer generation -instead of the Pipeline you can also create a method onIntent on the Nlp instance which is executed. If this method is set t pipeline is not executed anymore! +instead of the pipeline method, you can also create a onIntent method on the Nlp instance which is executed. If this method is set then pipeline is not executed anymore! ```javascript const { dockStart } = require('@nlpjs/basic');