Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update lg format link #3289

Merged
merged 3 commits into from
Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Composer/packages/lib/code-editor/src/LgEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ import { registerLGLanguage } from './languages';
import { createUrl, createWebSocket, createLanguageClient, SendRequestWithRetry } from './utils/lspUtil';
import { BaseEditor, BaseEditorProps, OnInit } from './BaseEditor';
import { LGOption } from './utils';
import { LG_HELP } from './constants';

const LG_HELP =
'https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md';
const placeholder = `> To learn more about the LG file format, read the documentation at
> ${LG_HELP}`;

Expand Down
2 changes: 2 additions & 0 deletions Composer/packages/lib/code-editor/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ export const defaultPlaceholder = formatMessage(
> {LU_HELP}`,
{ LU_HELP }
);

export const LG_HELP = 'https://aka.ms/lg-file-format';
10 changes: 5 additions & 5 deletions docs/concept-language-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can use Language Generation to:
- Construct cards, suggested actions and attachments using a [structured response template](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/structured-response-template.md).

Language Generation is achieved through:
- A markdown based [.lg file](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md) that contains the templates and their composition.
- A markdown based [.lg file](https://aka.ms/lg-file-format) that contains the templates and their composition.
- Full access to the current [bot's memory](concept-memory.md) so you can data bind language to the state of memory.
- Parser and runtime libraries that help achieve runtime resolution.

Expand All @@ -19,7 +19,7 @@ You can read more about Language Generation [here](https://github.com/microsoft/

Templates are functions which return one of the variations of the text and fully resolve any other references to template for composition. You can define one or more text responses in a template. When multiple responses are defined in the template, a single response will be selected by random.

You can also define one or more expressions using the [common expression language](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/common-expression-language), so when it is a conditional template, those expressions control which particular collection of variations get picked. Templates can be parameterized meaning that different callers to the template can pass in different values for use in expansion resolution. For additional information see [.lg file format](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md).
You can also define one or more expressions using the [common expression language](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/common-expression-language), so when it is a conditional template, those expressions control which particular collection of variations get picked. Templates can be parameterized meaning that different callers to the template can pass in different values for use in expansion resolution. For additional information see [.lg file format](https://aka.ms/lg-file-format).

Composer currently supports three types of templates: [simple response template](#simple-response-template), [conditional response template](#conditional-response-template), and [structured response template](#structured-response-template). You can read [this section](#define-lg-templates) and learn how to define each of them.

Expand Down Expand Up @@ -50,7 +50,7 @@ When you want to determine how your bots should respond to user input, you can d

To define LG templates in Composer, you will need to know
- Supported concepts of LG mentioned above.
- [.lg file format](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md)
- [.lg file format](https://aka.ms/lg-file-format)
- [Common Expression Language](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/common-expression-language#readme)

You can define LG templates in two places: The inline LG editor and **Bot Responses** that lists all templates. Below is a screenshot of LG inline editor.
Expand Down Expand Up @@ -87,7 +87,7 @@ Here is an example of a multi-line response. It includes multiple lines of text
```

### Conditional response template
For all conditional templates, all conditions are expressed in the [common expression language](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/common-expression-language#readme) and condition expressions are enclosed in curly brackets. Here are two [conditional template examples](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md#conditional-response-template) examples of a conditional response.
For all conditional templates, all conditions are expressed in the [common expression language](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/common-expression-language#readme) and condition expressions are enclosed in curly brackets. Here are two [conditional template examples](https://aka.ms/lg-file-format#conditional-response-template) examples of a conditional response.

IF...ELSE

Expand Down Expand Up @@ -154,7 +154,7 @@ For more examples of structured response templates, see [StructuredTemplate.lg](

## References
- [Language generation preview](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/language-generation)
- [.lg file format](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md)
- [.lg file format](https://aka.ms/lg-file-format)
- [.lg API reference](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/api-reference.md)
- [Common expression language](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/common-expression-language#readme)
- [Structured response template](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/structured-response-template.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/concept-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ One of the most powerful features of the Bot Framework system is Language Genera

You can refer to properties in the text of any message, including prompts.

You can also refer to properties in [LG templates](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md). See the Language Generation [readme](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/language-generation) to learn more the Language Generation system.
You can also refer to properties in [LG templates](https://aka.ms/lg-file-format). See the Language Generation [readme](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/language-generation) to learn more the Language Generation system.

To use the value of a property from memory inside a message, wrap the property reference in curly brackets: `{user.profile.name}`

Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-define-triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ The following steps demonstrate hot to create a **Greeting (ConversationUpdate a

3) Select the **+** sign under the _ConversationUpdate Activity_ node and then select **Send a response**.

4) Author your response in the **Language Generation** editor in the **properties panel** on the right side of the Composer window, by entering a message following [.lg file format](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md) as demonstrated in the image below.
4) Author your response in the **Language Generation** editor in the **properties panel** on the right side of the Composer window, by entering a message following [.lg file format](https://aka.ms/lg-file-format) as demonstrated in the image below.

![Welcome](./media/events-triggers/welcome.gif)

Expand Down
6 changes: 3 additions & 3 deletions docs/how-to-send-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Below is a screenshot of the **Send a response** action in Composer. How to get


## What to know
In Composer, all messages that are sent back to the user are composed in the Language Generation (LG) editor and follow the [.lg file format](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md). If you are not familiar with language generation in Composer, please read the [language generation](./concept-language-generation.md) article.
In Composer, all messages that are sent back to the user are composed in the Language Generation (LG) editor and follow the [.lg file format](https://aka.ms/lg-file-format). If you are not familiar with language generation in Composer, please read the [language generation](./concept-language-generation.md) article.

The table below lists the different types of text messages provided in Composer and their respective descriptions.

Expand All @@ -29,7 +29,7 @@ The table below lists the different types of text messages provided in Composer
| [Switch](how-to-send-messages.md#switch-condition) | A Switch conditional template defined to generate text responses based on user's input. |

## Define different text messages
To send a message, you need to specify **Send a response** action and then in the the Language Generation editor author your response message in [.lg format](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md). You can also define an lg template in **Bot Responses** (the lg all-up view) and reference the template in lg inline editor using the syntax `@{templateName()}`.
To send a message, you need to specify **Send a response** action and then in the the Language Generation editor author your response message in [.lg format](https://aka.ms/lg-file-format). You can also define an lg template in **Bot Responses** (the lg all-up view) and reference the template in lg inline editor using the syntax `@{templateName()}`.

### Simple text
To define a simple text message, use a "-" before the text that you want your bot to respond to users.
Expand Down Expand Up @@ -129,7 +129,7 @@ In this Switch conditional template, bot will respond in text message `Happy Sun
## References
- [Send and receive text message](https://docs.microsoft.com/azure/bot-service/bot-builder-howto-send-messages)
- [Language generation](./concept-language-generation.md)
- [.lg file format](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md)
- [.lg file format](https://aka.ms/lg-file-format)
- [Common language expression](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/common-expression-language#readme)

## Next
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-use-LUIS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ After you define your trigger and configure it to specific intent, you can add a

![send_response_message](./media/add_luis/send_response_message.png)

4. Define the response message in the language generation editor and follow the [.lg file format](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md). The screenshot below shows how to author a response message "This is a Greeting intent!" in the Language Generation editor.
4. Define the response message in the language generation editor and follow the [.lg file format](https://aka.ms/lg-file-format). The screenshot below shows how to author a response message "This is a Greeting intent!" in the Language Generation editor.

![greeting_message](./media/add_luis/greeting_message.png)

Expand Down
4 changes: 2 additions & 2 deletions docs/how-to-use-validation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Linting and validation

As an integrated development tool, Bot Framework Composer supports validation of data when you author an [.lg](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md) template, an [.lu](https://aka.ms/lu-file-format) template, and [expressions](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/common-expression-language) to fill in property fields. Error indicators will show in both inline editors and corresponding all-up views (**Bot Responses** and **User Input**). The **Notifications** page (click **Notifications** icon on the left navigation pane) displays an aggregation of all errors and warnings. With the help of linting and validation, your bot-authoring experience will be improved and you can easily build a functional bot that can "run".
As an integrated development tool, Bot Framework Composer supports validation of data when you author an [.lg](https://aka.ms/lg-file-format) template, an [.lu](https://aka.ms/lu-file-format) template, and [expressions](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/common-expression-language) to fill in property fields. Error indicators will show in both inline editors and corresponding all-up views (**Bot Responses** and **User Input**). The **Notifications** page (click **Notifications** icon on the left navigation pane) displays an aggregation of all errors and warnings. With the help of linting and validation, your bot-authoring experience will be improved and you can easily build a functional bot that can "run".

> [!NOTE]
> We are still working to improve the implementation of linting and validation in Composer. More user scenarios will be updated.
Expand All @@ -17,7 +17,7 @@ Click any of the errors on the **Notifications** page will navigate you to the m

## .lg files

When you author an [.lg template](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md) that has syntax errors, an indicator will show in the inline editor with a red wiggling line.
When you author an [.lg template](https://aka.ms/lg-file-format) that has syntax errors, an indicator will show in the inline editor with a red wiggling line.

![inline-error-lg](./media/validation/inline-error-lg.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/olddocs/testing_debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ When you are using the _Send an Activity_ action, the Language Generation syntax

![LG format error](./Assets/testing-debugging-lgformaterror.png)

Refer to the [LG syntax](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md) for troubleshooting.
Refer to the [LG syntax](https://aka.ms/lg-file-format) for troubleshooting.

##### Error publishing to LUIS

Expand Down
2 changes: 1 addition & 1 deletion toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
- [Language generation](https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/language-generation)
- [Common expression language](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/common-expression-language)
- [.lu file format](https://aka.ms/lu-file-format)
- [.lg file format](https://github.com/microsoft/BotBuilder-Samples/blob/master/experimental/language-generation/docs/lg-file-format.md)
- [.lg file format](https://aka.ms/lg-file-format)

## Related projects

Expand Down