Skip to content

Commit

Permalink
Add schemas from C# to packages. (#2986) (#2987)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrimc62 authored Oct 31, 2020
1 parent dad64d4 commit 5017465
Show file tree
Hide file tree
Showing 202 changed files with 5,363 additions and 24 deletions.
2 changes: 1 addition & 1 deletion libraries/botbuilder-ai-orchestrator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
"files": [
"lib",
"schema",
"schemas",
"src"
]
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://schemas.botframework.com/schemas/component/v1.0/component.schema",
"$role": "implements(Microsoft.IRecognizer)",
"title": "QnAMaker Recognizer",
"description": "Recognizer for generating QnAMatch intents from a KB.",
"title": "Orchestrator recognizer",
"description": "Orchestrator recognizer.",
"type": "object",
"properties": {
"id": {
Expand All @@ -14,23 +14,13 @@
"$ref": "schema:#/definitions/stringExpression",
"title": "Model",
"description": "NLR model file path.",
"default": "settings.orchestrator.modelpath"
"default": "=settings.orchestrator.modelpath"
},
"snapshotPath": {
"$ref": "schema:#/definitions/stringExpression",
"title": "Endpoint Key",
"title": "Endpoint key",
"description": "SnapShot file path.",
"default": "settings.orchestrator.shapshotpath"
},
"useCompactEmbeddings": {
"$ref": "schema:#/definitions/booleanExpression",
"title": "Use compact embeddings",
"description": "If true, compact embeddings will be used.",
"default": "true",
"examples": [
true,
"=turn.useCompactEmbeddings"
]
"default": "=settings.orchestrator.shapshotpath"
},
"entityRecognizers": {
"type": "array",
Expand All @@ -46,20 +36,20 @@
"description": "Recognizer returns ChooseIntent (disambiguation) if other intents are classified within this score of the top scoring intent.",
"default": 0.05,
"examples": [
true,
"=true",
"=turn.scoreThreshold",
"=settings.orchestrator.disambigscorethreshold"
"=settings.orchestrator.disambigScoreThreshold"
]
},
"detectAmbiguousIntents": {
"$ref": "schema:#/definitions/booleanExpression",
"title": "Threshold",
"title": "Detect ambiguous intents",
"description": "If true, recognizer will look for ambiguous intents (intents with close recognition scores from top scoring intent).",
"default": false,
"examples": [
true,
"=true",
"=turn.detectAmbiguousIntents",
"=settings.orchestrator.detectambiguousintents"
"=settings.orchestrator.detectAmbiguousIntents"
]
}
},
Expand Down
1 change: 1 addition & 0 deletions libraries/botbuilder-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
},
"files": [
"lib",
"schemas",
"src"
]
}
121 changes: 121 additions & 0 deletions libraries/botbuilder-ai/schemas/Microsoft.LuisRecognizer.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"$schema": "https://schemas.botframework.com/schemas/component/v1.0/component.schema",
"$role": "implements(Microsoft.IRecognizer)",
"title": "LUIS Recognizer",
"description": "LUIS recognizer.",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"title": "Id",
"description": "Optional unique id using with RecognizerSet. Other recognizers should return 'DeferToRecognizer_{Id}' intent when cross training data for this recognizer."
},
"applicationId": {
"$ref": "schema:#/definitions/stringExpression",
"title": "LUIS application id",
"description": "Application ID for your model from the LUIS service."
},
"version": {
"$ref": "schema:#/definitions/stringExpression",
"title": "LUIS version",
"description": "Optional version to target. If null then predictionOptions.Slot is used."
},
"endpoint": {
"$ref": "schema:#/definitions/stringExpression",
"title": "LUIS endpoint",
"description": "Endpoint to use for LUIS service like https://westus.api.cognitive.microsoft.com."
},
"endpointKey": {
"$ref": "schema:#/definitions/stringExpression",
"title": "LUIS prediction key",
"description": "LUIS prediction key used to call endpoint."
},
"externalEntityRecognizer": {
"$kind": "Microsoft.IRecognizer",
"title": "External entity recognizer",
"description": "Entities recognized by this recognizer will be passed to LUIS as external entities."
},
"dynamicLists": {
"$ref": "schema:#/definitions/arrayExpression",
"title": "Dynamic lists",
"description": "Runtime defined entity lists.",
"items": {
"title": "Entity list",
"description": "Lists of canonical values and synonyms for an entity.",
"type": "object",
"properties": {
"entity": {
"title": "Entity",
"description": "Entity to extend with a dynamic list.",
"type": "string"
},
"list": {
"title": "Dynamic list",
"description": "List of canonical forms and synonyms.",
"type": "array",
"items": {
"type": "object",
"title": "List entry",
"description": "Canonical form and synonynms.",
"properties": {
"canonicalForm": {
"title": "Canonical form",
"description": "Resolution if any synonym matches.",
"type": "string"
},
"synonyms": {
"title": "Synonyms",
"description": "List of synonyms for a canonical form.",
"type": "array",
"items": {
"title": "Synonym",
"description": "Synonym for canonical form.",
"type": "string"
}
}
}
}
}
}
}
},
"predictionOptions": {
"type": "object",
"title": "Prediction options",
"description": "Options to control LUIS prediction behavior.",
"properties": {
"includeAllIntents": {
"$ref": "schema:#/definitions/booleanExpression",
"title": "Include all intents",
"description": "True for all intents, false for only top intent."
},
"includeInstanceData": {
"$ref": "schema:#/definitions/booleanExpression",
"title": "Include $instance",
"description": "True to include $instance metadata in the LUIS response."
},
"log": {
"$ref": "schema:#/definitions/booleanExpression",
"title": "Log utterances",
"description": "True to log utterances on LUIS service."
},
"preferExternalEntities": {
"$ref": "schema:#/definitions/booleanExpression",
"title": "Prefer external entities",
"description": "True to prefer external entities to those generated by LUIS models."
},
"slot": {
"$ref": "schema:#/definitions/stringExpression",
"title": "Slot",
"description": "Slot to use for talking to LUIS service like production or staging."
}
}
}
},
"required": [
"applicationId",
"endpoint",
"endpointKey"
]
}
141 changes: 141 additions & 0 deletions libraries/botbuilder-ai/schemas/Microsoft.QnAMakerDialog.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{
"$schema": "https://schemas.botframework.com/schemas/component/v1.0/component.schema",
"$role": "implements(Microsoft.IDialog)",
"title": "QnAMaker dialog",
"description": "Dialog which uses QnAMAker knowledge base to answer questions.",
"type": "object",
"additionalProperties": false,
"properties": {
"knowledgeBaseId": {
"$ref": "schema:#/definitions/stringExpression",
"title": "KnowledgeBase Id",
"description": "KnowledgeBase Id of your QnA Maker KnowledgeBase.",
"default": "=settings.qna.knowledgebaseid"
},
"endpointKey": {
"$ref": "schema:#/definitions/stringExpression",
"title": "Endpoint key",
"description": "Endpoint key for the QnA Maker KB.",
"default": "=settings.qna.endpointkey"
},
"hostname": {
"$ref": "schema:#/definitions/stringExpression",
"title": "Hostname",
"description": "Hostname for your QnA Maker service.",
"default": "=settings.qna.hostname",
"examples": [
"https://yourserver.azurewebsites.net/qnamaker"
]
},
"noAnswer": {
"$kind": "Microsoft.IActivityTemplate",
"title": "Fallback answer",
"description": "Default answer to return when none found in KB.",
"default": "Sorry, I did not find an answer."
},
"threshold": {
"$ref": "schema:#/definitions/numberExpression",
"title": "Threshold",
"description": "Threshold score to filter results.",
"default": 0.3
},
"activeLearningCardTitle": {
"$ref": "schema:#/definitions/stringExpression",
"title": "Active learning card title",
"description": "Title for active learning suggestions card.",
"default": "Did you mean:"
},
"cardNoMatchText": {
"$ref": "schema:#/definitions/stringExpression",
"title": "Card no match text",
"description": "Text for no match option.",
"default": "None of the above."
},
"cardNoMatchResponse": {
"$kind": "Microsoft.IActivityTemplate",
"title": "Card no match response",
"description": "Custom response when no match option was selected.",
"default": "Thanks for the feedback."
},
"strictFilters": {
"$ref": "schema:#/definitions/arrayExpression",
"title": "Strict filters",
"description": "Metadata filters to use when calling the QnA Maker KB.",
"items": {
"type": "object",
"title": "Metadata filter",
"description": "Metadata filter.",
"properties": {
"name": {
"type": "string",
"title": "Name",
"description": "Name of filter property.",
"maximum": 100
},
"value": {
"type": "string",
"title": "Value",
"description": "Value to filter on.",
"maximum": 100
}
}
}
},
"top": {
"$ref": "schema:#/definitions/numberExpression",
"title": "Top",
"description": "The number of answers you want to retrieve.",
"default": 3
},
"isTest": {
"type": "boolean",
"title": "IsTest",
"description": "True, if pointing to Test environment, else false.",
"default": false
},
"rankerType": {
"$ref": "schema:#/definitions/stringExpression",
"title": "Ranker type",
"description": "Type of Ranker.",
"oneOf": [
{
"title": "Standard ranker",
"description": "Standard ranker types.",
"enum": [
"default",
"questionOnly",
"autoSuggestQuestion"
],
"default": "default"
},
{
"$ref": "schema:#/definitions/equalsExpression"
}
]
},
"strictFiltersJoinOperator": {
"$ref": "schema:#/definitions/stringExpression",
"title": "StrictFiltersJoinOperator",
"description": "Join operator for Strict Filters.",
"oneOf": [
{
"title": "Join operator",
"description": "Value of Join Operator to be used as conjunction with Strict Filter values.",
"enum": [
"AND",
"OR"
],
"default": "AND"
},
{
"$ref": "schema:#/definitions/equalsExpression"
}
]
}
},
"required": [
"knowledgeBaseId",
"endpointKey",
"hostname"
]
}
Loading

0 comments on commit 5017465

Please sign in to comment.