This repository has been archived by the owner on May 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from 74a8aad67a395af739af66dd6550936534b04ca1 (#4115)
Adding md files for other langs
- Loading branch information
1 parent
2b01f6d
commit bc707a9
Showing
41 changed files
with
6,760 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 Microsoft | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
uid: azure-cognitiveservices-qnamaker | ||
summary: *content | ||
|
||
--- | ||
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** | ||
## Microsoft Azure SDK for Node.js - QnAMakerClient | ||
This project provides a Node.js package for accessing Azure. Right now it supports: | ||
- **Node.js version 6.x.x or higher** | ||
|
||
### Features | ||
|
||
|
||
### How to Install | ||
|
||
```bash | ||
npm install azure-cognitiveservices-qnamaker | ||
``` | ||
|
||
### How to use | ||
|
||
#### Authentication, client creation and getKeys endpoint as an example. | ||
|
||
```javascript | ||
const msRest = require("ms-rest"); | ||
const QnAMakerClient = require("azure-cognitiveservices-qnamaker"); | ||
const token = "<access_token>"; | ||
const creds = new msRest.TokenCredentials(token); | ||
const subscriptionId = "<Subscription_Id>"; | ||
const client = new QnAMakerClient(creds, subscriptionId); | ||
client.endpoint.getKeys().then((result) => { | ||
console.log("The result is:"); | ||
console.log(result); | ||
}).catch((err) => { | ||
console.log('An error occurred:'); | ||
console.dir(err, {depth: null, colors: true}); | ||
}); | ||
|
||
### Related projects | ||
|
||
- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) |
59 changes: 59 additions & 0 deletions
59
lib/services/cognitiveServices/qnamaker/lib/models/alterationsDTO.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* license information. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is | ||
* regenerated. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Collection of words that are synonyms. | ||
* | ||
*/ | ||
class AlterationsDTO { | ||
/** | ||
* Create a AlterationsDTO. | ||
* @property {array} alterations Words that are synonymous with each other. | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of AlterationsDTO | ||
* | ||
* @returns {object} metadata of AlterationsDTO | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'AlterationsDTO', | ||
type: { | ||
name: 'Composite', | ||
className: 'AlterationsDTO', | ||
modelProperties: { | ||
alterations: { | ||
required: true, | ||
serializedName: 'alterations', | ||
type: { | ||
name: 'Sequence', | ||
element: { | ||
required: false, | ||
serializedName: 'StringElementType', | ||
type: { | ||
name: 'String' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = AlterationsDTO; |
104 changes: 104 additions & 0 deletions
104
lib/services/cognitiveServices/qnamaker/lib/models/createKbDTO.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* license information. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is | ||
* regenerated. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Post body schema for CreateKb operation. | ||
* | ||
*/ | ||
class CreateKbDTO { | ||
/** | ||
* Create a CreateKbDTO. | ||
* @property {string} name Friendly name for the knowledgebase. | ||
* @property {array} [qnaList] List of Q-A (QnADTO) to be added to the | ||
* knowledgebase. Q-A Ids are assigned by the service and should be omitted. | ||
* @property {array} [urls] List of URLs to be used for extracting Q-A. | ||
* @property {array} [files] List of files from which to Extract Q-A. | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of CreateKbDTO | ||
* | ||
* @returns {object} metadata of CreateKbDTO | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'CreateKbDTO', | ||
type: { | ||
name: 'Composite', | ||
className: 'CreateKbDTO', | ||
modelProperties: { | ||
name: { | ||
required: true, | ||
serializedName: 'name', | ||
constraints: { | ||
MaxLength: 100, | ||
MinLength: 1 | ||
}, | ||
type: { | ||
name: 'String' | ||
} | ||
}, | ||
qnaList: { | ||
required: false, | ||
serializedName: 'qnaList', | ||
type: { | ||
name: 'Sequence', | ||
element: { | ||
required: false, | ||
serializedName: 'QnADTOElementType', | ||
type: { | ||
name: 'Composite', | ||
className: 'QnADTO' | ||
} | ||
} | ||
} | ||
}, | ||
urls: { | ||
required: false, | ||
serializedName: 'urls', | ||
type: { | ||
name: 'Sequence', | ||
element: { | ||
required: false, | ||
serializedName: 'StringElementType', | ||
type: { | ||
name: 'String' | ||
} | ||
} | ||
} | ||
}, | ||
files: { | ||
required: false, | ||
serializedName: 'files', | ||
type: { | ||
name: 'Sequence', | ||
element: { | ||
required: false, | ||
serializedName: 'FileDTOElementType', | ||
type: { | ||
name: 'Composite', | ||
className: 'FileDTO' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = CreateKbDTO; |
92 changes: 92 additions & 0 deletions
92
lib/services/cognitiveServices/qnamaker/lib/models/createKbInputDTO.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* license information. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is | ||
* regenerated. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Input to create KB. | ||
* | ||
*/ | ||
class CreateKbInputDTO { | ||
/** | ||
* Create a CreateKbInputDTO. | ||
* @property {array} [qnaList] List of QNA to be added to the index. Ids are | ||
* generated by the service and should be omitted. | ||
* @property {array} [urls] List of URLs to be added to knowledgebase. | ||
* @property {array} [files] List of files to be added to knowledgebase. | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of CreateKbInputDTO | ||
* | ||
* @returns {object} metadata of CreateKbInputDTO | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'CreateKbInputDTO', | ||
type: { | ||
name: 'Composite', | ||
className: 'CreateKbInputDTO', | ||
modelProperties: { | ||
qnaList: { | ||
required: false, | ||
serializedName: 'qnaList', | ||
type: { | ||
name: 'Sequence', | ||
element: { | ||
required: false, | ||
serializedName: 'QnADTOElementType', | ||
type: { | ||
name: 'Composite', | ||
className: 'QnADTO' | ||
} | ||
} | ||
} | ||
}, | ||
urls: { | ||
required: false, | ||
serializedName: 'urls', | ||
type: { | ||
name: 'Sequence', | ||
element: { | ||
required: false, | ||
serializedName: 'StringElementType', | ||
type: { | ||
name: 'String' | ||
} | ||
} | ||
} | ||
}, | ||
files: { | ||
required: false, | ||
serializedName: 'files', | ||
type: { | ||
name: 'Sequence', | ||
element: { | ||
required: false, | ||
serializedName: 'FileDTOElementType', | ||
type: { | ||
name: 'Composite', | ||
className: 'FileDTO' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = CreateKbInputDTO; |
75 changes: 75 additions & 0 deletions
75
lib/services/cognitiveServices/qnamaker/lib/models/deleteKbContentsDTO.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* license information. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is | ||
* regenerated. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* PATCH body schema of Delete Operation in UpdateKb | ||
* | ||
*/ | ||
class DeleteKbContentsDTO { | ||
/** | ||
* Create a DeleteKbContentsDTO. | ||
* @property {array} [ids] List of Qna Ids to be deleted | ||
* @property {array} [sources] List of sources to be deleted from | ||
* knowledgebase. | ||
*/ | ||
constructor() { | ||
} | ||
|
||
/** | ||
* Defines the metadata of DeleteKbContentsDTO | ||
* | ||
* @returns {object} metadata of DeleteKbContentsDTO | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'DeleteKbContentsDTO', | ||
type: { | ||
name: 'Composite', | ||
className: 'DeleteKbContentsDTO', | ||
modelProperties: { | ||
ids: { | ||
required: false, | ||
serializedName: 'ids', | ||
type: { | ||
name: 'Sequence', | ||
element: { | ||
required: false, | ||
serializedName: 'NumberElementType', | ||
type: { | ||
name: 'Number' | ||
} | ||
} | ||
} | ||
}, | ||
sources: { | ||
required: false, | ||
serializedName: 'sources', | ||
type: { | ||
name: 'Sequence', | ||
element: { | ||
required: false, | ||
serializedName: 'StringElementType', | ||
type: { | ||
name: 'String' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = DeleteKbContentsDTO; |
Oops, something went wrong.