Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit de66343

Browse files
authored
Updating main readme on daily builds consumption (#948)
1 parent 59b4275 commit de66343

File tree

2 files changed

+1
-156
lines changed

2 files changed

+1
-156
lines changed

README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,11 @@ Per above, Microsoft will only collect anonymous data to help improve the CLI. T
9595

9696
Nightly builds are generated using the latest code. Therefore, they may not be stable, and most likely lack up to date documentation. These builds are better suited for more experienced users, although everyone is welcome to use them and provide feedback.
9797

98-
You can get the latest nightly build of bot framework cli from the [BotBuilder MyGet](https://botbuilder.myget.org/gallery) feed. To install the nightly -
99-
100-
```shell
101-
npm config set registry https://botbuilder.myget.org/F/botframework-cli/npm/
102-
```
103-
10498
Install using npm:
10599
```shell
106-
npm i -g @microsoft/botframework-cli
100+
npm i -g @microsoft/botframework-cli@next
107101
```
108102

109-
To reset registry:
110-
```shell
111-
npm config set registry https://registry.npmjs.org/
112-
```
113103

114104
## Contributing
115105

packages/lu/README.md

Lines changed: 0 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -94,148 +94,3 @@ await luInstance.translate(subscriptionKey, targetLanguage, translateComments, t
9494
const translatedCode = luInstance.content
9595

9696
```
97-
98-
99-
# DEPRECATED V1 API
100-
## Parsing lu files
101-
To parse LU files, you can use the parseFile() method.
102-
103-
```js
104-
const ludown = require('@microsoft/bf-lu');
105-
const luContent1 = `# Greeting
106-
- hi`;
107-
const log = false;
108-
const locale = 'en-us';
109-
ludown.parser.parseFile(luContent1, log, locale)
110-
.then(function(parsedContent) {
111-
// Parsed LUIS object
112-
console.log(JSON.stringify(parsedContent.LUISJsonStructure, 2, null));
113-
// Parsed QnA content
114-
console.log(JSON.stringify(parsedContent.qnaJsonStructure, 2, null));
115-
// Additional files to parse
116-
console.log(JSON.stringify(parsedContent.additionalFilesToParse, 2, null));
117-
})
118-
.catch(function(err) {
119-
let errObj = new ludown.helperClasses.Exception(err);
120-
// err is of type ludown.helperClasses.Exception.
121-
// Possible error codes are available under ludown.helperEnums.errorCodes
122-
if(errObj.errCode === ludown.helperEnums.errorCodes.INVALID_INPUT) {
123-
// do something specific to this error code
124-
} else {
125-
console.log(errObj.text);
126-
}
127-
})
128-
```
129-
130-
## Validating parsed lu files
131-
132-
You can use the available validateLUISBlob() function to verify if the parsed LUIS blob is valid. This helps catch name conflicts, invalid labelled utterances etc.
133-
134-
```js
135-
const ludown = require('@microsoft/bf-lu');
136-
const luContent = `# Greeting
137-
- hi {userName=bob}
138-
$userName:first=
139-
-vishwac`;
140-
const log = false;
141-
const locale = 'en-us';
142-
async function parseContent() {
143-
let parsedContent;
144-
try {
145-
parsedContent = await ludown.parser.parseFile(luContent, log, locale);
146-
} catch (err) {
147-
let errObj = new ludown.helperClasses.Exception(err);
148-
// err is of type ludown.helperClasses.Exception.
149-
// Possible error codes are available under ludown.helperEnums.errorCodes
150-
if(errObj.errCode === ludown.helperEnums.errorCodes.INVALID_INPUT) {
151-
// do something specific to this error code
152-
} else {
153-
console.log(errObj.text);
154-
}
155-
}
156-
// validate the parsed luis content
157-
ludown.parser.validateLUISBlob(parsedContent.LUISJsonStructure)
158-
.then(res => res)
159-
.catch(function(err) {
160-
let exception = new ludown.helperClasses.Exception(err);
161-
console.error('Oops, invalid LUIS content!\n');
162-
console.error(exception.errCode + ' : ' + exception.text);
163-
})
164-
}
165-
166-
parseContent();
167-
```
168-
169-
## Generating lu content from LUIS JSON
170-
171-
You can generate lu content from LUIS and QnA maker JSON using constructMdFromLUIS() and constructMdFromQnA() methods. Here's an example code snippet.
172-
173-
```js
174-
const ludown = require('@microsoft/bf-lu')
175-
const luContent = `# Greeting
176-
- hi
177-
$userName:first=
178-
-vishwac`;
179-
const log = false;
180-
const locale = 'en-us';
181-
async function parseContent() {
182-
let parsedContent;
183-
try {
184-
parsedContent = await ludown.parser.parseFile(luContent, log, locale);
185-
} catch (err) {
186-
let errObj = new ludown.helperClasses.Exception(err);
187-
// err is of type ludown.helperClasses.Exception.
188-
// Possible error codes are available under ludown.helperEnums.errorCodes
189-
if(errObj.errCode === ludown.helperEnums.errorCodes.INVALID_INPUT) {
190-
// do something specific to this error code
191-
} else {
192-
console.log(errObj.text);
193-
}
194-
}
195-
196-
if(await ludown.parser.validateLUISBlob(parsedContent.LUISJsonStructure)) {
197-
// reconstruct md content
198-
ludown.refresh.constructMdFromLUIS(parsedContent.LUISJsonStructure)
199-
.then(function(result){
200-
console.log(result);
201-
})
202-
.catch(function(err) {
203-
let exception = new ludown.helperClasses.Exception(err);
204-
console.error('Oops, invalid LUIS content!\n');
205-
console.error(exception.errCode + ' : ' + exception.text);
206-
})
207-
}
208-
209-
}
210-
211-
parseContent();
212-
213-
```
214-
215-
## Translating lu files
216-
217-
You can take advantage of the [Microsoft text translation API](https://docs.microsoft.com/en-us/azure/cognitive-services/translator/) to automatically machine translate .lu files to one or more than [60+ languages](https://aka.ms/translate-langs) supported by the Microsoft text translation cognitive service.
218-
219-
To translate lu file content, you can simply use the parseAndTranslate() method. Here's a code snippet.
220-
221-
```js
222-
const ludown = require('@microsoft/bf-lu');
223-
const luContent = `# Greeting
224-
- hi
225-
$userName:first=
226-
-vishwac`;
227-
const log = false;
228-
const targetLanguage = 'de';
229-
const subscriptionKey = '<YOUR TEXT TRANSLATION KEY>';
230-
const translateComments = true;
231-
const translateLinkText = true;
232-
ludown.translate.parseAndTranslate(luContent, subscriptionKey, targetLanguage, '', translateComments, translateLinkText, log)
233-
.then(function(result) {
234-
console.log(result);
235-
})
236-
.catch(function(err){
237-
let exception = new ludown.helperClasses.Exception(err);
238-
console.error(exception.errCode + ' : ' + exception.text);
239-
})
240-
241-
```

0 commit comments

Comments
 (0)