File as scope (#917)
* support multiple scenario files in postmanCollectionGenerator * file as input * temporary save * revert schema * encapsulate postmanCollectionRunner * fix baseenv * fix test * fix baseenv * fix comment * add test * update change log * 3.3.0 Co-authored-by: Lei Ni <leni@microsoft.com> Co-authored-by: Tianxiang Chen <tianxchen@microsoft.com>
This commit is contained in:
Родитель
09c16344f0
Коммит
eb947e7532
|
@ -1,5 +1,9 @@
|
|||
# Change Log - oav
|
||||
|
||||
## 12/12/2022 3.3.0
|
||||
- API Scenario
|
||||
- Support scenario file as scope
|
||||
|
||||
## 12/01/2022 3.2.4
|
||||
|
||||
- API Scenario
|
||||
|
|
|
@ -4,6 +4,7 @@ import { basename } from "path";
|
|||
import { cloneDeep, pathDirName, pathJoin } from "@azure-tools/openapi-tools-common";
|
||||
import { inject, injectable } from "inversify";
|
||||
import { apply as jsonMergeApply, generate as jsonMergePatchGenerate } from "json-merge-patch";
|
||||
import { findReadMe } from "@azure/openapi-markdown";
|
||||
import { inversifyGetInstance, TYPES } from "../inversifyUtils";
|
||||
import { FileLoader, FileLoaderOption } from "../swagger/fileLoader";
|
||||
import { JsonLoader, JsonLoaderOption } from "../swagger/jsonLoader";
|
||||
|
@ -68,7 +69,6 @@ export interface ApiScenarioLoaderOption
|
|||
extends FileLoaderOption,
|
||||
JsonLoaderOption,
|
||||
SwaggerLoaderOption {
|
||||
swaggerFilePaths?: string[];
|
||||
includeOperation?: boolean;
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,6 @@ export class ApiScenarioLoader implements Loader<ScenarioDefinition> {
|
|||
) {
|
||||
setDefaultOpts(opts, {
|
||||
skipResolveRefKeys: [xmsExamples],
|
||||
swaggerFilePaths: [],
|
||||
includeOperation: true,
|
||||
});
|
||||
this.transformContext = getTransformContext(this.jsonLoader, this.schemaValidator, [
|
||||
|
@ -127,22 +126,20 @@ export class ApiScenarioLoader implements Loader<ScenarioDefinition> {
|
|||
return inversifyGetInstance(ApiScenarioLoader, opts);
|
||||
}
|
||||
|
||||
private async initialize(swaggerFilePaths?: string[], readmeTags?: ReadmeTag[]) {
|
||||
private async initialize(swaggerFilePaths: string[], additionalTags?: ReadmeTag[]) {
|
||||
if (this.initialized) {
|
||||
throw new Error("Already initialized");
|
||||
}
|
||||
|
||||
if (swaggerFilePaths) {
|
||||
await this.loadSwaggers(
|
||||
swaggerFilePaths,
|
||||
this.operationsMap,
|
||||
this.apiVersionsMap,
|
||||
this.exampleToOperation
|
||||
);
|
||||
}
|
||||
await this.loadSwaggers(
|
||||
swaggerFilePaths,
|
||||
this.operationsMap,
|
||||
this.apiVersionsMap,
|
||||
this.exampleToOperation
|
||||
);
|
||||
|
||||
if (readmeTags) {
|
||||
for (const e of readmeTags) {
|
||||
if (additionalTags) {
|
||||
for (const e of additionalTags) {
|
||||
logger.verbose(`Additional readme tag: ${e.filePath}`);
|
||||
|
||||
const inputFiles = await getInputFiles(e.filePath, e.tag);
|
||||
|
@ -229,21 +226,40 @@ export class ApiScenarioLoader implements Loader<ScenarioDefinition> {
|
|||
}
|
||||
}
|
||||
|
||||
public async load(filePath: string): Promise<ScenarioDefinition> {
|
||||
const [rawDef, readmeTags] = await this.apiScenarioYamlLoader.load(filePath);
|
||||
public async load(
|
||||
scenarioFilePath: string,
|
||||
swaggerFilePaths?: string[],
|
||||
readmePath?: string
|
||||
): Promise<ScenarioDefinition> {
|
||||
const [rawDef, additionalTags] = await this.apiScenarioYamlLoader.load(scenarioFilePath);
|
||||
|
||||
await this.initialize(this.opts.swaggerFilePaths, readmeTags);
|
||||
if (!swaggerFilePaths || swaggerFilePaths.length === 0) {
|
||||
swaggerFilePaths = [];
|
||||
if (!readmePath) {
|
||||
readmePath = await findReadMe(pathDirName(scenarioFilePath));
|
||||
}
|
||||
if (readmePath) {
|
||||
const inputFile = await getInputFiles(readmePath);
|
||||
for (const it of inputFile ?? []) {
|
||||
if (swaggerFilePaths.indexOf(it) < 0) {
|
||||
swaggerFilePaths.push(this.fileLoader.resolvePath(it));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await this.initialize(swaggerFilePaths, additionalTags);
|
||||
|
||||
rawDef.scope = rawDef.scope ?? "ResourceGroup";
|
||||
const isArmScope = rawDef.scope !== "None";
|
||||
|
||||
const scenarioDef: ScenarioDefinition = {
|
||||
name: basename(filePath).substring(0, basename(filePath).lastIndexOf(".")),
|
||||
name: basename(scenarioFilePath).substring(0, basename(scenarioFilePath).lastIndexOf(".")),
|
||||
scope: rawDef.scope,
|
||||
prepareSteps: [],
|
||||
scenarios: [],
|
||||
_filePath: this.fileLoader.relativePath(filePath),
|
||||
_swaggerFilePaths: this.opts.swaggerFilePaths!,
|
||||
_filePath: this.fileLoader.relativePath(scenarioFilePath),
|
||||
_swaggerFilePaths: swaggerFilePaths!,
|
||||
cleanUpSteps: [],
|
||||
...convertVariables(rawDef.variables),
|
||||
authentication: this.loadAuthentication(rawDef.authentication),
|
||||
|
|
|
@ -6,9 +6,7 @@ export const ApiScenarioDefinition: Schema & {
|
|||
type: "object",
|
||||
properties: {
|
||||
scope: {
|
||||
type: "string",
|
||||
enum: ["ResourceGroup", "Subscription", "Tenant", "None"],
|
||||
default: "ResourceGroup",
|
||||
$ref: "#/definitions/Scope",
|
||||
},
|
||||
authentication: {
|
||||
$ref: "#/definitions/Authentication",
|
||||
|
@ -46,6 +44,19 @@ export const ApiScenarioDefinition: Schema & {
|
|||
type: "string",
|
||||
pattern: "^[A-Za-z_$][A-Za-z0-9_-]*$",
|
||||
},
|
||||
Scope: {
|
||||
type: "string",
|
||||
oneOf: [
|
||||
{
|
||||
enum: ["ResourceGroup", "Subscription", "Tenant", "None"],
|
||||
default: "ResourceGroup",
|
||||
},
|
||||
{
|
||||
format: "uri-reference",
|
||||
pattern: "^.+\\.(yaml|yml)$",
|
||||
},
|
||||
],
|
||||
},
|
||||
Authentication: {
|
||||
type: "object",
|
||||
properties: {
|
||||
|
|
|
@ -363,8 +363,11 @@ export type Scenario = TransformRaw<
|
|||
//#endregion
|
||||
|
||||
//#region ScenarioDefinitionFile
|
||||
|
||||
export type ArmScope = "ResourceGroup" | "Subscription" | "Tenant" | "None";
|
||||
|
||||
export type RawScenarioDefinition = RawVariableScope & {
|
||||
scope?: "ResourceGroup" | "Subscription" | "Tenant" | "None";
|
||||
scope?: ArmScope | string;
|
||||
prepareSteps?: RawStep[];
|
||||
scenarios: RawScenario[];
|
||||
cleanUpSteps?: RawStep[];
|
||||
|
|
|
@ -112,7 +112,7 @@ export class NewmanReportValidator {
|
|||
|
||||
this.testResult = {
|
||||
apiScenarioFilePath: path.relative(this.fileRoot, this.opts.apiScenarioFilePath),
|
||||
swaggerFilePaths: this.opts.swaggerFilePaths!.map((specPath) => {
|
||||
swaggerFilePaths: scenario._scenarioDef._swaggerFilePaths.map((specPath) => {
|
||||
if (process.env.REPORT_SPEC_PATH_PREFIX) {
|
||||
specPath = path.join(
|
||||
process.env.REPORT_SPEC_PATH_PREFIX,
|
||||
|
@ -138,7 +138,7 @@ export class NewmanReportValidator {
|
|||
|
||||
this.liveValidator = new LiveValidator({
|
||||
fileRoot: "/",
|
||||
swaggerPaths: [...this.opts.swaggerFilePaths!],
|
||||
swaggerPaths: [...scenario._scenarioDef._swaggerFilePaths],
|
||||
enableRoundTripValidator: !this.opts.skipValidation,
|
||||
});
|
||||
if (!this.opts.skipValidation) {
|
||||
|
|
|
@ -42,9 +42,7 @@ import { CLEANUP_FOLDER, PREPARE_FOLDER } from "./postmanHelper";
|
|||
export interface PostmanCollectionGeneratorOption
|
||||
extends ApiScenarioLoaderOption,
|
||||
SwaggerAnalyzerOption {
|
||||
name: string;
|
||||
fileRoot: string;
|
||||
scenarioDef: string;
|
||||
env: EnvironmentVariables;
|
||||
outputFolder: string;
|
||||
markdown?: boolean;
|
||||
|
@ -53,10 +51,10 @@ export interface PostmanCollectionGeneratorOption
|
|||
runCollection: boolean;
|
||||
generateCollection: boolean;
|
||||
testProxy?: string;
|
||||
calculateCoverage?: boolean;
|
||||
skipValidation?: boolean;
|
||||
savePayload?: boolean;
|
||||
generateExample?: boolean;
|
||||
skipCleanUp?: boolean;
|
||||
runId?: string;
|
||||
verbose?: boolean;
|
||||
devMode?: boolean;
|
||||
|
@ -81,22 +79,125 @@ function pad(number: number, length: number) {
|
|||
return str;
|
||||
}
|
||||
|
||||
interface PostmanCollectionRunnerOption extends PostmanCollectionGeneratorOption {
|
||||
scenarioFile: string;
|
||||
generator: PostmanCollectionGenerator;
|
||||
}
|
||||
|
||||
@injectable()
|
||||
export class PostmanCollectionGenerator {
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
|
||||
class PostmanCollectionRunner {
|
||||
private scenarioBaseFileLoader: FileLoader;
|
||||
public environment: VariableScope;
|
||||
private collection: Collection;
|
||||
private baseEnvironment?: VariableScope;
|
||||
private scenarioDef: ScenarioDefinition;
|
||||
|
||||
constructor(
|
||||
@inject(TYPES.opts) private opt: PostmanCollectionGeneratorOption,
|
||||
@inject(TYPES.opts) private opt: PostmanCollectionRunnerOption,
|
||||
private apiScenarioLoader: ApiScenarioLoader,
|
||||
private fileLoader: FileLoader,
|
||||
private dataMasker: DataMasker,
|
||||
private swaggerAnalyzer: SwaggerAnalyzer
|
||||
) {}
|
||||
) {
|
||||
this.opt.scenarioFile = this.fileLoader.resolvePath(this.opt.scenarioFile);
|
||||
this.scenarioBaseFileLoader = new FileLoader({
|
||||
fileRoot: path.dirname(this.opt.scenarioFile),
|
||||
checkUnderFileRoot: false,
|
||||
});
|
||||
}
|
||||
|
||||
public static create(opt: PostmanCollectionRunnerOption) {
|
||||
(opt as any).container = undefined;
|
||||
return inversifyGetInstance(PostmanCollectionRunner, opt);
|
||||
}
|
||||
|
||||
public async run(): Promise<Collection> {
|
||||
const scenarioDef = await this.apiScenarioLoader.load(this.opt.scenarioDef);
|
||||
this.scenarioDef = await this.apiScenarioLoader.load(
|
||||
this.opt.scenarioFile,
|
||||
this.opt.swaggerFilePaths
|
||||
);
|
||||
|
||||
if (this.scenarioDef.scope.endsWith(".yaml") || this.scenarioDef.scope.endsWith(".yml")) {
|
||||
const parentScenarioFile = this.scenarioBaseFileLoader.resolvePath(this.scenarioDef.scope);
|
||||
if (!this.opt.generator.runnerMap.has(parentScenarioFile)) {
|
||||
const runner = PostmanCollectionRunner.create({
|
||||
...this.opt,
|
||||
scenarioFile: parentScenarioFile,
|
||||
});
|
||||
|
||||
await runner.run();
|
||||
this.opt.generator.runnerMap.set(parentScenarioFile, runner);
|
||||
}
|
||||
this.baseEnvironment = this.opt.generator.runnerMap.get(parentScenarioFile)?.environment;
|
||||
}
|
||||
|
||||
await this.doRun();
|
||||
return this.collection;
|
||||
}
|
||||
|
||||
public async cleanUp(skipCleanUp: boolean) {
|
||||
if (this.opt.runCollection) {
|
||||
try {
|
||||
const foldersToRun = [];
|
||||
if (
|
||||
!skipCleanUp &&
|
||||
this.collection.items.find((item) => item.name === CLEANUP_FOLDER, this.collection)
|
||||
) {
|
||||
foldersToRun.push(CLEANUP_FOLDER);
|
||||
}
|
||||
|
||||
if (foldersToRun.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const summary = await this.doRunCollection({
|
||||
collection: this.collection,
|
||||
environment: this.environment,
|
||||
folder: foldersToRun,
|
||||
reporters: "cli",
|
||||
});
|
||||
|
||||
// todo add report
|
||||
|
||||
this.environment = summary.environment;
|
||||
} catch (err) {
|
||||
logger.error(`Error in running collection: ${err}`);
|
||||
} finally {
|
||||
if (skipCleanUp && this.scenarioDef.scope === "ResourceGroup") {
|
||||
logger.warn(
|
||||
`Notice: the resource group '${this.environment.get(
|
||||
"resourceGroupName"
|
||||
)}' was not cleaned up.`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async generateReport() {
|
||||
if (this.opt.calculateCoverage) {
|
||||
const operationIdCoverageResult = this.swaggerAnalyzer.calculateOperationCoverage(
|
||||
this.scenarioDef
|
||||
);
|
||||
logger.info(
|
||||
`Operation coverage ${(operationIdCoverageResult.coverage * 100).toFixed(2) + "%"} (${
|
||||
operationIdCoverageResult.coveredOperationNumber
|
||||
}/${operationIdCoverageResult.totalOperationNumber})`
|
||||
);
|
||||
if (operationIdCoverageResult.uncoveredOperationIds.length > 0) {
|
||||
logger.verbose("Uncovered operationIds: ");
|
||||
logger.verbose(operationIdCoverageResult.uncoveredOperationIds);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.opt.html && this.opt.runCollection) {
|
||||
await this.generateHtmlReport();
|
||||
}
|
||||
}
|
||||
|
||||
private async doRun() {
|
||||
await this.swaggerAnalyzer.initialize();
|
||||
for (const it of scenarioDef.requiredVariables) {
|
||||
for (const it of this.scenarioDef.requiredVariables) {
|
||||
if (this.opt.env[it] === undefined) {
|
||||
throw new Error(
|
||||
`Missing required variable '${it}', please set variable values in env.json.`
|
||||
|
@ -108,7 +209,7 @@ export class PostmanCollectionGenerator {
|
|||
if (this.opt.markdown) {
|
||||
const reportExportPath = path.resolve(
|
||||
this.opt.outputFolder,
|
||||
`${defaultNewmanDir(this.opt.name, this.opt.runId!)}`
|
||||
`${defaultNewmanDir(this.scenarioDef.name, this.opt.runId!)}`
|
||||
);
|
||||
await this.fileLoader.writeFile(
|
||||
path.join(reportExportPath, "report.md"),
|
||||
|
@ -116,99 +217,82 @@ export class PostmanCollectionGenerator {
|
|||
);
|
||||
}
|
||||
|
||||
await this.generateCollection();
|
||||
|
||||
if (this.opt.generateCollection) {
|
||||
await this.writeCollectionToJson(this.scenarioDef.name, this.collection, this.environment);
|
||||
}
|
||||
|
||||
if (this.opt.runCollection) {
|
||||
try {
|
||||
for (let i = 0; i < this.scenarioDef.scenarios.length; i++) {
|
||||
const scenario = this.scenarioDef.scenarios[i];
|
||||
|
||||
const foldersToRun = [];
|
||||
if (
|
||||
i == 0 &&
|
||||
this.collection.items.find((item) => item.name === PREPARE_FOLDER, this.collection)
|
||||
) {
|
||||
foldersToRun.push(PREPARE_FOLDER);
|
||||
}
|
||||
foldersToRun.push(scenario.scenario);
|
||||
|
||||
const reportExportPath = path.resolve(
|
||||
this.opt.outputFolder,
|
||||
`${defaultNewmanReport(this.scenarioDef.name, this.opt.runId!, scenario.scenario)}`
|
||||
);
|
||||
const summary = await this.doRunCollection({
|
||||
collection: this.collection,
|
||||
environment: this.environment,
|
||||
folder: foldersToRun,
|
||||
reporters: "cli",
|
||||
});
|
||||
await this.postRun(scenario, reportExportPath, summary.environment, summary);
|
||||
|
||||
this.environment = summary.environment;
|
||||
}
|
||||
} catch (err) {
|
||||
logger.error(`Error in running collection: ${err}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async generateCollection() {
|
||||
const client = new PostmanCollectionRunnerClient({
|
||||
collectionName: scenarioDef.name,
|
||||
runId: this.opt.runId,
|
||||
collectionName: this.scenarioDef.name,
|
||||
runId: this.opt.runId!,
|
||||
testProxy: this.opt.testProxy,
|
||||
verbose: this.opt.verbose,
|
||||
skipAuth: this.opt.devMode,
|
||||
skipArmCall: this.opt.devMode,
|
||||
skipLroPoll: this.opt.devMode,
|
||||
jsonLoader: this.apiScenarioLoader.jsonLoader,
|
||||
scenarioFolder: path.dirname(this.opt.scenarioDef),
|
||||
scenarioFolder: path.dirname(this.scenarioDef._filePath),
|
||||
});
|
||||
const runner = new ApiScenarioRunner({
|
||||
jsonLoader: this.apiScenarioLoader.jsonLoader,
|
||||
env: this.opt.env,
|
||||
env: Object.assign(
|
||||
{},
|
||||
this.opt.env,
|
||||
...(this.baseEnvironment?.values
|
||||
?.filter((v) => !v.key?.startsWith("x_"))
|
||||
.map((v) => ({ [v.key!]: v.value })) || [])
|
||||
),
|
||||
client: client,
|
||||
});
|
||||
|
||||
await runner.execute(scenarioDef);
|
||||
await runner.execute(this.scenarioDef);
|
||||
|
||||
let [collection, environment] = client.outputCollection();
|
||||
|
||||
if (this.opt.generateCollection) {
|
||||
await this.writeCollectionToJson(scenarioDef.name, collection, environment);
|
||||
}
|
||||
|
||||
if (this.opt.runCollection) {
|
||||
try {
|
||||
for (let i = 0; i < scenarioDef.scenarios.length; i++) {
|
||||
const scenario = scenarioDef.scenarios[i];
|
||||
|
||||
const foldersToRun = [];
|
||||
if (i == 0 && collection.items.find((item) => item.name === PREPARE_FOLDER, collection)) {
|
||||
foldersToRun.push(PREPARE_FOLDER);
|
||||
}
|
||||
foldersToRun.push(scenario.scenario);
|
||||
if (
|
||||
i == scenarioDef.scenarios.length - 1 &&
|
||||
!this.opt.skipCleanUp &&
|
||||
collection.items.find((item) => item.name === CLEANUP_FOLDER, collection)
|
||||
) {
|
||||
foldersToRun.push(CLEANUP_FOLDER);
|
||||
}
|
||||
|
||||
const reportExportPath = path.resolve(
|
||||
this.opt.outputFolder,
|
||||
`${defaultNewmanReport(this.opt.name, this.opt.runId!, scenario.scenario)}`
|
||||
);
|
||||
const summary = await this.doRun({
|
||||
collection,
|
||||
environment,
|
||||
folder: foldersToRun,
|
||||
reporters: "cli",
|
||||
});
|
||||
await this.postRun(scenario, reportExportPath, summary.environment, summary);
|
||||
|
||||
environment = summary.environment;
|
||||
}
|
||||
} catch (err) {
|
||||
logger.error(`Error in running collection: ${err}`);
|
||||
} finally {
|
||||
if (this.opt.skipCleanUp && scenarioDef.scope === "ResourceGroup") {
|
||||
logger.warn(
|
||||
`Notice: the resource group '${environment.get(
|
||||
"resourceGroupName"
|
||||
)}' was not cleaned up.`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const operationIdCoverageResult = this.swaggerAnalyzer.calculateOperationCoverage(scenarioDef);
|
||||
logger.info(
|
||||
`Operation coverage ${(operationIdCoverageResult.coverage * 100).toFixed(2) + "%"} (${
|
||||
operationIdCoverageResult.coveredOperationNumber
|
||||
}/${operationIdCoverageResult.totalOperationNumber})`
|
||||
);
|
||||
if (operationIdCoverageResult.uncoveredOperationIds.length > 0) {
|
||||
logger.verbose("Uncovered operationIds: ");
|
||||
logger.verbose(operationIdCoverageResult.uncoveredOperationIds);
|
||||
}
|
||||
|
||||
if (this.opt.html && this.opt.runCollection) {
|
||||
await this.generateHtmlReport(scenarioDef);
|
||||
}
|
||||
|
||||
return collection;
|
||||
const [collection, environment] = client.outputCollection();
|
||||
this.environment = environment;
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
private async generateHtmlReport(scenarioDef: ScenarioDefinition) {
|
||||
private async generateHtmlReport() {
|
||||
const trafficValidationResult = new Array<TrafficValidationIssue>();
|
||||
const reportExportPath = path.resolve(
|
||||
this.opt.outputFolder,
|
||||
`${defaultNewmanDir(this.opt.name, this.opt.runId!)}`
|
||||
`${defaultNewmanDir(this.scenarioDef.name, this.opt.runId!)}`
|
||||
);
|
||||
|
||||
let providerNamespace;
|
||||
|
@ -269,8 +353,9 @@ export class PostmanCollectionGenerator {
|
|||
}
|
||||
}
|
||||
|
||||
const operationIdCoverageResult =
|
||||
this.swaggerAnalyzer.calculateOperationCoverageBySpec(scenarioDef);
|
||||
const operationIdCoverageResult = this.swaggerAnalyzer.calculateOperationCoverageBySpec(
|
||||
this.scenarioDef
|
||||
);
|
||||
|
||||
const operationCoverageResult: OperationCoverageInfo[] = [];
|
||||
operationIdCoverageResult.forEach((result, key) => {
|
||||
|
@ -358,11 +443,11 @@ export class PostmanCollectionGenerator {
|
|||
) {
|
||||
const collectionPath = path.resolve(
|
||||
this.opt.outputFolder,
|
||||
`${defaultCollectionFileName(this.opt.name, this.opt.runId!)}`
|
||||
`${defaultCollectionFileName(collectionName, this.opt.runId!)}`
|
||||
);
|
||||
const envPath = path.resolve(
|
||||
this.opt.outputFolder,
|
||||
`${defaultEnvFileName(this.opt.name, this.opt.runId!)}`
|
||||
`${defaultEnvFileName(collectionName, this.opt.runId!)}`
|
||||
);
|
||||
const env = runtimeEnv.toJSON();
|
||||
env.name = collectionName + ".env";
|
||||
|
@ -383,7 +468,7 @@ export class PostmanCollectionGenerator {
|
|||
logger.info(`Postman env: ${envPath}`);
|
||||
}
|
||||
|
||||
private async doRun(runOptions: NewmanRunOptions) {
|
||||
private async doRunCollection(runOptions: NewmanRunOptions) {
|
||||
const newmanRun = async () =>
|
||||
new Promise<NewmanRunSummary>((resolve, reject) => {
|
||||
newman.run(runOptions, function (err, summary) {
|
||||
|
@ -429,7 +514,6 @@ export class PostmanCollectionGenerator {
|
|||
|
||||
const newmanReportValidatorOption: NewmanReportValidatorOption = {
|
||||
apiScenarioFilePath: scenario._scenarioDef._filePath,
|
||||
swaggerFilePaths: scenario._scenarioDef._swaggerFilePaths,
|
||||
reportOutputFilePath: defaultQualityReportFilePath(reportExportPath),
|
||||
checkUnderFileRoot: false,
|
||||
eraseXmsExamples: false,
|
||||
|
@ -454,3 +538,35 @@ export class PostmanCollectionGenerator {
|
|||
await reportValidator.generateReport(newmanReport);
|
||||
}
|
||||
}
|
||||
|
||||
@injectable()
|
||||
export class PostmanCollectionGenerator {
|
||||
public runnerMap = new Map<string, PostmanCollectionRunner>();
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
|
||||
constructor(@inject(TYPES.opts) private opt: PostmanCollectionGeneratorOption) {}
|
||||
|
||||
public async run(scenarioFile: string, skipCleanUp: boolean = false): Promise<Collection> {
|
||||
const runner = PostmanCollectionRunner.create({
|
||||
scenarioFile: scenarioFile,
|
||||
generator: this,
|
||||
...this.opt,
|
||||
});
|
||||
|
||||
const collection = await runner.run();
|
||||
|
||||
await runner.cleanUp(skipCleanUp);
|
||||
|
||||
await runner.generateReport();
|
||||
|
||||
return collection;
|
||||
}
|
||||
|
||||
public async cleanUpAll(skipCleanUp: boolean = false): Promise<void> {
|
||||
for (const runner of this.runnerMap.values()) {
|
||||
await runner.cleanUp(skipCleanUp);
|
||||
await runner.generateReport();
|
||||
}
|
||||
this.runnerMap.clear();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import { pathDirName, pathJoin, pathResolve } from "@azure-tools/openapi-tools-common";
|
||||
import { findReadMe } from "@azure/openapi-markdown";
|
||||
import * as yargs from "yargs";
|
||||
|
@ -172,63 +171,63 @@ export async function handler(argv: yargs.Arguments): Promise<void> {
|
|||
logger.info("scenario-file:");
|
||||
logger.info(scenarioFiles);
|
||||
|
||||
for (const scenarioFilePath of scenarioFiles) {
|
||||
let env: EnvironmentVariables = {};
|
||||
if (argv.envFile !== undefined) {
|
||||
env = JSON.parse(fs.readFileSync(argv.envFile).toString());
|
||||
}
|
||||
if (process.env[apiScenarioEnvKey]) {
|
||||
const envFromVariable = JSON.parse(process.env[apiScenarioEnvKey] as string);
|
||||
for (const key of Object.keys(envFromVariable)) {
|
||||
if (env[key] !== undefined && envFromVariable[key] !== env[key]) {
|
||||
logger.warn(
|
||||
`Notice: the variable '${key}' in '${argv.e}' is overwritten by the variable in the environment '${apiScenarioEnvKey}'.`
|
||||
);
|
||||
}
|
||||
}
|
||||
env = { ...env, ...envFromVariable };
|
||||
}
|
||||
|
||||
if (argv.armEndpoint !== undefined) {
|
||||
env.armEndpoint = argv.armEndpoint;
|
||||
}
|
||||
if (argv.location !== undefined) {
|
||||
env.location = argv.location;
|
||||
}
|
||||
if (argv.subscriptionId !== undefined) {
|
||||
env.subscriptionId = argv.subscriptionId;
|
||||
}
|
||||
if (argv.resourceGroup !== undefined) {
|
||||
env.resourceGroupName = argv.resourceGroup;
|
||||
}
|
||||
|
||||
const opt: PostmanCollectionGeneratorOption = {
|
||||
name: path.basename(scenarioFilePath),
|
||||
scenarioDef: scenarioFilePath,
|
||||
fileRoot: fileRoot,
|
||||
checkUnderFileRoot: false,
|
||||
generateCollection: true,
|
||||
useJsonParser: false,
|
||||
runCollection: !argv.dryRun,
|
||||
env,
|
||||
outputFolder: argv.output,
|
||||
markdown: (argv.report ?? []).includes("markdown"),
|
||||
junit: (argv.report ?? []).includes("junit"),
|
||||
html: (argv.report ?? []).includes("html"),
|
||||
eraseXmsExamples: false,
|
||||
eraseDescription: false,
|
||||
testProxy: argv.testProxy,
|
||||
skipValidation: argv.skipValidation,
|
||||
savePayload: argv.savePayload,
|
||||
generateExample: argv.generateExample,
|
||||
skipCleanUp: argv.skipCleanUp,
|
||||
verbose: ["verbose", "debug", "silly"].indexOf(argv.logLevel) >= 0,
|
||||
swaggerFilePaths: swaggerFilePaths,
|
||||
devMode: argv.devMode,
|
||||
};
|
||||
const generator = inversifyGetInstance(PostmanCollectionGenerator, opt);
|
||||
await generator.run();
|
||||
let env: EnvironmentVariables = {};
|
||||
if (argv.envFile !== undefined) {
|
||||
env = JSON.parse(fs.readFileSync(argv.envFile).toString());
|
||||
}
|
||||
if (process.env[apiScenarioEnvKey]) {
|
||||
const envFromVariable = JSON.parse(process.env[apiScenarioEnvKey] as string);
|
||||
for (const key of Object.keys(envFromVariable)) {
|
||||
if (env[key] !== undefined && envFromVariable[key] !== env[key]) {
|
||||
logger.warn(
|
||||
`Notice: the variable '${key}' in '${argv.e}' is overwritten by the variable in the environment '${apiScenarioEnvKey}'.`
|
||||
);
|
||||
}
|
||||
}
|
||||
env = { ...env, ...envFromVariable };
|
||||
}
|
||||
|
||||
if (argv.armEndpoint !== undefined) {
|
||||
env.armEndpoint = argv.armEndpoint;
|
||||
}
|
||||
if (argv.location !== undefined) {
|
||||
env.location = argv.location;
|
||||
}
|
||||
if (argv.subscriptionId !== undefined) {
|
||||
env.subscriptionId = argv.subscriptionId;
|
||||
}
|
||||
if (argv.resourceGroup !== undefined) {
|
||||
env.resourceGroupName = argv.resourceGroup;
|
||||
}
|
||||
|
||||
const opt: PostmanCollectionGeneratorOption = {
|
||||
fileRoot: fileRoot,
|
||||
checkUnderFileRoot: false,
|
||||
swaggerFilePaths: swaggerFilePaths,
|
||||
generateCollection: true,
|
||||
useJsonParser: false,
|
||||
runCollection: !argv.dryRun,
|
||||
env,
|
||||
outputFolder: argv.output,
|
||||
markdown: (argv.report ?? []).includes("markdown"),
|
||||
junit: (argv.report ?? []).includes("junit"),
|
||||
html: (argv.report ?? []).includes("html"),
|
||||
eraseXmsExamples: false,
|
||||
eraseDescription: false,
|
||||
testProxy: argv.testProxy,
|
||||
skipValidation: argv.skipValidation,
|
||||
savePayload: argv.savePayload,
|
||||
generateExample: argv.generateExample,
|
||||
verbose: ["verbose", "debug", "silly"].indexOf(argv.logLevel) >= 0,
|
||||
devMode: argv.devMode,
|
||||
};
|
||||
const generator = inversifyGetInstance(PostmanCollectionGenerator, opt);
|
||||
|
||||
for (const scenarioFile of scenarioFiles) {
|
||||
await generator.run(scenarioFile, argv.skipCleanUp);
|
||||
}
|
||||
|
||||
await generator.cleanUpAll();
|
||||
|
||||
return 0;
|
||||
});
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "oav",
|
||||
"version": "3.2.4",
|
||||
"version": "3.3.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "oav",
|
||||
"version": "3.2.4",
|
||||
"version": "3.3.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@autorest/schemas": "^1.3.4",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "oav",
|
||||
"version": "3.2.4",
|
||||
"version": "3.3.0",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation",
|
||||
"email": "azsdkteam@microsoft.com",
|
||||
|
|
|
@ -2015,6 +2015,921 @@ Object {
|
|||
}
|
||||
`;
|
||||
|
||||
exports[`postmanCollectionGenerator should generate PostmanCollection - cognitiveservices language data plane 1`] = `
|
||||
Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"event": Array [
|
||||
Object {
|
||||
"id": "7wi32c",
|
||||
"listen": "prerequest",
|
||||
"script": Object {
|
||||
"exec": Array [
|
||||
"
|
||||
if (pm.variables.get(\\"x_enable_auth\\") !== \\"true\\") {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
!pm.variables.get(\\"x_bearer_token_0\\") ||
|
||||
Date.now() >
|
||||
new Date(pm.variables.get(\\"x_bearer_token_0_expires_on\\") * 1000)
|
||||
) {
|
||||
let vars = [\\"client_id\\", \\"client_secret\\", \\"tenantId\\"];
|
||||
vars.forEach(function (item, index, array) {
|
||||
pm.expect(
|
||||
pm.variables.get(item),
|
||||
item + \\" variable not set\\"
|
||||
).to.not.be.undefined;
|
||||
pm.expect(pm.variables.get(item), item + \\" variable not set\\").to.not.be.empty;
|
||||
});
|
||||
pm.sendRequest(
|
||||
{
|
||||
url:
|
||||
\\"https://login.microsoftonline.com/\\" +
|
||||
pm.variables.get(\\"tenantId\\") +
|
||||
\\"/oauth2/v2.0/token\\",
|
||||
method: \\"POST\\",
|
||||
header: \\"Content-Type: application/x-www-form-urlencoded\\",
|
||||
body: {
|
||||
mode: \\"urlencoded\\",
|
||||
urlencoded: [
|
||||
{ key: \\"grant_type\\", value: \\"client_credentials\\", disabled: false },
|
||||
{
|
||||
key: \\"client_id\\",
|
||||
value: pm.variables.get(\\"client_id\\"),
|
||||
disabled: false,
|
||||
},
|
||||
{
|
||||
key: \\"client_secret\\",
|
||||
value: pm.variables.get(\\"client_secret\\"),
|
||||
disabled: false,
|
||||
},
|
||||
{ key: \\"scope\\", value: \\"https://cognitiveservices.azure.com/.default\\", disabled: false },
|
||||
],
|
||||
},
|
||||
},
|
||||
function (err, res) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
} else {
|
||||
let resJson = res.json();
|
||||
pm.environment.set(
|
||||
\\"x_bearer_token_0_expires_on\\",
|
||||
resJson.expires_in + Math.floor(Date.now() / 1000)
|
||||
);
|
||||
pm.environment.set(\\"x_bearer_token_0\\", resJson.access_token);
|
||||
}
|
||||
}
|
||||
);
|
||||
}",
|
||||
],
|
||||
"id": "1rcvet",
|
||||
"type": "text/javascript",
|
||||
},
|
||||
},
|
||||
],
|
||||
"info": Object {
|
||||
"_postman_id": "jestRunId",
|
||||
"description": Object {
|
||||
"content": "{\\"apiScenarioFilePath\\":\\"Language/preview/2022-10-01-preview/scenarios/ConversationAuthoring.yaml\\",\\"swaggerFilePaths\\":[\\"Language/preview/2022-10-01-preview/analyzeconversations-authoring.json\\",\\"Language/preview/2022-10-01-preview/analyzetext.json\\"]}",
|
||||
"type": "text/plain",
|
||||
},
|
||||
"name": "ConversationAuthoring",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
|
||||
"version": undefined,
|
||||
},
|
||||
"item": Array [
|
||||
Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"description": Object {
|
||||
"content": "",
|
||||
"type": "text/plain",
|
||||
},
|
||||
"event": Array [],
|
||||
"id": "4fy274",
|
||||
"item": Array [
|
||||
Object {
|
||||
"description": "{\\"type\\":\\"simple\\",\\"operationId\\":\\"ConversationalAnalysisAuthoring_ListProjects\\",\\"itemName\\":\\"ConversationalAnalysisAuthoring_ListProjects\\",\\"step\\":\\"ConversationalAnalysisAuthoring_ListProjects\\"}",
|
||||
"event": Array [
|
||||
Object {
|
||||
"id": "3l45xk",
|
||||
"listen": "test",
|
||||
"script": Object {
|
||||
"exec": Array [
|
||||
"pm.test(\\"response status code assertion.\\", function() {",
|
||||
"pm.response.to.be.success;",
|
||||
"});",
|
||||
],
|
||||
"id": "1ueh28",
|
||||
"type": "text/javascript",
|
||||
},
|
||||
},
|
||||
],
|
||||
"id": "vov58h",
|
||||
"name": "ConversationalAnalysisAuthoring_ListProjects",
|
||||
"request": Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"body": Object {},
|
||||
"method": "GET",
|
||||
"url": Object {
|
||||
"host": Array [
|
||||
"{{Endpoint}}",
|
||||
],
|
||||
"path": Array [
|
||||
"language",
|
||||
"authoring",
|
||||
"analyze-conversations",
|
||||
"projects",
|
||||
],
|
||||
"query": Array [
|
||||
Object {
|
||||
"key": "api-version",
|
||||
"value": "2022-10-01-preview",
|
||||
},
|
||||
],
|
||||
"variable": Array [],
|
||||
},
|
||||
},
|
||||
"response": Array [],
|
||||
},
|
||||
],
|
||||
"name": "GetProjects",
|
||||
},
|
||||
Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"description": Object {
|
||||
"content": "",
|
||||
"type": "text/plain",
|
||||
},
|
||||
"event": Array [],
|
||||
"id": "3q0yb6",
|
||||
"item": Array [
|
||||
Object {
|
||||
"description": "{\\"type\\":\\"simple\\",\\"operationId\\":\\"ConversationalAnalysisAuthoring_ListProjects\\",\\"itemName\\":\\"ConversationalAnalysisAuthoring_ListProjects\\",\\"step\\":\\"ConversationalAnalysisAuthoring_ListProjects\\"}",
|
||||
"event": Array [
|
||||
Object {
|
||||
"id": "m388ep",
|
||||
"listen": "test",
|
||||
"script": Object {
|
||||
"exec": Array [
|
||||
"pm.test(\\"response status code assertion.\\", function() {",
|
||||
"pm.response.to.be.success;",
|
||||
"});",
|
||||
],
|
||||
"id": "qq5z84",
|
||||
"type": "text/javascript",
|
||||
},
|
||||
},
|
||||
],
|
||||
"id": "6w00ic",
|
||||
"name": "ConversationalAnalysisAuthoring_ListProjects",
|
||||
"request": Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"body": Object {},
|
||||
"method": "GET",
|
||||
"url": Object {
|
||||
"host": Array [
|
||||
"{{Endpoint}}",
|
||||
],
|
||||
"path": Array [
|
||||
"language",
|
||||
"authoring",
|
||||
"analyze-conversations",
|
||||
"projects",
|
||||
],
|
||||
"query": Array [
|
||||
Object {
|
||||
"key": "api-version",
|
||||
"value": "2022-10-01-preview",
|
||||
},
|
||||
],
|
||||
"variable": Array [],
|
||||
},
|
||||
},
|
||||
"response": Array [],
|
||||
},
|
||||
],
|
||||
"name": "GetProjectsAsync",
|
||||
},
|
||||
Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"description": Object {
|
||||
"content": "",
|
||||
"type": "text/plain",
|
||||
},
|
||||
"event": Array [],
|
||||
"id": "j917fd",
|
||||
"item": Array [
|
||||
Object {
|
||||
"description": "{\\"type\\":\\"simple\\",\\"operationId\\":\\"ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities\\",\\"itemName\\":\\"ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities\\",\\"step\\":\\"ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities\\"}",
|
||||
"event": Array [
|
||||
Object {
|
||||
"id": "un6yyw",
|
||||
"listen": "test",
|
||||
"script": Object {
|
||||
"exec": Array [
|
||||
"pm.test(\\"response status code assertion.\\", function() {",
|
||||
"pm.response.to.be.success;",
|
||||
"});",
|
||||
],
|
||||
"id": "igg58r",
|
||||
"type": "text/javascript",
|
||||
},
|
||||
},
|
||||
],
|
||||
"id": "rxgyxc",
|
||||
"name": "ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities",
|
||||
"request": Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"body": Object {},
|
||||
"method": "GET",
|
||||
"url": Object {
|
||||
"host": Array [
|
||||
"{{Endpoint}}",
|
||||
],
|
||||
"path": Array [
|
||||
"language",
|
||||
"authoring",
|
||||
"analyze-conversations",
|
||||
"projects",
|
||||
"global",
|
||||
"prebuilt-entities",
|
||||
],
|
||||
"query": Array [
|
||||
Object {
|
||||
"key": "language",
|
||||
"value": "es",
|
||||
},
|
||||
Object {
|
||||
"key": "multilingual",
|
||||
"value": "false",
|
||||
},
|
||||
Object {
|
||||
"key": "api-version",
|
||||
"value": "2022-10-01-preview",
|
||||
},
|
||||
],
|
||||
"variable": Array [],
|
||||
},
|
||||
},
|
||||
"response": Array [],
|
||||
},
|
||||
],
|
||||
"name": "GetSupportedLanguageSpecificPrebuiltEntities",
|
||||
},
|
||||
Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"description": Object {
|
||||
"content": "",
|
||||
"type": "text/plain",
|
||||
},
|
||||
"event": Array [],
|
||||
"id": "zfkej6",
|
||||
"item": Array [
|
||||
Object {
|
||||
"description": "{\\"type\\":\\"simple\\",\\"operationId\\":\\"ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities\\",\\"itemName\\":\\"ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities\\",\\"step\\":\\"ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities\\"}",
|
||||
"event": Array [
|
||||
Object {
|
||||
"id": "h1l4hw",
|
||||
"listen": "test",
|
||||
"script": Object {
|
||||
"exec": Array [
|
||||
"pm.test(\\"response status code assertion.\\", function() {",
|
||||
"pm.response.to.be.success;",
|
||||
"});",
|
||||
],
|
||||
"id": "ezqs5q",
|
||||
"type": "text/javascript",
|
||||
},
|
||||
},
|
||||
],
|
||||
"id": "9e4snq",
|
||||
"name": "ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities",
|
||||
"request": Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"body": Object {},
|
||||
"method": "GET",
|
||||
"url": Object {
|
||||
"host": Array [
|
||||
"{{Endpoint}}",
|
||||
],
|
||||
"path": Array [
|
||||
"language",
|
||||
"authoring",
|
||||
"analyze-conversations",
|
||||
"projects",
|
||||
"global",
|
||||
"prebuilt-entities",
|
||||
],
|
||||
"query": Array [
|
||||
Object {
|
||||
"key": "language",
|
||||
"value": "es",
|
||||
},
|
||||
Object {
|
||||
"key": "multilingual",
|
||||
"value": "false",
|
||||
},
|
||||
Object {
|
||||
"key": "api-version",
|
||||
"value": "2022-10-01-preview",
|
||||
},
|
||||
],
|
||||
"variable": Array [],
|
||||
},
|
||||
},
|
||||
"response": Array [],
|
||||
},
|
||||
],
|
||||
"name": "GetSupportedLanguageSpecificPrebuiltEntitiesAsync",
|
||||
},
|
||||
Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"description": Object {
|
||||
"content": "",
|
||||
"type": "text/plain",
|
||||
},
|
||||
"event": Array [],
|
||||
"id": "cb8v3t",
|
||||
"item": Array [
|
||||
Object {
|
||||
"description": "{\\"type\\":\\"simple\\",\\"operationId\\":\\"ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities\\",\\"itemName\\":\\"ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities\\",\\"step\\":\\"ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities\\"}",
|
||||
"event": Array [
|
||||
Object {
|
||||
"id": "9vqoea",
|
||||
"listen": "test",
|
||||
"script": Object {
|
||||
"exec": Array [
|
||||
"pm.test(\\"response status code assertion.\\", function() {",
|
||||
"pm.response.to.be.success;",
|
||||
"});",
|
||||
],
|
||||
"id": "9atymt",
|
||||
"type": "text/javascript",
|
||||
},
|
||||
},
|
||||
],
|
||||
"id": "x7qdfp",
|
||||
"name": "ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities",
|
||||
"request": Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"body": Object {},
|
||||
"method": "GET",
|
||||
"url": Object {
|
||||
"host": Array [
|
||||
"{{Endpoint}}",
|
||||
],
|
||||
"path": Array [
|
||||
"language",
|
||||
"authoring",
|
||||
"analyze-conversations",
|
||||
"projects",
|
||||
"global",
|
||||
"prebuilt-entities",
|
||||
],
|
||||
"query": Array [
|
||||
Object {
|
||||
"key": "multilingual",
|
||||
"value": "true",
|
||||
},
|
||||
Object {
|
||||
"key": "api-version",
|
||||
"value": "2022-10-01-preview",
|
||||
},
|
||||
],
|
||||
"variable": Array [],
|
||||
},
|
||||
},
|
||||
"response": Array [],
|
||||
},
|
||||
],
|
||||
"name": "GetSupportedMultilingualPrebuiltEntities",
|
||||
},
|
||||
Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"description": Object {
|
||||
"content": "",
|
||||
"type": "text/plain",
|
||||
},
|
||||
"event": Array [],
|
||||
"id": "d39qgw",
|
||||
"item": Array [
|
||||
Object {
|
||||
"description": "{\\"type\\":\\"simple\\",\\"operationId\\":\\"ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities\\",\\"itemName\\":\\"ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities\\",\\"step\\":\\"ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities\\"}",
|
||||
"event": Array [
|
||||
Object {
|
||||
"id": "x6exws",
|
||||
"listen": "test",
|
||||
"script": Object {
|
||||
"exec": Array [
|
||||
"pm.test(\\"response status code assertion.\\", function() {",
|
||||
"pm.response.to.be.success;",
|
||||
"});",
|
||||
],
|
||||
"id": "6qbw4d",
|
||||
"type": "text/javascript",
|
||||
},
|
||||
},
|
||||
],
|
||||
"id": "jhzmpv",
|
||||
"name": "ConversationalAnalysisAuthoring_GetSupportedPrebuiltEntities",
|
||||
"request": Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"body": Object {},
|
||||
"method": "GET",
|
||||
"url": Object {
|
||||
"host": Array [
|
||||
"{{Endpoint}}",
|
||||
],
|
||||
"path": Array [
|
||||
"language",
|
||||
"authoring",
|
||||
"analyze-conversations",
|
||||
"projects",
|
||||
"global",
|
||||
"prebuilt-entities",
|
||||
],
|
||||
"query": Array [
|
||||
Object {
|
||||
"key": "multilingual",
|
||||
"value": "true",
|
||||
},
|
||||
Object {
|
||||
"key": "api-version",
|
||||
"value": "2022-10-01-preview",
|
||||
},
|
||||
],
|
||||
"variable": Array [],
|
||||
},
|
||||
},
|
||||
"response": Array [],
|
||||
},
|
||||
],
|
||||
"name": "GetSupportedMultilingualPrebuiltEntitiesAsync",
|
||||
},
|
||||
Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"description": Object {
|
||||
"content": "",
|
||||
"type": "text/plain",
|
||||
},
|
||||
"event": Array [],
|
||||
"id": "bhuvqx",
|
||||
"item": Array [
|
||||
Object {
|
||||
"description": "{\\"type\\":\\"simple\\",\\"operationId\\":\\"ConversationalAnalysisAuthoring_ListTrainedModels\\",\\"itemName\\":\\"ConversationalAnalysisAuthoring_ListTrainedModels\\",\\"step\\":\\"ConversationalAnalysisAuthoring_ListTrainedModels\\"}",
|
||||
"event": Array [
|
||||
Object {
|
||||
"id": "7oxzx1",
|
||||
"listen": "test",
|
||||
"script": Object {
|
||||
"exec": Array [
|
||||
"pm.test(\\"response status code assertion.\\", function() {",
|
||||
"pm.response.to.be.success;",
|
||||
"});",
|
||||
],
|
||||
"id": "ssi2a8",
|
||||
"type": "text/javascript",
|
||||
},
|
||||
},
|
||||
],
|
||||
"id": "le21m4",
|
||||
"name": "ConversationalAnalysisAuthoring_ListTrainedModels",
|
||||
"request": Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"body": Object {},
|
||||
"method": "GET",
|
||||
"url": Object {
|
||||
"host": Array [
|
||||
"{{Endpoint}}",
|
||||
],
|
||||
"path": Array [
|
||||
"language",
|
||||
"authoring",
|
||||
"analyze-conversations",
|
||||
"projects",
|
||||
":projectName",
|
||||
"models",
|
||||
],
|
||||
"query": Array [
|
||||
Object {
|
||||
"key": "api-version",
|
||||
"value": "2022-10-01-preview",
|
||||
},
|
||||
],
|
||||
"variable": Array [
|
||||
Object {
|
||||
"key": "projectName",
|
||||
"type": "any",
|
||||
"value": "CLUScriptDeployed",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
"response": Array [],
|
||||
},
|
||||
],
|
||||
"name": "GetTrainedModels",
|
||||
},
|
||||
Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"description": Object {
|
||||
"content": "",
|
||||
"type": "text/plain",
|
||||
},
|
||||
"event": Array [],
|
||||
"id": "cdpopn",
|
||||
"item": Array [
|
||||
Object {
|
||||
"description": "{\\"type\\":\\"simple\\",\\"operationId\\":\\"ConversationalAnalysisAuthoring_ListTrainedModels\\",\\"itemName\\":\\"ConversationalAnalysisAuthoring_ListTrainedModels\\",\\"step\\":\\"ConversationalAnalysisAuthoring_ListTrainedModels\\"}",
|
||||
"event": Array [
|
||||
Object {
|
||||
"id": "49cuyt",
|
||||
"listen": "test",
|
||||
"script": Object {
|
||||
"exec": Array [
|
||||
"pm.test(\\"response status code assertion.\\", function() {",
|
||||
"pm.response.to.be.success;",
|
||||
"});",
|
||||
],
|
||||
"id": "8ew1jk",
|
||||
"type": "text/javascript",
|
||||
},
|
||||
},
|
||||
],
|
||||
"id": "5sx5dw",
|
||||
"name": "ConversationalAnalysisAuthoring_ListTrainedModels",
|
||||
"request": Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"body": Object {},
|
||||
"method": "GET",
|
||||
"url": Object {
|
||||
"host": Array [
|
||||
"{{Endpoint}}",
|
||||
],
|
||||
"path": Array [
|
||||
"language",
|
||||
"authoring",
|
||||
"analyze-conversations",
|
||||
"projects",
|
||||
":projectName",
|
||||
"models",
|
||||
],
|
||||
"query": Array [
|
||||
Object {
|
||||
"key": "api-version",
|
||||
"value": "2022-10-01-preview",
|
||||
},
|
||||
],
|
||||
"variable": Array [
|
||||
Object {
|
||||
"key": "projectName",
|
||||
"type": "any",
|
||||
"value": "CLUScriptDeployed",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
"response": Array [],
|
||||
},
|
||||
],
|
||||
"name": "GetTrainedModelsAsync",
|
||||
},
|
||||
Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"description": Object {
|
||||
"content": "",
|
||||
"type": "text/plain",
|
||||
},
|
||||
"event": Array [],
|
||||
"id": "x6oaag",
|
||||
"item": Array [
|
||||
Object {
|
||||
"description": "{\\"type\\":\\"simple\\",\\"operationId\\":\\"ConversationalAnalysisAuthoring_ListProjects\\",\\"itemName\\":\\"ConversationalAnalysisAuthoring_ListProjects\\",\\"step\\":\\"ConversationalAnalysisAuthoring_ListProjects\\"}",
|
||||
"event": Array [
|
||||
Object {
|
||||
"id": "db187u",
|
||||
"listen": "test",
|
||||
"script": Object {
|
||||
"exec": Array [
|
||||
"pm.test(\\"response status code assertion.\\", function() {",
|
||||
"pm.response.to.be.success;",
|
||||
"});",
|
||||
],
|
||||
"id": "2tccjb",
|
||||
"type": "text/javascript",
|
||||
},
|
||||
},
|
||||
],
|
||||
"id": "i544h5",
|
||||
"name": "ConversationalAnalysisAuthoring_ListProjects",
|
||||
"request": Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"body": Object {},
|
||||
"method": "GET",
|
||||
"url": Object {
|
||||
"host": Array [
|
||||
"{{Endpoint}}",
|
||||
],
|
||||
"path": Array [
|
||||
"language",
|
||||
"authoring",
|
||||
"analyze-conversations",
|
||||
"projects",
|
||||
],
|
||||
"query": Array [
|
||||
Object {
|
||||
"key": "api-version",
|
||||
"value": "2022-10-01-preview",
|
||||
},
|
||||
],
|
||||
"variable": Array [],
|
||||
},
|
||||
},
|
||||
"response": Array [],
|
||||
},
|
||||
],
|
||||
"name": "SupportsAadAuthentication",
|
||||
},
|
||||
Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"description": Object {
|
||||
"content": "",
|
||||
"type": "text/plain",
|
||||
},
|
||||
"event": Array [],
|
||||
"id": "b9q1ra",
|
||||
"item": Array [
|
||||
Object {
|
||||
"description": "{\\"type\\":\\"simple\\",\\"operationId\\":\\"ConversationalAnalysisAuthoring_ListProjects\\",\\"itemName\\":\\"ConversationalAnalysisAuthoring_ListProjects\\",\\"step\\":\\"ConversationalAnalysisAuthoring_ListProjects\\"}",
|
||||
"event": Array [
|
||||
Object {
|
||||
"id": "wpbvc4",
|
||||
"listen": "test",
|
||||
"script": Object {
|
||||
"exec": Array [
|
||||
"pm.test(\\"response status code assertion.\\", function() {",
|
||||
"pm.response.to.be.success;",
|
||||
"});",
|
||||
],
|
||||
"id": "6rfjty",
|
||||
"type": "text/javascript",
|
||||
},
|
||||
},
|
||||
],
|
||||
"id": "3zgew6",
|
||||
"name": "ConversationalAnalysisAuthoring_ListProjects",
|
||||
"request": Object {
|
||||
"auth": Object {
|
||||
"bearer": Array [
|
||||
Object {
|
||||
"key": "token",
|
||||
"type": "string",
|
||||
"value": "{{x_bearer_token_0}}",
|
||||
},
|
||||
],
|
||||
"type": "bearer",
|
||||
},
|
||||
"body": Object {},
|
||||
"method": "GET",
|
||||
"url": Object {
|
||||
"host": Array [
|
||||
"{{Endpoint}}",
|
||||
],
|
||||
"path": Array [
|
||||
"language",
|
||||
"authoring",
|
||||
"analyze-conversations",
|
||||
"projects",
|
||||
],
|
||||
"query": Array [
|
||||
Object {
|
||||
"key": "api-version",
|
||||
"value": "2022-10-01-preview",
|
||||
},
|
||||
],
|
||||
"variable": Array [],
|
||||
},
|
||||
},
|
||||
"response": Array [],
|
||||
},
|
||||
],
|
||||
"name": "SupportsAadAuthenticationAsync",
|
||||
},
|
||||
],
|
||||
"variable": Array [
|
||||
Object {
|
||||
"key": "subscriptionId",
|
||||
"type": "any",
|
||||
},
|
||||
Object {
|
||||
"key": "resourceGroupName",
|
||||
"type": "any",
|
||||
},
|
||||
Object {
|
||||
"key": "location",
|
||||
"type": "any",
|
||||
},
|
||||
Object {
|
||||
"key": "client_id",
|
||||
"type": "any",
|
||||
},
|
||||
Object {
|
||||
"key": "client_secret",
|
||||
"type": "any",
|
||||
},
|
||||
Object {
|
||||
"key": "tenantId",
|
||||
"type": "any",
|
||||
},
|
||||
Object {
|
||||
"key": "x_enable_auth",
|
||||
"type": "any",
|
||||
"value": "true",
|
||||
},
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`postmanCollectionGenerator should generate PostmanCollection - enableTestProxy 1`] = `
|
||||
Object {
|
||||
"auth": Object {
|
||||
|
|
|
@ -9,12 +9,12 @@ describe("ApiScenarioLoader", () => {
|
|||
useJsonParser: false,
|
||||
checkUnderFileRoot: false,
|
||||
fileRoot,
|
||||
swaggerFilePaths: ["Microsoft.Storage/stable/2021-08-01/storage.json"],
|
||||
includeOperation: false,
|
||||
});
|
||||
|
||||
const testDef = await loader.load(
|
||||
"Microsoft.Storage/stable/2021-08-01/scenarios/storageQuickStart.yaml"
|
||||
"Microsoft.Storage/stable/2021-08-01/scenarios/storageQuickStart.yaml",
|
||||
["Microsoft.Storage/stable/2021-08-01/storage.json"]
|
||||
);
|
||||
|
||||
expect(testDef).toMatchSnapshot();
|
||||
|
@ -28,12 +28,12 @@ describe("ApiScenarioLoader", () => {
|
|||
eraseXmsExamples: false,
|
||||
checkUnderFileRoot: false,
|
||||
fileRoot,
|
||||
swaggerFilePaths: ["Microsoft.Storage/stable/2021-08-01/storage.json"],
|
||||
includeOperation: false,
|
||||
});
|
||||
|
||||
const testDef = await loader.load(
|
||||
"Microsoft.Storage/stable/2021-08-01/scenarios/storageBasicExample.yaml"
|
||||
"Microsoft.Storage/stable/2021-08-01/scenarios/storageBasicExample.yaml",
|
||||
["Microsoft.Storage/stable/2021-08-01/storage.json"]
|
||||
);
|
||||
|
||||
expect(testDef).toMatchSnapshot();
|
||||
|
@ -46,11 +46,12 @@ describe("ApiScenarioLoader", () => {
|
|||
useJsonParser: false,
|
||||
checkUnderFileRoot: false,
|
||||
fileRoot,
|
||||
swaggerFilePaths: ["Microsoft.AppConfiguration/stable/1.0/appconfiguration.json"],
|
||||
includeOperation: false,
|
||||
});
|
||||
|
||||
const testDef = await loader.load("Microsoft.AppConfiguration/stable/1.0/scenarios/crud.yaml");
|
||||
const testDef = await loader.load("Microsoft.AppConfiguration/stable/1.0/scenarios/crud.yaml", [
|
||||
"Microsoft.AppConfiguration/stable/1.0/appconfiguration.json",
|
||||
]);
|
||||
|
||||
expect(testDef).toMatchSnapshot();
|
||||
});
|
||||
|
@ -62,12 +63,12 @@ describe("ApiScenarioLoader", () => {
|
|||
useJsonParser: false,
|
||||
checkUnderFileRoot: false,
|
||||
fileRoot,
|
||||
swaggerFilePaths: ["Microsoft.Compute/stable/2021-11-01/compute.json"],
|
||||
includeOperation: false,
|
||||
});
|
||||
|
||||
const testDef = await loader.load(
|
||||
"Microsoft.Compute/stable/2021-11-01/scenarios/quickstart.yaml"
|
||||
"Microsoft.Compute/stable/2021-11-01/scenarios/quickstart.yaml",
|
||||
["Microsoft.Compute/stable/2021-11-01/compute.json"]
|
||||
);
|
||||
|
||||
expect(testDef).toMatchSnapshot();
|
||||
|
@ -80,12 +81,12 @@ describe("ApiScenarioLoader", () => {
|
|||
useJsonParser: false,
|
||||
checkUnderFileRoot: false,
|
||||
fileRoot,
|
||||
swaggerFilePaths: ["Microsoft.Compute/stable/2021-11-01/compute.json"],
|
||||
includeOperation: false,
|
||||
});
|
||||
|
||||
const testDef = await loader.load(
|
||||
"Microsoft.Compute/stable/2021-11-01/scenarios/quickstart_deps.yaml"
|
||||
"Microsoft.Compute/stable/2021-11-01/scenarios/quickstart_deps.yaml",
|
||||
["Microsoft.Compute/stable/2021-11-01/compute.json"]
|
||||
);
|
||||
|
||||
expect(testDef).toMatchSnapshot();
|
||||
|
@ -98,12 +99,12 @@ describe("ApiScenarioLoader", () => {
|
|||
useJsonParser: false,
|
||||
checkUnderFileRoot: false,
|
||||
fileRoot,
|
||||
swaggerFilePaths: ["Microsoft.AppPlatform/preview/2020-11-01-preview/appplatform.json"],
|
||||
includeOperation: false,
|
||||
});
|
||||
|
||||
const testDef = await loader.load(
|
||||
"Microsoft.AppPlatform/preview/2020-11-01-preview/scenarios/Spring.yaml"
|
||||
"Microsoft.AppPlatform/preview/2020-11-01-preview/scenarios/Spring.yaml",
|
||||
["Microsoft.AppPlatform/preview/2020-11-01-preview/appplatform.json"]
|
||||
);
|
||||
|
||||
expect(testDef).toMatchSnapshot();
|
||||
|
@ -119,12 +120,12 @@ describe("ApiScenarioLoader", () => {
|
|||
eraseXmsExamples: false,
|
||||
checkUnderFileRoot: false,
|
||||
fileRoot,
|
||||
swaggerFilePaths: ["Microsoft.SignalRService/preview/2021-06-01-preview/signalr.json"],
|
||||
includeOperation: false,
|
||||
});
|
||||
|
||||
const testDef = await loader.load(
|
||||
"Microsoft.SignalRService/preview/2021-06-01-preview/scenarios/signalR.yaml"
|
||||
"Microsoft.SignalRService/preview/2021-06-01-preview/scenarios/signalR.yaml",
|
||||
["Microsoft.SignalRService/preview/2021-06-01-preview/signalr.json"]
|
||||
);
|
||||
expect(testDef).toMatchSnapshot();
|
||||
}, 20000);
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
# yaml-language-server: $schema=/home/ctx/workspace/azure-rest-api-specs/documentation/api-scenario/references/v1.2/schema.json
|
||||
scope: None
|
||||
variables:
|
||||
resourceGroupName: rg-leni
|
||||
accountName: coglanapitest
|
||||
|
||||
prepareSteps:
|
||||
# Cognitive account only supports creation from portal
|
||||
# - operationId: Accounts_Create
|
||||
# readmeTag: ../../resource-manager/readme.md
|
||||
# parameters:
|
||||
# account:
|
||||
# location: $(location)
|
||||
# kind: TextAnalytics
|
||||
# sku:
|
||||
# name: S0
|
||||
# properties: {}
|
||||
# identity:
|
||||
# type: SystemAssigned
|
||||
- operationId: Accounts_Get
|
||||
readmeTag: ../../resource-manager/readme.md
|
||||
authentication:
|
||||
type: AADToken
|
||||
scope: https://management.azure.com/.default
|
||||
outputVariables:
|
||||
Endpoint:
|
||||
fromResponse: /properties/endpoints/Language
|
||||
# resourceId:
|
||||
# fromResponse: /id
|
||||
# - roleAssignment:
|
||||
# principalId: $(object_id)
|
||||
# roleName: Cognitive Services Language Owner
|
||||
# scope: $(resourceId)
|
||||
- operationId: Accounts_ListKeys
|
||||
readmeTag: ../../resource-manager/readme.md
|
||||
authentication:
|
||||
type: AADToken
|
||||
scope: https://management.azure.com/.default
|
||||
outputVariables:
|
||||
key1:
|
||||
fromResponse: /key1
|
||||
|
||||
scenarios:
|
||||
- scenario: LivenessAAD
|
||||
authentication:
|
||||
type: AADToken
|
||||
scope: https://cognitiveservices.azure.com/.default
|
||||
steps:
|
||||
- operationId: AnalyzeText
|
||||
exampleFile: ./preview/2022-10-01-preview/examples/text/SuccessfulEntityLinkingRequest.json
|
||||
- scenario: LivenessApiKey
|
||||
authentication:
|
||||
type: AzureKey
|
||||
key: $(key1)
|
||||
name: Ocp-Apim-Subscription-Key
|
||||
in: header
|
||||
steps:
|
||||
- operationId: AnalyzeText
|
||||
exampleFile: ./preview/2022-10-01-preview/examples/text/SuccessfulEntityLinkingRequest.json
|
||||
|
||||
# cleanUpSteps:
|
||||
# - operationId: Accounts_Delete
|
||||
# readmeTag: ../../resource-manager/readme.md
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,929 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "Microsoft Cognitive Language Service",
|
||||
"description": "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\">https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview</a>.",
|
||||
"version": "2022-10-01-preview"
|
||||
},
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"ErrorResponse": {
|
||||
"type": "object",
|
||||
"description": "Error response.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"error": {
|
||||
"description": "The error object.",
|
||||
"$ref": "#/definitions/Error"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"error"
|
||||
]
|
||||
},
|
||||
"Error": {
|
||||
"type": "object",
|
||||
"description": "The error object.",
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"description": "One of a server-defined set of error codes.",
|
||||
"$ref": "#/definitions/ErrorCode"
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"description": "A human-readable representation of the error."
|
||||
},
|
||||
"target": {
|
||||
"type": "string",
|
||||
"description": "The target of the error."
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"description": "An array of details about specific errors that led to this reported error.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Error"
|
||||
}
|
||||
},
|
||||
"innererror": {
|
||||
"description": "An object containing more specific information than the current object about the error.",
|
||||
"$ref": "#/definitions/InnerErrorModel"
|
||||
}
|
||||
}
|
||||
},
|
||||
"InnerErrorModel": {
|
||||
"type": "object",
|
||||
"description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"description": "One of a server-defined set of error codes.",
|
||||
"$ref": "#/definitions/InnerErrorCode"
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"description": "Error message."
|
||||
},
|
||||
"details": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Error details."
|
||||
},
|
||||
"target": {
|
||||
"type": "string",
|
||||
"description": "Error target."
|
||||
},
|
||||
"innererror": {
|
||||
"description": "An object containing more specific information than the current object about the error.",
|
||||
"$ref": "#/definitions/InnerErrorModel"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ErrorCode": {
|
||||
"type": "string",
|
||||
"description": "Human-readable error code.",
|
||||
"x-ms-enum": {
|
||||
"name": "ErrorCode",
|
||||
"modelAsString": true
|
||||
},
|
||||
"enum": [
|
||||
"InvalidRequest",
|
||||
"InvalidArgument",
|
||||
"Unauthorized",
|
||||
"Forbidden",
|
||||
"NotFound",
|
||||
"ProjectNotFound",
|
||||
"OperationNotFound",
|
||||
"AzureCognitiveSearchNotFound",
|
||||
"AzureCognitiveSearchIndexNotFound",
|
||||
"TooManyRequests",
|
||||
"AzureCognitiveSearchThrottling",
|
||||
"AzureCognitiveSearchIndexLimitReached",
|
||||
"InternalServerError",
|
||||
"ServiceUnavailable",
|
||||
"Timeout",
|
||||
"QuotaExceeded",
|
||||
"Conflict",
|
||||
"Warning"
|
||||
]
|
||||
},
|
||||
"InnerErrorCode": {
|
||||
"type": "string",
|
||||
"description": "Human-readable error code.",
|
||||
"x-ms-enum": {
|
||||
"name": "InnerErrorCode",
|
||||
"modelAsString": true
|
||||
},
|
||||
"enum": [
|
||||
"InvalidRequest",
|
||||
"InvalidParameterValue",
|
||||
"KnowledgeBaseNotFound",
|
||||
"AzureCognitiveSearchNotFound",
|
||||
"AzureCognitiveSearchThrottling",
|
||||
"ExtractionFailure",
|
||||
"InvalidRequestBodyFormat",
|
||||
"EmptyRequest",
|
||||
"MissingInputDocuments",
|
||||
"InvalidDocument",
|
||||
"ModelVersionIncorrect",
|
||||
"InvalidDocumentBatch",
|
||||
"UnsupportedLanguageCode",
|
||||
"InvalidCountryHint"
|
||||
]
|
||||
},
|
||||
"Language": {
|
||||
"type": "string",
|
||||
"description": "Language of the text records. This is BCP-47 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" for English as default."
|
||||
},
|
||||
"StringIndexType": {
|
||||
"type": "string",
|
||||
"description": "Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets.",
|
||||
"default": "TextElements_v8",
|
||||
"enum": [
|
||||
"TextElements_v8",
|
||||
"UnicodeCodePoint",
|
||||
"Utf16CodeUnit"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "StringIndexType",
|
||||
"modelAsString": true,
|
||||
"values": [
|
||||
{
|
||||
"value": "TextElements_v8",
|
||||
"description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo."
|
||||
},
|
||||
{
|
||||
"value": "UnicodeCodePoint",
|
||||
"description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python."
|
||||
},
|
||||
{
|
||||
"value": "Utf16CodeUnit",
|
||||
"description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"TaskState": {
|
||||
"description": "Returns the current state of the task.",
|
||||
"properties": {
|
||||
"lastUpdateDateTime": {
|
||||
"description": "The last updated time in UTC for the task.",
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "The status of the task at the mentioned last update time.",
|
||||
"enum": [
|
||||
"notStarted",
|
||||
"running",
|
||||
"succeeded",
|
||||
"failed",
|
||||
"cancelled",
|
||||
"cancelling"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"modelAsString": true,
|
||||
"name": "State"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"status",
|
||||
"lastUpdateDateTime"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"TaskIdentifier": {
|
||||
"type": "object",
|
||||
"description": "Base task object.",
|
||||
"properties": {
|
||||
"taskName": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TaskParameters": {
|
||||
"type": "object",
|
||||
"description": "Base parameters object for a text analysis task.",
|
||||
"properties": {
|
||||
"loggingOptOut": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"PreBuiltTaskParameters": {
|
||||
"type": "object",
|
||||
"description": "Parameters object for a text analysis task using pre-built models.",
|
||||
"properties": {
|
||||
"modelVersion": {
|
||||
"type": "string",
|
||||
"default": "latest"
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TaskParameters"
|
||||
}
|
||||
]
|
||||
},
|
||||
"JobState": {
|
||||
"properties": {
|
||||
"displayName": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdDateTime": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"expirationDateTime": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"jobId": {
|
||||
"type": "string"
|
||||
},
|
||||
"lastUpdatedDateTime": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"enum": [
|
||||
"notStarted",
|
||||
"running",
|
||||
"succeeded",
|
||||
"partiallyCompleted",
|
||||
"failed",
|
||||
"cancelled",
|
||||
"cancelling"
|
||||
],
|
||||
"type": "string",
|
||||
"x-ms-enum": {
|
||||
"modelAsString": true,
|
||||
"name": "State"
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/Error"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"nextLink": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"jobId",
|
||||
"lastUpdatedDateTime",
|
||||
"createdDateTime",
|
||||
"status"
|
||||
]
|
||||
},
|
||||
"JobErrors": {
|
||||
"properties": {
|
||||
"errors": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/Error"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"InputError": {
|
||||
"type": "object",
|
||||
"description": "Contains details of errors encountered during a job execution.",
|
||||
"required": [
|
||||
"id",
|
||||
"error"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the input."
|
||||
},
|
||||
"error": {
|
||||
"type": "object",
|
||||
"description": "Error encountered.",
|
||||
"$ref": "#/definitions/Error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"InputWarning": {
|
||||
"type": "object",
|
||||
"description": "Contains details of warnings encountered during a job execution.",
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "Warning code."
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"description": "Warning message."
|
||||
},
|
||||
"targetRef": {
|
||||
"type": "string",
|
||||
"description": "A JSON pointer reference indicating the target object."
|
||||
}
|
||||
}
|
||||
},
|
||||
"RequestStatistics": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"documentsCount",
|
||||
"validDocumentsCount",
|
||||
"erroneousDocumentsCount",
|
||||
"transactionsCount"
|
||||
],
|
||||
"properties": {
|
||||
"documentsCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "Number of documents submitted in the request."
|
||||
},
|
||||
"validDocumentsCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "Number of valid documents. This excludes empty, over-size limit or non-supported languages documents."
|
||||
},
|
||||
"erroneousDocumentsCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "Number of invalid documents. This includes empty, over-size limit or non-supported languages documents."
|
||||
},
|
||||
"transactionsCount": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "Number of transactions for the request."
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"description": "if showStats=true was specified in the request this field will contain information about the request payload."
|
||||
},
|
||||
"PreBuiltResult": {
|
||||
"properties": {
|
||||
"errors": {
|
||||
"type": "array",
|
||||
"description": "Errors by document id.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/InputError"
|
||||
}
|
||||
},
|
||||
"statistics": {
|
||||
"$ref": "#/definitions/RequestStatistics"
|
||||
},
|
||||
"modelVersion": {
|
||||
"type": "string",
|
||||
"description": "This field indicates which model is used for scoring."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"errors",
|
||||
"modelVersion"
|
||||
]
|
||||
},
|
||||
"AnswersResult": {
|
||||
"type": "object",
|
||||
"description": "Represents List of Question Answers.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"answers": {
|
||||
"type": "array",
|
||||
"description": "Represents Answer Result list.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/KnowledgeBaseAnswer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"KnowledgeBaseAnswer": {
|
||||
"type": "object",
|
||||
"description": "Represents knowledge base answer.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"questions": {
|
||||
"type": "array",
|
||||
"description": "List of questions associated with the answer.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"answer": {
|
||||
"type": "string",
|
||||
"description": "Answer text."
|
||||
},
|
||||
"confidenceScore": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"x-ms-client-name": "confidence",
|
||||
"description": "Answer confidence score, value ranges from 0 to 1.",
|
||||
"maximum": 1,
|
||||
"minimum": 0
|
||||
},
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"x-ms-client-name": "qnaId",
|
||||
"description": "ID of the QnA result.",
|
||||
"format": "int32"
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "Source of QnA result."
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"description": "Metadata associated with the answer, useful to categorize or filter question answers.",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"dialog": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/KnowledgeBaseAnswerDialog"
|
||||
},
|
||||
"answerSpan": {
|
||||
"type": "object",
|
||||
"x-ms-client-name": "shortAnswer",
|
||||
"description": "Answer span object of QnA with respect to user's question.",
|
||||
"$ref": "#/definitions/AnswerSpan"
|
||||
}
|
||||
}
|
||||
},
|
||||
"KnowledgeBaseAnswerDialog": {
|
||||
"type": "object",
|
||||
"description": "Dialog associated with Answer.",
|
||||
"properties": {
|
||||
"isContextOnly": {
|
||||
"type": "boolean",
|
||||
"description": "To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result."
|
||||
},
|
||||
"prompts": {
|
||||
"type": "array",
|
||||
"description": "List of prompts associated with the answer.",
|
||||
"maxItems": 20,
|
||||
"items": {
|
||||
"$ref": "#/definitions/KnowledgeBaseAnswerPrompt"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"KnowledgeBaseAnswerPrompt": {
|
||||
"type": "object",
|
||||
"description": "Prompt for an answer.",
|
||||
"properties": {
|
||||
"displayOrder": {
|
||||
"type": "integer",
|
||||
"description": "Index of the prompt - used in ordering of the prompts.",
|
||||
"format": "int32"
|
||||
},
|
||||
"qnaId": {
|
||||
"type": "integer",
|
||||
"description": "QnA ID corresponding to the prompt.",
|
||||
"format": "int32"
|
||||
},
|
||||
"displayText": {
|
||||
"type": "string",
|
||||
"description": "Text displayed to represent a follow up question prompt.",
|
||||
"maxLength": 200
|
||||
}
|
||||
}
|
||||
},
|
||||
"AnswerSpan": {
|
||||
"type": "object",
|
||||
"description": "Answer span object of QnA.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "Predicted text of answer span."
|
||||
},
|
||||
"confidenceScore": {
|
||||
"type": "number",
|
||||
"x-ms-client-name": "confidence",
|
||||
"description": "Predicted score of answer span, value ranges from 0 to 1.",
|
||||
"format": "double",
|
||||
"maximum": 1,
|
||||
"minimum": 0
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"description": "The answer span offset from the start of answer.",
|
||||
"format": "int32"
|
||||
},
|
||||
"length": {
|
||||
"type": "integer",
|
||||
"description": "The length of the answer span.",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
},
|
||||
"AnswersOptions": {
|
||||
"type": "object",
|
||||
"description": "Parameters to query a knowledge base.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"qnaId": {
|
||||
"type": "integer",
|
||||
"description": "Exact QnA ID to fetch from the knowledge base, this field takes priority over question.",
|
||||
"format": "int32"
|
||||
},
|
||||
"question": {
|
||||
"type": "string",
|
||||
"description": "User question to query against the knowledge base."
|
||||
},
|
||||
"top": {
|
||||
"type": "integer",
|
||||
"description": "Max number of answers to be returned for the question.",
|
||||
"format": "int32"
|
||||
},
|
||||
"userId": {
|
||||
"type": "string",
|
||||
"description": "Unique identifier for the user."
|
||||
},
|
||||
"confidenceScoreThreshold": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"x-ms-client-name": "confidenceThreshold",
|
||||
"description": "Minimum threshold score for answers, value ranges from 0 to 1.",
|
||||
"maximum": 1,
|
||||
"minimum": 0
|
||||
},
|
||||
"context": {
|
||||
"x-ms-client-name": "answerContext",
|
||||
"description": "Context object with previous QnA's information.",
|
||||
"$ref": "#/definitions/KnowledgeBaseAnswerContext"
|
||||
},
|
||||
"rankerType": {
|
||||
"type": "string",
|
||||
"x-ms-client-name": "rankerKind",
|
||||
"description": "Type of ranker to be used.",
|
||||
"x-ms-enum": {
|
||||
"name": "RankerKind",
|
||||
"modelAsString": true,
|
||||
"values": [
|
||||
{
|
||||
"value": "QuestionOnly",
|
||||
"description": "Question only ranker."
|
||||
},
|
||||
{
|
||||
"value": "Default",
|
||||
"description": "Default ranker."
|
||||
}
|
||||
]
|
||||
},
|
||||
"enum": [
|
||||
"Default",
|
||||
"QuestionOnly"
|
||||
]
|
||||
},
|
||||
"filters": {
|
||||
"description": "Filter QnAs based on given metadata list and knowledge base sources.",
|
||||
"$ref": "#/definitions/QueryFilters"
|
||||
},
|
||||
"answerSpanRequest": {
|
||||
"x-ms-client-name": "shortAnswerOptions",
|
||||
"description": "To configure Answer span prediction feature.",
|
||||
"$ref": "#/definitions/ShortAnswerOptions"
|
||||
},
|
||||
"includeUnstructuredSources": {
|
||||
"type": "boolean",
|
||||
"description": "(Optional) Flag to enable Query over Unstructured Sources."
|
||||
}
|
||||
}
|
||||
},
|
||||
"KnowledgeBaseAnswerContext": {
|
||||
"type": "object",
|
||||
"description": "Context object with previous QnA's information.",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"previousQnaId"
|
||||
],
|
||||
"properties": {
|
||||
"previousQnaId": {
|
||||
"type": "integer",
|
||||
"description": "Previous turn top answer result QnA ID.",
|
||||
"format": "int32"
|
||||
},
|
||||
"previousUserQuery": {
|
||||
"type": "string",
|
||||
"x-ms-client-name": "previousQuestion",
|
||||
"description": "Previous user query."
|
||||
}
|
||||
}
|
||||
},
|
||||
"QueryFilters": {
|
||||
"type": "object",
|
||||
"description": "filters over knowledge base.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"metadataFilter": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/MetadataFilter"
|
||||
},
|
||||
"sourceFilter": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/SourceFilter"
|
||||
},
|
||||
"logicalOperation": {
|
||||
"type": "string",
|
||||
"description": "Logical operation used to join metadata filter with source filter.",
|
||||
"$ref": "#/definitions/LogicalOperationKind",
|
||||
"default": "AND"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MetadataFilter": {
|
||||
"type": "object",
|
||||
"description": "Find QnAs that are associated with the given list of metadata.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"metadata": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/MetadataRecord"
|
||||
}
|
||||
},
|
||||
"logicalOperation": {
|
||||
"type": "string",
|
||||
"description": "Operation used to join metadata filters.",
|
||||
"$ref": "#/definitions/LogicalOperationKind",
|
||||
"default": "AND"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MetadataRecord": {
|
||||
"type": "object",
|
||||
"description": "Object to provide the key value pair for each metadata.",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"key",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "Metadata Key from Metadata dictionary used in the QnA."
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "Metadata Value from Metadata dictionary used in the QnA."
|
||||
}
|
||||
}
|
||||
},
|
||||
"SourceFilter": {
|
||||
"type": "array",
|
||||
"description": "Find QnAs that are associated with any of the given list of sources in knowledge base.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"LogicalOperationKind": {
|
||||
"type": "string",
|
||||
"description": "Set to 'OR' or 'AND' for using corresponding logical operation.",
|
||||
"x-ms-enum": {
|
||||
"name": "LogicalOperationKind",
|
||||
"modelAsString": true
|
||||
},
|
||||
"enum": [
|
||||
"AND",
|
||||
"OR"
|
||||
]
|
||||
},
|
||||
"ShortAnswerOptions": {
|
||||
"type": "object",
|
||||
"description": "To configure Answer span prediction feature.",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"enable"
|
||||
],
|
||||
"properties": {
|
||||
"enable": {
|
||||
"type": "boolean",
|
||||
"description": "Enable or disable Answer Span prediction.",
|
||||
"enum": [
|
||||
true
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "enable",
|
||||
"modelAsString": false
|
||||
}
|
||||
},
|
||||
"confidenceScoreThreshold": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"x-ms-client-name": "confidenceThreshold",
|
||||
"description": "Minimum threshold score required to include an answer span, value ranges from 0 to 1.",
|
||||
"maximum": 1,
|
||||
"minimum": 0
|
||||
},
|
||||
"topAnswersWithSpan": {
|
||||
"type": "integer",
|
||||
"x-ms-client-name": "top",
|
||||
"description": "Number of Top answers to be considered for span prediction from 1 to 10.",
|
||||
"format": "int32",
|
||||
"maximum": 10,
|
||||
"minimum": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"Sentiment": {
|
||||
"type": "string",
|
||||
"description": "Predicted sentiment.",
|
||||
"enum": [
|
||||
"positive",
|
||||
"neutral",
|
||||
"negative",
|
||||
"mixed"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "TextSentiment",
|
||||
"modelAsString": true,
|
||||
"values": [
|
||||
{
|
||||
"value": "positive",
|
||||
"description": "Positive sentiment."
|
||||
},
|
||||
{
|
||||
"value": "neutral",
|
||||
"description": "Neutral sentiment."
|
||||
},
|
||||
{
|
||||
"value": "negative",
|
||||
"description": "Negative sentiment."
|
||||
},
|
||||
{
|
||||
"value": "mixed",
|
||||
"description": "Mixed sentiment."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"SentimentConfidenceScores": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"positive",
|
||||
"neutral",
|
||||
"negative"
|
||||
],
|
||||
"properties": {
|
||||
"positive": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "Confidence score for positive sentiment"
|
||||
},
|
||||
"neutral": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "Confidence score for neutral sentiment"
|
||||
},
|
||||
"negative": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "Confidence score for negative sentiment"
|
||||
}
|
||||
},
|
||||
"description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative."
|
||||
},
|
||||
"AbstractiveSummarizationTaskParametersBase": {
|
||||
"type": "object",
|
||||
"description": "Supported parameters for an Abstractive Summarization task.",
|
||||
"properties": {
|
||||
"sentenceCount": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "It controls the approximate number of sentences in the output summaries."
|
||||
},
|
||||
"stringIndexType": {
|
||||
"$ref": "#/definitions/StringIndexType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SummaryContext": {
|
||||
"type": "object",
|
||||
"description": "The context of the summary.",
|
||||
"required": [
|
||||
"offset",
|
||||
"length"
|
||||
],
|
||||
"properties": {
|
||||
"offset": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "Start position for the context. Use of different 'stringIndexType' values can affect the offset returned."
|
||||
},
|
||||
"length": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "The length of the context. Use of different 'stringIndexType' values can affect the length returned."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"Endpoint": {
|
||||
"name": "Endpoint",
|
||||
"description": "Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com).",
|
||||
"x-ms-parameter-location": "client",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"in": "path",
|
||||
"x-ms-skip-url-encoding": true
|
||||
},
|
||||
"ProjectNameQueryParameter": {
|
||||
"name": "projectName",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the project to use.",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"ProjectNamePathParameter": {
|
||||
"name": "projectName",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"maxLength": 100,
|
||||
"description": "The name of the project to use.",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"DeploymentNameQueryParameter": {
|
||||
"name": "deploymentName",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the specific deployment of the project to use.",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"DeploymentNamePathParameter": {
|
||||
"name": "deploymentName",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the specific deployment of the project to use.",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"ApiVersionParameter": {
|
||||
"name": "api-version",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "Client API version."
|
||||
},
|
||||
"TopParameter": {
|
||||
"name": "top",
|
||||
"in": "query",
|
||||
"description": "The maximum number of resources to return from the collection.",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"SkipParameter": {
|
||||
"name": "skip",
|
||||
"in": "query",
|
||||
"description": "An offset into the collection of the first resource to be returned.",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"MaxPageSizeParameter": {
|
||||
"name": "maxpagesize",
|
||||
"in": "query",
|
||||
"description": "The maximum number of resources to include in a single response.",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"ShowStats": {
|
||||
"name": "showStats",
|
||||
"in": "query",
|
||||
"description": "(Optional) if set to true, response will contain request and document level statistics.",
|
||||
"type": "boolean",
|
||||
"required": false,
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"JobId": {
|
||||
"description": "Job ID",
|
||||
"format": "uuid",
|
||||
"in": "path",
|
||||
"name": "jobId",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"x-ms-parameter-location": "method"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"body": {
|
||||
"resourcesMetadata": [
|
||||
{
|
||||
"azureResourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu",
|
||||
"customDomain": "lang-test-weu.cognitiveservices.azure.com",
|
||||
"region": "westeurope"
|
||||
},
|
||||
{
|
||||
"azureResourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestEus",
|
||||
"customDomain": "lang-test-eus.cognitiveservices.azure.com",
|
||||
"region": "eastus"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/resources/assign/jobs/66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/train/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"Content-Type": "application/merge-patch+json",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "myproject",
|
||||
"body": {
|
||||
"projectName": "myproject",
|
||||
"language": "en",
|
||||
"projectKind": "Conversation",
|
||||
"description": "This is a sample conversation project.",
|
||||
"multilingual": false
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"createdDateTime": "2022-04-18T13:53:03Z",
|
||||
"lastModifiedDateTime": "2022-04-18T13:53:03Z",
|
||||
"projectKind": "Conversation",
|
||||
"projectName": "myproject",
|
||||
"multilingual": false,
|
||||
"description": "This is a sample conversation project.",
|
||||
"language": "en"
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"createdDateTime": "2022-04-18T13:53:03Z",
|
||||
"lastModifiedDateTime": "2022-04-18T13:53:03Z",
|
||||
"lastTrainedDateTime": "2022-04-18T14:14:28Z",
|
||||
"lastDeployedDateTime": "2022-04-18T14:49:01Z",
|
||||
"projectKind": "Conversation",
|
||||
"projectName": "myproject",
|
||||
"multilingual": false,
|
||||
"description": "This is a sample conversation project.",
|
||||
"language": "en"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"deploymentName": "staging"
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/deployments/staging/jobs/61ebb7ef-a207-40d2-82b9-5285440ae579_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"deploymentName": "staging",
|
||||
"body": {
|
||||
"assignedResourceIds": [
|
||||
"/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu"
|
||||
]
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/deployments/staging/delete-from-resources/jobs/61ebb7ef-a207-40d2-82b9-5285440ae579_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"trainedModelLabel": "model2"
|
||||
},
|
||||
"responses": {
|
||||
"204": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "myproject"
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/global/deletion-jobs/129d3182-625d-496c-bcf9-43686e85160b_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"deploymentName": "production",
|
||||
"body": {
|
||||
"trainedModelLabel": "29886710a2ae49259d62cffca977db66",
|
||||
"assignedResourceIds": [
|
||||
"/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu",
|
||||
"/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestEus"
|
||||
]
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/deployments/production/jobs/66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"stringIndexType": "Utf16CodeUnit"
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/export/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:52:48Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:53:04Z",
|
||||
"expirationDateTime": "2022-04-25T15:52:48Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"deploymentName": "production",
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:52:48Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:53:04Z",
|
||||
"expirationDateTime": "2022-04-25T15:52:48Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"deploymentName": "staging"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"deploymentName": "staging",
|
||||
"modelId": "model1-20220418T034749-299f45b8114849538c1a750b21b05a94",
|
||||
"lastTrainedDateTime": "2022-04-18T15:47:49.4334381Z",
|
||||
"lastDeployedDateTime": "2022-04-18T15:53:04Z",
|
||||
"deploymentExpirationDate": "2023-10-28",
|
||||
"modelTrainingConfigVersion": "2022-05-15-preview",
|
||||
"assignedResources": [
|
||||
{
|
||||
"resourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu",
|
||||
"region": "westeurope"
|
||||
},
|
||||
{
|
||||
"resourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestEus",
|
||||
"region": "eastus"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"deploymentName": "production",
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:52:48Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:53:04Z",
|
||||
"expirationDateTime": "2022-04-25T15:52:48Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"jobId": "c95efa2a-44e8-461e-8aa5-04b4677bfa84_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"resultUrl": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/export/jobs/c4946bfa-4fbf-493b-bfcf-2d232eb9de69_637858368000000000/result?api-version=2022-10-01-preview",
|
||||
"jobId": "c4946bfa-4fbf-493b-bfcf-2d232eb9de69_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:23:07Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:23:08Z",
|
||||
"expirationDateTime": "2022-04-25T15:23:07Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"jobId": "c95efa2a-44e8-461e-8aa5-04b4677bfa84_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "c95efa2a-44e8-461e-8aa5-04b4677bfa84_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:17:20Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:17:22Z",
|
||||
"expirationDateTime": "2022-04-25T15:17:20Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"trainedModelLabel": "model1",
|
||||
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:44:44Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:45:48Z",
|
||||
"expirationDateTime": "2022-04-25T15:44:44Z",
|
||||
"status": "running"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"trainedModelLabel": "model1"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"label": "model1",
|
||||
"modelId": "model1-20220418T034749-299f45b8114849538c1a750b21b05a94",
|
||||
"lastTrainedDateTime": "2022-04-18T15:47:49Z",
|
||||
"lastTrainingDurationInSeconds": 186,
|
||||
"modelExpirationDate": "2022-10-28",
|
||||
"modelTrainingConfigVersion": "2022-05-01"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,284 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"trainedModelLabel": "model1",
|
||||
"stringIndexType": "Utf16CodeUnit",
|
||||
"maxpagesize": 10
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"text": "send the email",
|
||||
"language": "en-us",
|
||||
"entitiesResult": {
|
||||
"expectedEntities": [],
|
||||
"predictedEntities": []
|
||||
},
|
||||
"intentsResult": {
|
||||
"expectedIntent": "SendEmail",
|
||||
"predictedIntent": "SendEmail"
|
||||
}
|
||||
},
|
||||
{
|
||||
"text": "send a mail to daniel",
|
||||
"language": "en-us",
|
||||
"entitiesResult": {
|
||||
"expectedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 15,
|
||||
"length": 6
|
||||
}
|
||||
],
|
||||
"predictedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 15,
|
||||
"length": 6
|
||||
}
|
||||
]
|
||||
},
|
||||
"intentsResult": {
|
||||
"expectedIntent": "SendEmail",
|
||||
"predictedIntent": "SendEmail"
|
||||
}
|
||||
},
|
||||
{
|
||||
"text": "i forgot to add an important part to that email to james . please set it up to edit",
|
||||
"language": "en-us",
|
||||
"entitiesResult": {
|
||||
"expectedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 51,
|
||||
"length": 5
|
||||
}
|
||||
],
|
||||
"predictedEntities": [
|
||||
{
|
||||
"category": "Category",
|
||||
"offset": 19,
|
||||
"length": 9
|
||||
},
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 51,
|
||||
"length": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
"intentsResult": {
|
||||
"expectedIntent": "AddMore",
|
||||
"predictedIntent": "AddMore"
|
||||
}
|
||||
},
|
||||
{
|
||||
"text": "send email to a and tian",
|
||||
"language": "en-us",
|
||||
"entitiesResult": {
|
||||
"expectedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 14,
|
||||
"length": 1
|
||||
},
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 20,
|
||||
"length": 4
|
||||
}
|
||||
],
|
||||
"predictedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 14,
|
||||
"length": 1
|
||||
},
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 20,
|
||||
"length": 4
|
||||
}
|
||||
]
|
||||
},
|
||||
"intentsResult": {
|
||||
"expectedIntent": "SendEmail",
|
||||
"predictedIntent": "SendEmail"
|
||||
}
|
||||
},
|
||||
{
|
||||
"text": "send thomas an email",
|
||||
"language": "en-us",
|
||||
"entitiesResult": {
|
||||
"expectedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 5,
|
||||
"length": 6
|
||||
}
|
||||
],
|
||||
"predictedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 5,
|
||||
"length": 6
|
||||
}
|
||||
]
|
||||
},
|
||||
"intentsResult": {
|
||||
"expectedIntent": "SendEmail",
|
||||
"predictedIntent": "SendEmail"
|
||||
}
|
||||
},
|
||||
{
|
||||
"text": "i need to add more to the email message i am sending to vincent",
|
||||
"language": "en-us",
|
||||
"entitiesResult": {
|
||||
"expectedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 56,
|
||||
"length": 7
|
||||
}
|
||||
],
|
||||
"predictedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 56,
|
||||
"length": 7
|
||||
}
|
||||
]
|
||||
},
|
||||
"intentsResult": {
|
||||
"expectedIntent": "AddMore",
|
||||
"predictedIntent": "AddMore"
|
||||
}
|
||||
},
|
||||
{
|
||||
"text": "send an email to lily roth and abc123@microsoft.com",
|
||||
"language": "en-us",
|
||||
"entitiesResult": {
|
||||
"expectedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 17,
|
||||
"length": 9
|
||||
}
|
||||
],
|
||||
"predictedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 17,
|
||||
"length": 9
|
||||
}
|
||||
]
|
||||
},
|
||||
"intentsResult": {
|
||||
"expectedIntent": "SendEmail",
|
||||
"predictedIntent": "SendEmail"
|
||||
}
|
||||
},
|
||||
{
|
||||
"text": "i need to add something else to my email to cheryl",
|
||||
"language": "en-us",
|
||||
"entitiesResult": {
|
||||
"expectedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 44,
|
||||
"length": 6
|
||||
}
|
||||
],
|
||||
"predictedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 44,
|
||||
"length": 6
|
||||
}
|
||||
]
|
||||
},
|
||||
"intentsResult": {
|
||||
"expectedIntent": "AddMore",
|
||||
"predictedIntent": "AddMore"
|
||||
}
|
||||
},
|
||||
{
|
||||
"text": "send an email to larry , joseph and billy larkson",
|
||||
"language": "en-us",
|
||||
"entitiesResult": {
|
||||
"expectedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 17,
|
||||
"length": 5
|
||||
},
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 25,
|
||||
"length": 6
|
||||
},
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 36,
|
||||
"length": 13
|
||||
}
|
||||
],
|
||||
"predictedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 17,
|
||||
"length": 5
|
||||
},
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 25,
|
||||
"length": 6
|
||||
},
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 36,
|
||||
"length": 13
|
||||
}
|
||||
]
|
||||
},
|
||||
"intentsResult": {
|
||||
"expectedIntent": "SendEmail",
|
||||
"predictedIntent": "SendEmail"
|
||||
}
|
||||
},
|
||||
{
|
||||
"text": "send mail to dorothy",
|
||||
"language": "en-us",
|
||||
"entitiesResult": {
|
||||
"expectedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 13,
|
||||
"length": 7
|
||||
}
|
||||
],
|
||||
"predictedEntities": [
|
||||
{
|
||||
"category": "ContactName",
|
||||
"offset": 13,
|
||||
"length": 7
|
||||
}
|
||||
]
|
||||
},
|
||||
"intentsResult": {
|
||||
"expectedIntent": "SendEmail",
|
||||
"predictedIntent": "SendEmail"
|
||||
}
|
||||
}
|
||||
],
|
||||
"nextLink": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/models/model1/evaluation/result/?api-version=2022-10-01-preview&top=2147483637&skip={maxpagesize}&maxpagesize={maxpagesize}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,526 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"trainedModelLabel": "model1"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"entitiesEvaluation": {
|
||||
"confusionMatrix": {
|
||||
"Attachment": {
|
||||
"Attachment": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 3.0
|
||||
}
|
||||
},
|
||||
"Category": {
|
||||
"Category": {
|
||||
"normalizedValue": 91.666664,
|
||||
"rawValue": 11.0
|
||||
},
|
||||
"$none": {
|
||||
"normalizedValue": 8.333333,
|
||||
"rawValue": 1.0
|
||||
}
|
||||
},
|
||||
"ContactName": {
|
||||
"ContactName": {
|
||||
"normalizedValue": 91.666664,
|
||||
"rawValue": 22.0
|
||||
},
|
||||
"SenderName": {
|
||||
"normalizedValue": 4.1666665,
|
||||
"rawValue": 1.0
|
||||
},
|
||||
"$none": {
|
||||
"normalizedValue": 4.1666665,
|
||||
"rawValue": 1.0
|
||||
}
|
||||
},
|
||||
"Date": {
|
||||
"Date": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 2.0
|
||||
}
|
||||
},
|
||||
"EmailSubject": {
|
||||
"EmailSubject": {
|
||||
"normalizedValue": 93.33333,
|
||||
"rawValue": 9.333334
|
||||
},
|
||||
"$none": {
|
||||
"normalizedValue": 6.6666665,
|
||||
"rawValue": 0.6666667
|
||||
}
|
||||
},
|
||||
"FromRelationshipName": {
|
||||
"FromRelationshipName": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 1.0
|
||||
}
|
||||
},
|
||||
"Line": {
|
||||
"Line": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 2.0
|
||||
}
|
||||
},
|
||||
"Message": {
|
||||
"Message": {
|
||||
"normalizedValue": 81.2063,
|
||||
"rawValue": 6.496504
|
||||
},
|
||||
"EmailSubject": {
|
||||
"normalizedValue": 7.43007,
|
||||
"rawValue": 0.5944056
|
||||
},
|
||||
"$none": {
|
||||
"normalizedValue": 9.120047,
|
||||
"rawValue": 0.7296037
|
||||
},
|
||||
"Date": {
|
||||
"normalizedValue": 2.2435899,
|
||||
"rawValue": 0.17948718
|
||||
}
|
||||
},
|
||||
"OrderReference": {
|
||||
"OrderReference": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 17.0
|
||||
}
|
||||
},
|
||||
"PositionReference": {
|
||||
"$none": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 1.0
|
||||
}
|
||||
},
|
||||
"RelationshipName": {
|
||||
"RelationshipName": {
|
||||
"normalizedValue": 66.666664,
|
||||
"rawValue": 2.0
|
||||
},
|
||||
"$none": {
|
||||
"normalizedValue": 33.333332,
|
||||
"rawValue": 1.0
|
||||
}
|
||||
},
|
||||
"SearchTexts": {
|
||||
"SearchTexts": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"SenderName": {
|
||||
"SenderName": {
|
||||
"normalizedValue": 88.888885,
|
||||
"rawValue": 8.0
|
||||
},
|
||||
"ContactName": {
|
||||
"normalizedValue": 11.111111,
|
||||
"rawValue": 1.0
|
||||
}
|
||||
},
|
||||
"Time": {
|
||||
"$none": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 2.0
|
||||
}
|
||||
},
|
||||
"$none": {
|
||||
"$none": {
|
||||
"normalizedValue": 99.739265,
|
||||
"rawValue": 162.575
|
||||
},
|
||||
"Category": {
|
||||
"normalizedValue": 0.2607362,
|
||||
"rawValue": 0.425
|
||||
}
|
||||
}
|
||||
},
|
||||
"entities": {
|
||||
"ContactName": {
|
||||
"f1": 0.9361702799797058,
|
||||
"precision": 0.95652174949646,
|
||||
"recall": 0.9166666865348816,
|
||||
"truePositiveCount": 22,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 1,
|
||||
"falseNegativeCount": 2
|
||||
},
|
||||
"Category": {
|
||||
"f1": 0.8799999952316284,
|
||||
"precision": 0.8461538553237915,
|
||||
"recall": 0.9166666865348816,
|
||||
"truePositiveCount": 11,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 2,
|
||||
"falseNegativeCount": 1
|
||||
},
|
||||
"SenderName": {
|
||||
"f1": 0.8888888955116272,
|
||||
"precision": 0.8888888955116272,
|
||||
"recall": 0.8888888955116272,
|
||||
"truePositiveCount": 8,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 1,
|
||||
"falseNegativeCount": 1
|
||||
},
|
||||
"EmailSubject": {
|
||||
"f1": 0.8181817531585693,
|
||||
"precision": 0.75,
|
||||
"recall": 0.8999999761581421,
|
||||
"truePositiveCount": 9,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 3,
|
||||
"falseNegativeCount": 1
|
||||
},
|
||||
"Message": {
|
||||
"f1": 0.75,
|
||||
"precision": 0.75,
|
||||
"recall": 0.75,
|
||||
"truePositiveCount": 6,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 2,
|
||||
"falseNegativeCount": 2
|
||||
},
|
||||
"Date": {
|
||||
"f1": 0.800000011920929,
|
||||
"precision": 0.6666666865348816,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 2,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 1,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"OrderReference": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 17,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"SearchTexts": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"Attachment": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 3,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"RelationshipName": {
|
||||
"f1": 0.800000011920929,
|
||||
"precision": 1.0,
|
||||
"recall": 0.6666666865348816,
|
||||
"truePositiveCount": 2,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 1
|
||||
},
|
||||
"Line": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 2,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"Time": {
|
||||
"f1": 0.0,
|
||||
"precision": 0.0,
|
||||
"recall": 0.0,
|
||||
"truePositiveCount": 0,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 2
|
||||
},
|
||||
"FromRelationshipName": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 1,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"PositionReference": {
|
||||
"f1": 0.0,
|
||||
"precision": 0.0,
|
||||
"recall": 0.0,
|
||||
"truePositiveCount": 0,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 1
|
||||
}
|
||||
},
|
||||
"microF1": 0.8923077,
|
||||
"microPrecision": 0.8969072,
|
||||
"microRecall": 0.8877551,
|
||||
"macroF1": 0.7766601,
|
||||
"macroPrecision": 0.7755879,
|
||||
"macroRecall": 0.78849214
|
||||
},
|
||||
"intentsEvaluation": {
|
||||
"confusionMatrix": {
|
||||
"AddFlag": {
|
||||
"AddFlag": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 6.0
|
||||
}
|
||||
},
|
||||
"AddMore": {
|
||||
"AddMore": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 17.0
|
||||
}
|
||||
},
|
||||
"Cancel": {
|
||||
"Cancel": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 9.0
|
||||
}
|
||||
},
|
||||
"CheckMessages": {
|
||||
"CheckMessages": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 9.0
|
||||
}
|
||||
},
|
||||
"Confirm": {
|
||||
"Confirm": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"Delete": {
|
||||
"Delete": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 5.0
|
||||
}
|
||||
},
|
||||
"Forward": {
|
||||
"Forward": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 6.0
|
||||
}
|
||||
},
|
||||
"None": {
|
||||
"None": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 1.0
|
||||
}
|
||||
},
|
||||
"QueryLastText": {
|
||||
"QueryLastText": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 6.0
|
||||
}
|
||||
},
|
||||
"ReadAloud": {
|
||||
"ReadAloud": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 16.0
|
||||
}
|
||||
},
|
||||
"Reply": {
|
||||
"Reply": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 6.0
|
||||
}
|
||||
},
|
||||
"SearchMessages": {
|
||||
"SearchMessages": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 9.0
|
||||
}
|
||||
},
|
||||
"SendEmail": {
|
||||
"SendEmail": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 20.0
|
||||
}
|
||||
},
|
||||
"ShowNext": {
|
||||
"ShowNext": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"ShowPrevious": {
|
||||
"ShowPrevious": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 3.0
|
||||
}
|
||||
}
|
||||
},
|
||||
"intents": {
|
||||
"AddMore": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 17,
|
||||
"trueNegativeCount": 104,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"Cancel": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 9,
|
||||
"trueNegativeCount": 112,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"SendEmail": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 20,
|
||||
"trueNegativeCount": 101,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"CheckMessages": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 9,
|
||||
"trueNegativeCount": 112,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"AddFlag": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 6,
|
||||
"trueNegativeCount": 115,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"Reply": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 6,
|
||||
"trueNegativeCount": 115,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"ReadAloud": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 16,
|
||||
"trueNegativeCount": 105,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"QueryLastText": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 6,
|
||||
"trueNegativeCount": 115,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"SearchMessages": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 9,
|
||||
"trueNegativeCount": 112,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"Delete": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 5,
|
||||
"trueNegativeCount": 116,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"Forward": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 6,
|
||||
"trueNegativeCount": 115,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"Confirm": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 117,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"ShowNext": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 117,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"ShowPrevious": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 3,
|
||||
"trueNegativeCount": 118,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"None": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 1,
|
||||
"trueNegativeCount": 120,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
}
|
||||
},
|
||||
"microF1": 1.0,
|
||||
"microPrecision": 1.0,
|
||||
"microRecall": 1.0,
|
||||
"macroF1": 1.0,
|
||||
"macroPrecision": 1.0,
|
||||
"macroRecall": 1.0
|
||||
},
|
||||
"evaluationOptions": {
|
||||
"kind": "percentage",
|
||||
"trainingSplitPercentage": 80,
|
||||
"testingSplitPercentage": 20
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "myproject"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"createdDateTime": "2022-04-18T13:53:03Z",
|
||||
"lastModifiedDateTime": "2022-04-18T13:53:03Z",
|
||||
"lastTrainedDateTime": "2022-04-18T14:14:28Z",
|
||||
"lastDeployedDateTime": "2022-04-18T14:49:01Z",
|
||||
"projectKind": "Conversation",
|
||||
"projectName": "myproject",
|
||||
"multilingual": false,
|
||||
"description": "This is a sample conversation project.",
|
||||
"language": "en"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"jobId": "129d3182-625d-496c-bcf9-43686e85160b_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "129d3182-625d-496c-bcf9-43686e85160b_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T14:02:34Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T14:02:34Z",
|
||||
"expirationDateTime": "2022-04-25T14:02:34Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,398 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectKind": "Conversation"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"languageName": "English",
|
||||
"languageCode": "en"
|
||||
},
|
||||
{
|
||||
"languageName": "English",
|
||||
"languageCode": "en-us"
|
||||
},
|
||||
{
|
||||
"languageName": "English (UK)",
|
||||
"languageCode": "en-gb"
|
||||
},
|
||||
{
|
||||
"languageName": "French",
|
||||
"languageCode": "fr"
|
||||
},
|
||||
{
|
||||
"languageName": "Italian",
|
||||
"languageCode": "it"
|
||||
},
|
||||
{
|
||||
"languageName": "Spanish",
|
||||
"languageCode": "es"
|
||||
},
|
||||
{
|
||||
"languageName": "German",
|
||||
"languageCode": "de"
|
||||
},
|
||||
{
|
||||
"languageName": "Portuguese (Brazil)",
|
||||
"languageCode": "pt-br"
|
||||
},
|
||||
{
|
||||
"languageName": "Portuguese (Portugal)",
|
||||
"languageCode": "pt-pt"
|
||||
},
|
||||
{
|
||||
"languageName": "Chinese (Simplified)",
|
||||
"languageCode": "zh-hans"
|
||||
},
|
||||
{
|
||||
"languageName": "Japanese",
|
||||
"languageCode": "ja"
|
||||
},
|
||||
{
|
||||
"languageName": "Korean",
|
||||
"languageCode": "ko"
|
||||
},
|
||||
{
|
||||
"languageName": "Dutch",
|
||||
"languageCode": "nl"
|
||||
},
|
||||
{
|
||||
"languageName": "Hindi",
|
||||
"languageCode": "hi"
|
||||
},
|
||||
{
|
||||
"languageName": "Turkish",
|
||||
"languageCode": "tr"
|
||||
},
|
||||
{
|
||||
"languageName": "Gujarati",
|
||||
"languageCode": "gu"
|
||||
},
|
||||
{
|
||||
"languageName": "Marathi",
|
||||
"languageCode": "mr"
|
||||
},
|
||||
{
|
||||
"languageName": "Tamil",
|
||||
"languageCode": "ta"
|
||||
},
|
||||
{
|
||||
"languageName": "Telugu",
|
||||
"languageCode": "te"
|
||||
},
|
||||
{
|
||||
"languageName": "Zulu",
|
||||
"languageCode": "zu"
|
||||
},
|
||||
{
|
||||
"languageName": "Afrikaans",
|
||||
"languageCode": "af"
|
||||
},
|
||||
{
|
||||
"languageName": "Amharic",
|
||||
"languageCode": "am"
|
||||
},
|
||||
{
|
||||
"languageName": "Arabic",
|
||||
"languageCode": "ar"
|
||||
},
|
||||
{
|
||||
"languageName": "Assamese",
|
||||
"languageCode": "as"
|
||||
},
|
||||
{
|
||||
"languageName": "Azerbaijani",
|
||||
"languageCode": "az"
|
||||
},
|
||||
{
|
||||
"languageName": "Belarusian",
|
||||
"languageCode": "be"
|
||||
},
|
||||
{
|
||||
"languageName": "Bulgarian",
|
||||
"languageCode": "bg"
|
||||
},
|
||||
{
|
||||
"languageName": "Breton",
|
||||
"languageCode": "br"
|
||||
},
|
||||
{
|
||||
"languageName": "Bosnian",
|
||||
"languageCode": "bs"
|
||||
},
|
||||
{
|
||||
"languageName": "Catalan",
|
||||
"languageCode": "ca"
|
||||
},
|
||||
{
|
||||
"languageName": "Czech",
|
||||
"languageCode": "cs"
|
||||
},
|
||||
{
|
||||
"languageName": "Welsh",
|
||||
"languageCode": "cy"
|
||||
},
|
||||
{
|
||||
"languageName": "Danish",
|
||||
"languageCode": "da"
|
||||
},
|
||||
{
|
||||
"languageName": "Greek",
|
||||
"languageCode": "el"
|
||||
},
|
||||
{
|
||||
"languageName": "Esperanto",
|
||||
"languageCode": "eo"
|
||||
},
|
||||
{
|
||||
"languageName": "Estonian",
|
||||
"languageCode": "et"
|
||||
},
|
||||
{
|
||||
"languageName": "Basque",
|
||||
"languageCode": "eu"
|
||||
},
|
||||
{
|
||||
"languageName": "Persian",
|
||||
"languageCode": "fa"
|
||||
},
|
||||
{
|
||||
"languageName": "Finnish",
|
||||
"languageCode": "fi"
|
||||
},
|
||||
{
|
||||
"languageName": "Western Frisian",
|
||||
"languageCode": "fy"
|
||||
},
|
||||
{
|
||||
"languageName": "Irish",
|
||||
"languageCode": "ga"
|
||||
},
|
||||
{
|
||||
"languageName": "Scottish Gaelic",
|
||||
"languageCode": "gd"
|
||||
},
|
||||
{
|
||||
"languageName": "Galician",
|
||||
"languageCode": "gl"
|
||||
},
|
||||
{
|
||||
"languageName": "Hausa",
|
||||
"languageCode": "ha"
|
||||
},
|
||||
{
|
||||
"languageName": "Hebrew",
|
||||
"languageCode": "he"
|
||||
},
|
||||
{
|
||||
"languageName": "Croatian",
|
||||
"languageCode": "hr"
|
||||
},
|
||||
{
|
||||
"languageName": "Hungarian",
|
||||
"languageCode": "hu"
|
||||
},
|
||||
{
|
||||
"languageName": "Armenian",
|
||||
"languageCode": "hy"
|
||||
},
|
||||
{
|
||||
"languageName": "Indonesian",
|
||||
"languageCode": "id"
|
||||
},
|
||||
{
|
||||
"languageName": "Javanese",
|
||||
"languageCode": "jv"
|
||||
},
|
||||
{
|
||||
"languageName": "Georgian",
|
||||
"languageCode": "ka"
|
||||
},
|
||||
{
|
||||
"languageName": "Kazakh",
|
||||
"languageCode": "kk"
|
||||
},
|
||||
{
|
||||
"languageName": "Khmer",
|
||||
"languageCode": "km"
|
||||
},
|
||||
{
|
||||
"languageName": "Kannada",
|
||||
"languageCode": "kn"
|
||||
},
|
||||
{
|
||||
"languageName": "Kurdish (Kurmanji)",
|
||||
"languageCode": "ku"
|
||||
},
|
||||
{
|
||||
"languageName": "Kyrgyz",
|
||||
"languageCode": "ky"
|
||||
},
|
||||
{
|
||||
"languageName": "Latin",
|
||||
"languageCode": "la"
|
||||
},
|
||||
{
|
||||
"languageName": "Lao",
|
||||
"languageCode": "lo"
|
||||
},
|
||||
{
|
||||
"languageName": "Lithuanian",
|
||||
"languageCode": "lt"
|
||||
},
|
||||
{
|
||||
"languageName": "Latvian",
|
||||
"languageCode": "lv"
|
||||
},
|
||||
{
|
||||
"languageName": "Malagasy",
|
||||
"languageCode": "mg"
|
||||
},
|
||||
{
|
||||
"languageName": "Macedonian",
|
||||
"languageCode": "mk"
|
||||
},
|
||||
{
|
||||
"languageName": "Malayalam",
|
||||
"languageCode": "ml"
|
||||
},
|
||||
{
|
||||
"languageName": "Mongolian",
|
||||
"languageCode": "mn"
|
||||
},
|
||||
{
|
||||
"languageName": "Malay",
|
||||
"languageCode": "ms"
|
||||
},
|
||||
{
|
||||
"languageName": "Burmese",
|
||||
"languageCode": "my"
|
||||
},
|
||||
{
|
||||
"languageName": "Nepali",
|
||||
"languageCode": "ne"
|
||||
},
|
||||
{
|
||||
"languageName": "Norwegian (Bokmal)",
|
||||
"languageCode": "nb"
|
||||
},
|
||||
{
|
||||
"languageName": "Odia",
|
||||
"languageCode": "or"
|
||||
},
|
||||
{
|
||||
"languageName": "Punjabi",
|
||||
"languageCode": "pa"
|
||||
},
|
||||
{
|
||||
"languageName": "Polish",
|
||||
"languageCode": "pl"
|
||||
},
|
||||
{
|
||||
"languageName": "Pashto",
|
||||
"languageCode": "ps"
|
||||
},
|
||||
{
|
||||
"languageName": "Romanian",
|
||||
"languageCode": "ro"
|
||||
},
|
||||
{
|
||||
"languageName": "Russian",
|
||||
"languageCode": "ru"
|
||||
},
|
||||
{
|
||||
"languageName": "Sanskrit",
|
||||
"languageCode": "sa"
|
||||
},
|
||||
{
|
||||
"languageName": "Sindhi",
|
||||
"languageCode": "sd"
|
||||
},
|
||||
{
|
||||
"languageName": "Sinhala",
|
||||
"languageCode": "si"
|
||||
},
|
||||
{
|
||||
"languageName": "Slovak",
|
||||
"languageCode": "sk"
|
||||
},
|
||||
{
|
||||
"languageName": "Slovenian",
|
||||
"languageCode": "sl"
|
||||
},
|
||||
{
|
||||
"languageName": "Somali",
|
||||
"languageCode": "so"
|
||||
},
|
||||
{
|
||||
"languageName": "Albanian",
|
||||
"languageCode": "sq"
|
||||
},
|
||||
{
|
||||
"languageName": "Serbian",
|
||||
"languageCode": "sr"
|
||||
},
|
||||
{
|
||||
"languageName": "Sundanese",
|
||||
"languageCode": "su"
|
||||
},
|
||||
{
|
||||
"languageName": "Swedish",
|
||||
"languageCode": "sv"
|
||||
},
|
||||
{
|
||||
"languageName": "Swahili",
|
||||
"languageCode": "sw"
|
||||
},
|
||||
{
|
||||
"languageName": "Thai",
|
||||
"languageCode": "th"
|
||||
},
|
||||
{
|
||||
"languageName": "Filipino",
|
||||
"languageCode": "tl"
|
||||
},
|
||||
{
|
||||
"languageName": "Uyghur",
|
||||
"languageCode": "ug"
|
||||
},
|
||||
{
|
||||
"languageName": "Ukrainian",
|
||||
"languageCode": "uk"
|
||||
},
|
||||
{
|
||||
"languageName": "Urdu",
|
||||
"languageCode": "ur"
|
||||
},
|
||||
{
|
||||
"languageName": "Uzbek",
|
||||
"languageCode": "uz"
|
||||
},
|
||||
{
|
||||
"languageName": "Vietnamese",
|
||||
"languageCode": "vi"
|
||||
},
|
||||
{
|
||||
"languageName": "Xhosa",
|
||||
"languageCode": "xh"
|
||||
},
|
||||
{
|
||||
"languageName": "Yiddish",
|
||||
"languageCode": "yi"
|
||||
},
|
||||
{
|
||||
"languageName": "Chinese (Traditional)",
|
||||
"languageCode": "zh-hant"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"language": "en"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"category": "Person.Name",
|
||||
"description": "Name of an individual",
|
||||
"examples": "john, Sam, Lisa"
|
||||
},
|
||||
{
|
||||
"category": "General.Event",
|
||||
"description": "Important events",
|
||||
"examples": "World War two, Covid 19"
|
||||
},
|
||||
{
|
||||
"category": "General.Organization",
|
||||
"description": "Companies and corporations",
|
||||
"examples": "Microsoft, Amazon"
|
||||
},
|
||||
{
|
||||
"category": "Choice.Boolean",
|
||||
"description": "boolean choice",
|
||||
"examples": "yes, no, agreed"
|
||||
},
|
||||
{
|
||||
"category": "Quantity.Age",
|
||||
"description": "Age of a person or thing",
|
||||
"examples": "10-month-old, 19 years old, 58 year-old"
|
||||
},
|
||||
{
|
||||
"category": "Quantity.NumberRange",
|
||||
"description": "a numeric interval",
|
||||
"examples": "between 25 and 35, 25-35"
|
||||
},
|
||||
{
|
||||
"category": "Quantity.Number",
|
||||
"description": "A cardinal number in numeric or text form",
|
||||
"examples": "ten, forty two, 3.141, 10K"
|
||||
},
|
||||
{
|
||||
"category": "Quantity.Percentage",
|
||||
"description": "A percentage, using the symbol % or the word \"percent\"",
|
||||
"examples": "10%, 5.6 percent"
|
||||
},
|
||||
{
|
||||
"category": "Quantity.Ordinal",
|
||||
"description": "An ordinal number in numeric or text form",
|
||||
"examples": "first, second, tenth, 1st, 2nd, 10th"
|
||||
},
|
||||
{
|
||||
"category": "Quantity.Dimension",
|
||||
"description": "Spacial dimensions, including length, distance, area, and volume",
|
||||
"examples": "2 miles, 650 square kilometres, 9,350 feet"
|
||||
},
|
||||
{
|
||||
"category": "Quantity.Temperature",
|
||||
"description": "A temperature in celsius or fahrenheit",
|
||||
"examples": "32F, 34 degrees celsius, 2 deg C"
|
||||
},
|
||||
{
|
||||
"category": "Quantity.Currency",
|
||||
"description": "Monetary amounts, including currency",
|
||||
"examples": "1000.00 US dollars, £20.00, $ 67.5 B"
|
||||
},
|
||||
{
|
||||
"category": "DateTime",
|
||||
"description": "exact date values",
|
||||
"examples": "May 11th"
|
||||
},
|
||||
{
|
||||
"category": "Email",
|
||||
"description": "Email addresses",
|
||||
"examples": "user@example.net, user_name@example.com, user.Name12@example.net"
|
||||
},
|
||||
{
|
||||
"category": "Phone Number",
|
||||
"description": "US phone numbers",
|
||||
"examples": "123-456-7890, +1 123 456 789, (123)456-789"
|
||||
},
|
||||
{
|
||||
"category": "URL",
|
||||
"description": "Websites URLs and links",
|
||||
"examples": "www.example.com, http://example.net?name=my_name&age=10"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectKind": "Conversation"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"trainingConfigVersion": "2022-05-01",
|
||||
"modelExpirationDate": "2022-10-28"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"jobId": "c36a8775-35b9-4cb5-a8db-665e7d91aafe_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "c36a8775-35b9-4cb5-a8db-665e7d91aafe_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T16:09:50Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T16:09:58Z",
|
||||
"expirationDateTime": "2022-04-25T16:09:50Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"result": {
|
||||
"modelLabel": "model1",
|
||||
"trainingConfigVersion": "2022-05-01",
|
||||
"trainingMode": "standard",
|
||||
"estimatedEndDateTime": "2022-04-18T15:47:58.8190649Z",
|
||||
"trainingStatus": {
|
||||
"percentComplete": 3,
|
||||
"startDateTime": "2022-04-18T15:45:06.8190649Z",
|
||||
"status": "running"
|
||||
},
|
||||
"evaluationStatus": {
|
||||
"percentComplete": 0,
|
||||
"status": "notStarted"
|
||||
}
|
||||
},
|
||||
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:44:44Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:45:48Z",
|
||||
"expirationDateTime": "2022-04-25T15:44:44Z",
|
||||
"status": "running"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:52:48Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:53:04Z",
|
||||
"expirationDateTime": "2022-04-25T15:52:48Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"body": {
|
||||
"projectFileVersion": "2022-05-01",
|
||||
"stringIndexType": "Utf16CodeUnit",
|
||||
"metadata": {
|
||||
"projectKind": "Conversation",
|
||||
"settings": {
|
||||
"confidenceThreshold": 0.7
|
||||
},
|
||||
"projectName": "EmailApp",
|
||||
"multilingual": true,
|
||||
"description": "Trying out CLU",
|
||||
"language": "en-us"
|
||||
},
|
||||
"assets": {
|
||||
"projectKind": "Conversation",
|
||||
"intents": [
|
||||
{
|
||||
"category": "Read"
|
||||
},
|
||||
{
|
||||
"category": "Delete"
|
||||
}
|
||||
],
|
||||
"entities": [
|
||||
{
|
||||
"category": "Sender"
|
||||
},
|
||||
{
|
||||
"category": "Number",
|
||||
"regex": {
|
||||
"expressions": [
|
||||
{
|
||||
"regexKey": "UK Phone numbers",
|
||||
"language": "en-us",
|
||||
"regexPattern": "/^\\(?([0-9]{3})\\)?[-.\\s]?([0-9]{3})[-.\\s]?([0-9]{4})$/"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"utterances": [
|
||||
{
|
||||
"text": "Open Blake's email",
|
||||
"dataset": "Train",
|
||||
"intent": "Read",
|
||||
"entities": [
|
||||
{
|
||||
"category": "Sender",
|
||||
"offset": 5,
|
||||
"length": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "Delete last email",
|
||||
"language": "en-gb",
|
||||
"dataset": "Test",
|
||||
"intent": "Delete",
|
||||
"entities": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/import/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"projectName": "Booking",
|
||||
"deploymentsMetadata": [
|
||||
{
|
||||
"deploymentName": "staging",
|
||||
"lastDeployedDateTime": "2022-04-18T14:49:01Z",
|
||||
"deploymentExpirationDate": "2023-10-28"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"azureResourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu",
|
||||
"region": "westeurope"
|
||||
},
|
||||
{
|
||||
"azureResourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestEus",
|
||||
"region": "eastus"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"deploymentName": "production",
|
||||
"modelId": "model1-20220418T034749-299f45b8114849538c1a750b21b05a94",
|
||||
"lastTrainedDateTime": "2022-04-18T15:47:49.4334381Z",
|
||||
"lastDeployedDateTime": "2022-04-18T16:03:51Z",
|
||||
"deploymentExpirationDate": "2023-10-28",
|
||||
"modelTrainingConfigVersion": "2022-05-01",
|
||||
"assignedResources": [
|
||||
{
|
||||
"resourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu",
|
||||
"region": "westeurope"
|
||||
},
|
||||
{
|
||||
"resourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestEus",
|
||||
"region": "eastus"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"deploymentName": "staging",
|
||||
"modelId": "model1-20220418T034749-299f45b8114849538c1a750b21b05a94",
|
||||
"lastTrainedDateTime": "2022-04-18T15:47:49.4334381Z",
|
||||
"lastDeployedDateTime": "2022-04-18T15:53:04Z",
|
||||
"deploymentExpirationDate": "2023-10-28",
|
||||
"modelTrainingConfigVersion": "2022-05-01"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"label": "model1",
|
||||
"modelId": "model1-20220418T034749-299f45b8114849538c1a750b21b05a94",
|
||||
"lastTrainedDateTime": "2022-04-18T15:47:49Z",
|
||||
"lastTrainingDurationInSeconds": 186,
|
||||
"modelExpirationDate": "2022-10-28",
|
||||
"modelTrainingConfigVersion": "2022-05-01"
|
||||
},
|
||||
{
|
||||
"label": "model2",
|
||||
"modelId": "model2-20220418T052522-c63bd244dd9e4bf8adec1a7129968c99",
|
||||
"lastTrainedDateTime": "2022-04-18T17:25:22Z",
|
||||
"lastTrainingDurationInSeconds": 192,
|
||||
"modelExpirationDate": "2022-10-28",
|
||||
"modelTrainingConfigVersion": "2022-05-01"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"createdDateTime": "2022-04-18T14:03:16Z",
|
||||
"lastModifiedDateTime": "2022-04-18T14:03:16Z",
|
||||
"projectKind": "Conversation",
|
||||
"projectName": "myproject1",
|
||||
"multilingual": false,
|
||||
"description": "This is a sample conversation project.",
|
||||
"language": "en"
|
||||
},
|
||||
{
|
||||
"createdDateTime": "2022-04-18T14:03:12Z",
|
||||
"lastModifiedDateTime": "2022-04-18T14:03:12Z",
|
||||
"projectKind": "Conversation",
|
||||
"projectName": "myproject",
|
||||
"multilingual": false,
|
||||
"description": "This is a sample conversation project.",
|
||||
"language": "en"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"result": {
|
||||
"modelLabel": "model1",
|
||||
"trainingConfigVersion": "2022-05-01",
|
||||
"trainingMode": "advanced",
|
||||
"trainingStatus": {
|
||||
"percentComplete": 100,
|
||||
"startDateTime": "2022-04-18T15:45:06.8190649Z",
|
||||
"endDateTime": "2022-04-18T15:47:19.2639682Z",
|
||||
"status": "succeeded"
|
||||
},
|
||||
"evaluationStatus": {
|
||||
"percentComplete": 100,
|
||||
"startDateTime": "2022-04-18T15:47:19.2734976Z",
|
||||
"endDateTime": "2022-04-18T15:47:23.8378892Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
},
|
||||
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:44:44Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:47:50Z",
|
||||
"expirationDateTime": "2022-04-25T15:44:44Z",
|
||||
"status": "succeeded"
|
||||
},
|
||||
{
|
||||
"result": {
|
||||
"modelLabel": "model2",
|
||||
"trainingConfigVersion": "2022-05-01",
|
||||
"trainingMode": "standard",
|
||||
"trainingStatus": {
|
||||
"percentComplete": 100,
|
||||
"startDateTime": "2022-04-18T17:22:39.3663023Z",
|
||||
"endDateTime": "2022-04-18T17:24:51.9440947Z",
|
||||
"status": "succeeded"
|
||||
},
|
||||
"evaluationStatus": {
|
||||
"percentComplete": 100,
|
||||
"startDateTime": "2022-04-18T17:24:51.9571747Z",
|
||||
"endDateTime": "2022-04-18T17:24:58.1427823Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
},
|
||||
"jobId": "9145f93f-6f37-418c-8527-d2ded84cece0_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T17:22:11Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T17:25:23Z",
|
||||
"expirationDateTime": "2022-04-25T17:22:11Z",
|
||||
"status": "succeeded"
|
||||
},
|
||||
{
|
||||
"result": {
|
||||
"modelLabel": "model2",
|
||||
"trainingConfigVersion": "2022-05-01",
|
||||
"trainingMode": "standard",
|
||||
"trainingStatus": {
|
||||
"percentComplete": 100,
|
||||
"startDateTime": "2022-04-18T17:44:41.388358Z",
|
||||
"endDateTime": "2022-04-18T17:50:29.5675101Z",
|
||||
"status": "succeeded"
|
||||
},
|
||||
"evaluationStatus": {
|
||||
"percentComplete": 100,
|
||||
"startDateTime": "2022-04-18T17:50:29.5808461Z",
|
||||
"endDateTime": "2022-04-18T17:50:35.3482185Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
},
|
||||
"jobId": "ee23c900-354d-4b6d-96e1-8197db2bd5f7_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T17:44:04Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T17:51:11Z",
|
||||
"expirationDateTime": "2022-04-25T17:44:04Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"trainedModelLabel": "model1"
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/models/model1/load-snapshot/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"body": {
|
||||
"firstDeploymentName": "production",
|
||||
"secondDeploymentName": "staging"
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/deployments/swap/jobs/c36a8775-35b9-4cb5-a8db-665e7d91aafe_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"body": {
|
||||
"modelLabel": "model1",
|
||||
"trainingMode": "standard",
|
||||
"trainingConfigVersion": "latest",
|
||||
"evaluationOptions": {
|
||||
"kind": "percentage",
|
||||
"testingSplitPercentage": 20,
|
||||
"trainingSplitPercentage": 80
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/train/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "EmailApp",
|
||||
"deploymentName": "production",
|
||||
"body": {
|
||||
"assignedResourceIds": [
|
||||
"/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu"
|
||||
]
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/resources/unassign/jobs/66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"body": {
|
||||
"resourcesMetadata": [
|
||||
{
|
||||
"azureResourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu",
|
||||
"customDomain": "lang-test-weu.cognitiveservices.azure.com",
|
||||
"region": "westeurope"
|
||||
},
|
||||
{
|
||||
"azureResourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestEus",
|
||||
"customDomain": "lang-test-eus.cognitiveservices.azure.com",
|
||||
"region": "eastus"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/resources/assign/jobs/66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/train/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"Content-Type": "application/merge-patch+json",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"body": {
|
||||
"projectName": "LoanAgreements",
|
||||
"language": "en",
|
||||
"projectKind": "CustomEntityRecognition",
|
||||
"description": "This is a sample dataset provided by the Azure Language service team to help users get started with [Custom named entity recognition](https://aka.ms/ct-docs). The provided sample dataset contains 20 loan agreements drawn up between two entities.",
|
||||
"multilingual": false,
|
||||
"storageInputContainerName": "loanagreements"
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"createdDateTime": "2022-04-18T13:53:03Z",
|
||||
"lastModifiedDateTime": "2022-04-18T13:53:03Z",
|
||||
"projectKind": "CustomEntityRecognition",
|
||||
"storageInputContainerName": "loanagreements",
|
||||
"projectName": "LoanAgreements",
|
||||
"multilingual": false,
|
||||
"description": "This is a sample dataset provided by the Azure Language service team to help users get started with [Custom named entity recognition](https://aka.ms/ct-docs). The provided sample dataset contains 20 loan agreements drawn up between two entities.",
|
||||
"language": "en"
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"createdDateTime": "2022-04-18T13:53:03Z",
|
||||
"lastModifiedDateTime": "2022-04-18T13:53:03Z",
|
||||
"lastTrainedDateTime": "2022-04-18T14:14:28Z",
|
||||
"lastDeployedDateTime": "2022-04-18T14:49:01Z",
|
||||
"projectKind": "CustomEntityRecognition",
|
||||
"storageInputContainerName": "loanagreements",
|
||||
"projectName": "LoanAgreements",
|
||||
"multilingual": false,
|
||||
"description": "This is a sample dataset provided by the Azure Language service team to help users get started with [Custom named entity recognition](https://aka.ms/ct-docs). The provided sample dataset contains 20 loan agreements drawn up between two entities.",
|
||||
"language": "en"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"deploymentName": "staging"
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/deployments/staging/jobs/61ebb7ef-a207-40d2-82b9-5285440ae579_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"deploymentName": "staging",
|
||||
"body": {
|
||||
"assignedResourceIds": [
|
||||
"/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu"
|
||||
]
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/LoanAgreements/deployments/staging/delete-from-resources/jobs/61ebb7ef-a207-40d2-82b9-5285440ae579_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"trainedModelLabel": "model2"
|
||||
},
|
||||
"responses": {
|
||||
"204": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements"
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-text/projects/global/deletion-jobs/129d3182-625d-496c-bcf9-43686e85160b_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"Content-Type": "application/json",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"deploymentName": "production",
|
||||
"body": {
|
||||
"trainedModelLabel": "29886710a2ae49259d62cffca977db66",
|
||||
"assignedResourceIds": [
|
||||
"/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu",
|
||||
"/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestEus"
|
||||
]
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/deployments/production/jobs/66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"stringIndexType": "Utf16CodeUnit"
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/export/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:52:48Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:53:04Z",
|
||||
"expirationDateTime": "2022-04-25T15:52:48Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"deploymentName": "production",
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:52:48Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:53:04Z",
|
||||
"expirationDateTime": "2022-04-25T15:52:48Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"deploymentName": "staging"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"deploymentName": "staging",
|
||||
"modelId": "model1-20220418T034749-299f45b8114849538c1a750b21b05a94",
|
||||
"lastTrainedDateTime": "2022-04-18T15:47:49.4334381Z",
|
||||
"lastDeployedDateTime": "2022-04-18T15:53:04Z",
|
||||
"deploymentExpirationDate": "2023-10-28",
|
||||
"modelTrainingConfigVersion": "2022-05-15-preview",
|
||||
"assignedResources": [
|
||||
{
|
||||
"resourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu",
|
||||
"region": "westeurope"
|
||||
},
|
||||
{
|
||||
"resourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestEus",
|
||||
"region": "eastus"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"deploymentName": "production",
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:52:48Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:53:04Z",
|
||||
"expirationDateTime": "2022-04-25T15:52:48Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"jobId": "c95efa2a-44e8-461e-8aa5-04b4677bfa84_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"resultUrl": "{Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/export/jobs/c4946bfa-4fbf-493b-bfcf-2d232eb9de69_637858368000000000/result?api-version=2022-10-01-preview",
|
||||
"jobId": "c4946bfa-4fbf-493b-bfcf-2d232eb9de69_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:23:07Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:23:08Z",
|
||||
"expirationDateTime": "2022-04-25T15:23:07Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"jobId": "c95efa2a-44e8-461e-8aa5-04b4677bfa84_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "c95efa2a-44e8-461e-8aa5-04b4677bfa84_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:17:20Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:17:22Z",
|
||||
"expirationDateTime": "2022-04-25T15:17:20Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"trainedModelLabel": "model1",
|
||||
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:44:44Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:45:48Z",
|
||||
"expirationDateTime": "2022-04-25T15:44:44Z",
|
||||
"status": "running"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"trainedModelLabel": "model1"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"label": "model1",
|
||||
"modelId": "model1-20220418T034749-299f45b8114849538c1a750b21b05a94",
|
||||
"lastTrainedDateTime": "2022-04-18T15:47:49Z",
|
||||
"lastTrainingDurationInSeconds": 186,
|
||||
"modelExpirationDate": "2022-10-28",
|
||||
"modelTrainingConfigVersion": "2022-05-15-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,295 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"trainedModelLabel": "model2",
|
||||
"stringIndexType": "Utf16CodeUnit",
|
||||
"maxpagesize": 10
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"location": "11.txt",
|
||||
"language": "en-us",
|
||||
"projectKind": "CustomEntityRecognition",
|
||||
"customEntityRecognitionResult": {
|
||||
"entities": [
|
||||
{
|
||||
"expectedEntities": [
|
||||
{
|
||||
"category": "Date",
|
||||
"offset": 5,
|
||||
"length": 9
|
||||
},
|
||||
{
|
||||
"category": "BorrowerName",
|
||||
"offset": 160,
|
||||
"length": 13
|
||||
},
|
||||
{
|
||||
"category": "BorrowerAddress",
|
||||
"offset": 181,
|
||||
"length": 34
|
||||
},
|
||||
{
|
||||
"category": "BorrowerCity",
|
||||
"offset": 225,
|
||||
"length": 6
|
||||
},
|
||||
{
|
||||
"category": "BorrowerState",
|
||||
"offset": 242,
|
||||
"length": 8
|
||||
},
|
||||
{
|
||||
"category": "LenderName",
|
||||
"offset": 271,
|
||||
"length": 12
|
||||
},
|
||||
{
|
||||
"category": "LenderAddress",
|
||||
"offset": 310,
|
||||
"length": 20
|
||||
},
|
||||
{
|
||||
"category": "LenderCity",
|
||||
"offset": 340,
|
||||
"length": 8
|
||||
},
|
||||
{
|
||||
"category": "LenderState",
|
||||
"offset": 359,
|
||||
"length": 11
|
||||
},
|
||||
{
|
||||
"category": "LoanAmountWords",
|
||||
"offset": 448,
|
||||
"length": 52
|
||||
},
|
||||
{
|
||||
"category": "LoanAmountNumbers",
|
||||
"offset": 502,
|
||||
"length": 10
|
||||
},
|
||||
{
|
||||
"category": "Interest",
|
||||
"offset": 588,
|
||||
"length": 2
|
||||
}
|
||||
],
|
||||
"predictedEntities": [
|
||||
{
|
||||
"category": "Date",
|
||||
"offset": 5,
|
||||
"length": 9
|
||||
},
|
||||
{
|
||||
"category": "BorrowerName",
|
||||
"offset": 160,
|
||||
"length": 13
|
||||
},
|
||||
{
|
||||
"category": "BorrowerAddress",
|
||||
"offset": 200,
|
||||
"length": 15
|
||||
},
|
||||
{
|
||||
"category": "BorrowerCity",
|
||||
"offset": 225,
|
||||
"length": 6
|
||||
},
|
||||
{
|
||||
"category": "BorrowerState",
|
||||
"offset": 242,
|
||||
"length": 8
|
||||
},
|
||||
{
|
||||
"category": "LenderName",
|
||||
"offset": 271,
|
||||
"length": 12
|
||||
},
|
||||
{
|
||||
"category": "LenderAddress",
|
||||
"offset": 310,
|
||||
"length": 20
|
||||
},
|
||||
{
|
||||
"category": "LenderCity",
|
||||
"offset": 340,
|
||||
"length": 8
|
||||
},
|
||||
{
|
||||
"category": "LenderState",
|
||||
"offset": 359,
|
||||
"length": 11
|
||||
},
|
||||
{
|
||||
"category": "LoanAmountWords",
|
||||
"offset": 448,
|
||||
"length": 52
|
||||
},
|
||||
{
|
||||
"category": "LoanAmountNumbers",
|
||||
"offset": 502,
|
||||
"length": 10
|
||||
},
|
||||
{
|
||||
"category": "Interest",
|
||||
"offset": 588,
|
||||
"length": 2
|
||||
}
|
||||
],
|
||||
"regionOffset": 0,
|
||||
"regionLength": 1780
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": "01.txt",
|
||||
"language": "en-us",
|
||||
"projectKind": "CustomEntityRecognition",
|
||||
"customEntityRecognitionResult": {
|
||||
"entities": [
|
||||
{
|
||||
"expectedEntities": [
|
||||
{
|
||||
"category": "Date",
|
||||
"offset": 5,
|
||||
"length": 9
|
||||
},
|
||||
{
|
||||
"category": "BorrowerName",
|
||||
"offset": 160,
|
||||
"length": 13
|
||||
},
|
||||
{
|
||||
"category": "BorrowerAddress",
|
||||
"offset": 200,
|
||||
"length": 13
|
||||
},
|
||||
{
|
||||
"category": "BorrowerCity",
|
||||
"offset": 223,
|
||||
"length": 9
|
||||
},
|
||||
{
|
||||
"category": "BorrowerState",
|
||||
"offset": 243,
|
||||
"length": 8
|
||||
},
|
||||
{
|
||||
"category": "LenderName",
|
||||
"offset": 273,
|
||||
"length": 14
|
||||
},
|
||||
{
|
||||
"category": "LenderAddress",
|
||||
"offset": 314,
|
||||
"length": 15
|
||||
},
|
||||
{
|
||||
"category": "LenderCity",
|
||||
"offset": 339,
|
||||
"length": 10
|
||||
},
|
||||
{
|
||||
"category": "LenderState",
|
||||
"offset": 360,
|
||||
"length": 8
|
||||
},
|
||||
{
|
||||
"category": "LoanAmountWords",
|
||||
"offset": 446,
|
||||
"length": 66
|
||||
},
|
||||
{
|
||||
"category": "LoanAmountNumbers",
|
||||
"offset": 514,
|
||||
"length": 11
|
||||
},
|
||||
{
|
||||
"category": "Interest",
|
||||
"offset": 601,
|
||||
"length": 2
|
||||
}
|
||||
],
|
||||
"predictedEntities": [
|
||||
{
|
||||
"category": "Date",
|
||||
"offset": 5,
|
||||
"length": 9
|
||||
},
|
||||
{
|
||||
"category": "BorrowerName",
|
||||
"offset": 160,
|
||||
"length": 13
|
||||
},
|
||||
{
|
||||
"category": "BorrowerAddress",
|
||||
"offset": 200,
|
||||
"length": 13
|
||||
},
|
||||
{
|
||||
"category": "BorrowerCity",
|
||||
"offset": 223,
|
||||
"length": 9
|
||||
},
|
||||
{
|
||||
"category": "BorrowerState",
|
||||
"offset": 243,
|
||||
"length": 8
|
||||
},
|
||||
{
|
||||
"category": "LenderName",
|
||||
"offset": 273,
|
||||
"length": 14
|
||||
},
|
||||
{
|
||||
"category": "LenderAddress",
|
||||
"offset": 314,
|
||||
"length": 15
|
||||
},
|
||||
{
|
||||
"category": "LenderCity",
|
||||
"offset": 339,
|
||||
"length": 10
|
||||
},
|
||||
{
|
||||
"category": "LenderState",
|
||||
"offset": 360,
|
||||
"length": 8
|
||||
},
|
||||
{
|
||||
"category": "LoanAmountWords",
|
||||
"offset": 446,
|
||||
"length": 66
|
||||
},
|
||||
{
|
||||
"category": "LoanAmountNumbers",
|
||||
"offset": 514,
|
||||
"length": 11
|
||||
},
|
||||
{
|
||||
"category": "Interest",
|
||||
"offset": 601,
|
||||
"length": 2
|
||||
}
|
||||
],
|
||||
"regionOffset": 0,
|
||||
"regionLength": 1793
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"nextLink": "{Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/models/model2/evaluation/result/?api-version=2022-10-01-preview&top=2147483645&skip={maxpagesize}&maxpagesize={maxpagesize}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,232 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"trainedModelLabel": "model2"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"projectKind": "CustomEntityRecognition",
|
||||
"customEntityRecognitionEvaluation": {
|
||||
"confusionMatrix": {
|
||||
"BorrowerAddress": {
|
||||
"BorrowerAddress": {
|
||||
"normalizedValue": 86.206894,
|
||||
"rawValue": 3.4482758
|
||||
},
|
||||
"$none": {
|
||||
"normalizedValue": 13.793103,
|
||||
"rawValue": 0.55172414
|
||||
}
|
||||
},
|
||||
"BorrowerCity": {
|
||||
"BorrowerCity": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"BorrowerName": {
|
||||
"BorrowerName": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"BorrowerState": {
|
||||
"BorrowerState": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"Date": {
|
||||
"Date": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"Interest": {
|
||||
"Interest": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"LenderAddress": {
|
||||
"LenderAddress": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"LenderCity": {
|
||||
"LenderCity": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"LenderName": {
|
||||
"LenderName": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"LenderState": {
|
||||
"LenderState": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"LoanAmountNumbers": {
|
||||
"LoanAmountNumbers": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"LoanAmountWords": {
|
||||
"LoanAmountWords": {
|
||||
"normalizedValue": 100.0,
|
||||
"rawValue": 4.0
|
||||
}
|
||||
},
|
||||
"$none": {
|
||||
"$none": {
|
||||
"normalizedValue": 99.81485,
|
||||
"rawValue": 51.90372
|
||||
},
|
||||
"BorrowerAddress": {
|
||||
"normalizedValue": 0.18315019,
|
||||
"rawValue": 0.0952381
|
||||
},
|
||||
"Interest": {
|
||||
"normalizedValue": 0.002005294,
|
||||
"rawValue": 0.0010427529
|
||||
}
|
||||
}
|
||||
},
|
||||
"entities": {
|
||||
"Date": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"BorrowerName": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"BorrowerAddress": {
|
||||
"f1": 0.6666666865348816,
|
||||
"precision": 0.6000000238418579,
|
||||
"recall": 0.75,
|
||||
"truePositiveCount": 3,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 2,
|
||||
"falseNegativeCount": 1
|
||||
},
|
||||
"BorrowerCity": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"BorrowerState": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"LenderName": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"LenderAddress": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"LenderCity": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"LenderState": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"LoanAmountWords": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"LoanAmountNumbers": {
|
||||
"f1": 1.0,
|
||||
"precision": 1.0,
|
||||
"recall": 1.0,
|
||||
"truePositiveCount": 4,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 0,
|
||||
"falseNegativeCount": 0
|
||||
},
|
||||
"Interest": {
|
||||
"f1": 0.75,
|
||||
"precision": 0.75,
|
||||
"recall": 0.75,
|
||||
"truePositiveCount": 3,
|
||||
"trueNegativeCount": 0,
|
||||
"falsePositiveCount": 1,
|
||||
"falseNegativeCount": 1
|
||||
}
|
||||
},
|
||||
"microF1": 0.94845366,
|
||||
"microPrecision": 0.93877554,
|
||||
"microRecall": 0.9583333,
|
||||
"macroF1": 0.9513889,
|
||||
"macroPrecision": 0.9458334,
|
||||
"macroRecall": 0.9583333
|
||||
},
|
||||
"evaluationOptions": {
|
||||
"kind": "percentage",
|
||||
"trainingSplitPercentage": 80,
|
||||
"testingSplitPercentage": 20
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"createdDateTime": "2022-04-18T13:53:03Z",
|
||||
"lastModifiedDateTime": "2022-04-18T13:53:03Z",
|
||||
"lastTrainedDateTime": "2022-04-18T14:14:28Z",
|
||||
"lastDeployedDateTime": "2022-04-18T14:49:01Z",
|
||||
"projectKind": "CustomEntityRecognition",
|
||||
"storageInputContainerName": "loanagreements",
|
||||
"projectName": "LoanAgreements",
|
||||
"multilingual": false,
|
||||
"description": "This is a sample dataset provided by the Azure Language service team to help users get started with [Custom named entity recognition](https://aka.ms/ct-docs). The provided sample dataset contains 20 loan agreements drawn up between two entities.",
|
||||
"language": "en"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"jobId": "129d3182-625d-496c-bcf9-43686e85160b_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "129d3182-625d-496c-bcf9-43686e85160b_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T14:02:34Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T14:02:34Z",
|
||||
"expirationDateTime": "2022-04-25T14:02:34Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,389 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"languageName": "English",
|
||||
"languageCode": "en"
|
||||
},
|
||||
{
|
||||
"languageName": "English",
|
||||
"languageCode": "en-us"
|
||||
},
|
||||
{
|
||||
"languageName": "French",
|
||||
"languageCode": "fr"
|
||||
},
|
||||
{
|
||||
"languageName": "Italian",
|
||||
"languageCode": "it"
|
||||
},
|
||||
{
|
||||
"languageName": "Spanish",
|
||||
"languageCode": "es"
|
||||
},
|
||||
{
|
||||
"languageName": "German",
|
||||
"languageCode": "de"
|
||||
},
|
||||
{
|
||||
"languageName": "Portuguese (Brazil)",
|
||||
"languageCode": "pt-br"
|
||||
},
|
||||
{
|
||||
"languageName": "Portuguese (Portugal)",
|
||||
"languageCode": "pt-pt"
|
||||
},
|
||||
{
|
||||
"languageName": "Afrikaans",
|
||||
"languageCode": "af"
|
||||
},
|
||||
{
|
||||
"languageName": "Amharic",
|
||||
"languageCode": "am"
|
||||
},
|
||||
{
|
||||
"languageName": "Arabic",
|
||||
"languageCode": "ar"
|
||||
},
|
||||
{
|
||||
"languageName": "Assamese",
|
||||
"languageCode": "as"
|
||||
},
|
||||
{
|
||||
"languageName": "Azerbaijani",
|
||||
"languageCode": "az"
|
||||
},
|
||||
{
|
||||
"languageName": "Belarusian",
|
||||
"languageCode": "be"
|
||||
},
|
||||
{
|
||||
"languageName": "Bulgarian",
|
||||
"languageCode": "bg"
|
||||
},
|
||||
{
|
||||
"languageName": "Breton",
|
||||
"languageCode": "br"
|
||||
},
|
||||
{
|
||||
"languageName": "Bosnian",
|
||||
"languageCode": "bs"
|
||||
},
|
||||
{
|
||||
"languageName": "Catalan",
|
||||
"languageCode": "ca"
|
||||
},
|
||||
{
|
||||
"languageName": "Czech",
|
||||
"languageCode": "cs"
|
||||
},
|
||||
{
|
||||
"languageName": "Welsh",
|
||||
"languageCode": "cy"
|
||||
},
|
||||
{
|
||||
"languageName": "Danish",
|
||||
"languageCode": "da"
|
||||
},
|
||||
{
|
||||
"languageName": "Greek",
|
||||
"languageCode": "el"
|
||||
},
|
||||
{
|
||||
"languageName": "Esperanto",
|
||||
"languageCode": "eo"
|
||||
},
|
||||
{
|
||||
"languageName": "Estonian",
|
||||
"languageCode": "et"
|
||||
},
|
||||
{
|
||||
"languageName": "Basque",
|
||||
"languageCode": "eu"
|
||||
},
|
||||
{
|
||||
"languageName": "Persian",
|
||||
"languageCode": "fa"
|
||||
},
|
||||
{
|
||||
"languageName": "Finnish",
|
||||
"languageCode": "fi"
|
||||
},
|
||||
{
|
||||
"languageName": "Western Frisian",
|
||||
"languageCode": "fy"
|
||||
},
|
||||
{
|
||||
"languageName": "Irish",
|
||||
"languageCode": "ga"
|
||||
},
|
||||
{
|
||||
"languageName": "Scottish Gaelic",
|
||||
"languageCode": "gd"
|
||||
},
|
||||
{
|
||||
"languageName": "Galician",
|
||||
"languageCode": "gl"
|
||||
},
|
||||
{
|
||||
"languageName": "Gujarati",
|
||||
"languageCode": "gu"
|
||||
},
|
||||
{
|
||||
"languageName": "Hausa",
|
||||
"languageCode": "ha"
|
||||
},
|
||||
{
|
||||
"languageName": "Hebrew",
|
||||
"languageCode": "he"
|
||||
},
|
||||
{
|
||||
"languageName": "Hindi",
|
||||
"languageCode": "hi"
|
||||
},
|
||||
{
|
||||
"languageName": "Croatian",
|
||||
"languageCode": "hr"
|
||||
},
|
||||
{
|
||||
"languageName": "Hungarian",
|
||||
"languageCode": "hu"
|
||||
},
|
||||
{
|
||||
"languageName": "Armenian",
|
||||
"languageCode": "hy"
|
||||
},
|
||||
{
|
||||
"languageName": "Indonesian",
|
||||
"languageCode": "id"
|
||||
},
|
||||
{
|
||||
"languageName": "Japanese",
|
||||
"languageCode": "ja"
|
||||
},
|
||||
{
|
||||
"languageName": "Javanese",
|
||||
"languageCode": "jv"
|
||||
},
|
||||
{
|
||||
"languageName": "Georgian",
|
||||
"languageCode": "ka"
|
||||
},
|
||||
{
|
||||
"languageName": "Kazakh",
|
||||
"languageCode": "kk"
|
||||
},
|
||||
{
|
||||
"languageName": "Khmer",
|
||||
"languageCode": "km"
|
||||
},
|
||||
{
|
||||
"languageName": "Kannada",
|
||||
"languageCode": "kn"
|
||||
},
|
||||
{
|
||||
"languageName": "Korean",
|
||||
"languageCode": "ko"
|
||||
},
|
||||
{
|
||||
"languageName": "Kurdish (Kurmanji)",
|
||||
"languageCode": "ku"
|
||||
},
|
||||
{
|
||||
"languageName": "Kyrgyz",
|
||||
"languageCode": "ky"
|
||||
},
|
||||
{
|
||||
"languageName": "Latin",
|
||||
"languageCode": "la"
|
||||
},
|
||||
{
|
||||
"languageName": "Lao",
|
||||
"languageCode": "lo"
|
||||
},
|
||||
{
|
||||
"languageName": "Lithuanian",
|
||||
"languageCode": "lt"
|
||||
},
|
||||
{
|
||||
"languageName": "Latvian",
|
||||
"languageCode": "lv"
|
||||
},
|
||||
{
|
||||
"languageName": "Malagasy",
|
||||
"languageCode": "mg"
|
||||
},
|
||||
{
|
||||
"languageName": "Macedonian",
|
||||
"languageCode": "mk"
|
||||
},
|
||||
{
|
||||
"languageName": "Malayalam",
|
||||
"languageCode": "ml"
|
||||
},
|
||||
{
|
||||
"languageName": "Mongolian",
|
||||
"languageCode": "mn"
|
||||
},
|
||||
{
|
||||
"languageName": "Marathi",
|
||||
"languageCode": "mr"
|
||||
},
|
||||
{
|
||||
"languageName": "Malay",
|
||||
"languageCode": "ms"
|
||||
},
|
||||
{
|
||||
"languageName": "Burmese",
|
||||
"languageCode": "my"
|
||||
},
|
||||
{
|
||||
"languageName": "Nepali",
|
||||
"languageCode": "ne"
|
||||
},
|
||||
{
|
||||
"languageName": "Dutch",
|
||||
"languageCode": "nl"
|
||||
},
|
||||
{
|
||||
"languageName": "Norwegian (Bokmal)",
|
||||
"languageCode": "nb"
|
||||
},
|
||||
{
|
||||
"languageName": "Odia",
|
||||
"languageCode": "or"
|
||||
},
|
||||
{
|
||||
"languageName": "Punjabi",
|
||||
"languageCode": "pa"
|
||||
},
|
||||
{
|
||||
"languageName": "Polish",
|
||||
"languageCode": "pl"
|
||||
},
|
||||
{
|
||||
"languageName": "Pashto",
|
||||
"languageCode": "ps"
|
||||
},
|
||||
{
|
||||
"languageName": "Romanian",
|
||||
"languageCode": "ro"
|
||||
},
|
||||
{
|
||||
"languageName": "Russian",
|
||||
"languageCode": "ru"
|
||||
},
|
||||
{
|
||||
"languageName": "Sanskrit",
|
||||
"languageCode": "sa"
|
||||
},
|
||||
{
|
||||
"languageName": "Sindhi",
|
||||
"languageCode": "sd"
|
||||
},
|
||||
{
|
||||
"languageName": "Sinhala",
|
||||
"languageCode": "si"
|
||||
},
|
||||
{
|
||||
"languageName": "Slovak",
|
||||
"languageCode": "sk"
|
||||
},
|
||||
{
|
||||
"languageName": "Slovenian",
|
||||
"languageCode": "sl"
|
||||
},
|
||||
{
|
||||
"languageName": "Somali",
|
||||
"languageCode": "so"
|
||||
},
|
||||
{
|
||||
"languageName": "Albanian",
|
||||
"languageCode": "sq"
|
||||
},
|
||||
{
|
||||
"languageName": "Serbian",
|
||||
"languageCode": "sr"
|
||||
},
|
||||
{
|
||||
"languageName": "Sundanese",
|
||||
"languageCode": "su"
|
||||
},
|
||||
{
|
||||
"languageName": "Swedish",
|
||||
"languageCode": "sv"
|
||||
},
|
||||
{
|
||||
"languageName": "Swahili",
|
||||
"languageCode": "sw"
|
||||
},
|
||||
{
|
||||
"languageName": "Tamil",
|
||||
"languageCode": "ta"
|
||||
},
|
||||
{
|
||||
"languageName": "Telugu",
|
||||
"languageCode": "te"
|
||||
},
|
||||
{
|
||||
"languageName": "Thai",
|
||||
"languageCode": "th"
|
||||
},
|
||||
{
|
||||
"languageName": "Filipino",
|
||||
"languageCode": "tl"
|
||||
},
|
||||
{
|
||||
"languageName": "Turkish",
|
||||
"languageCode": "tr"
|
||||
},
|
||||
{
|
||||
"languageName": "Uyghur",
|
||||
"languageCode": "ug"
|
||||
},
|
||||
{
|
||||
"languageName": "Ukrainian",
|
||||
"languageCode": "uk"
|
||||
},
|
||||
{
|
||||
"languageName": "Urdu",
|
||||
"languageCode": "ur"
|
||||
},
|
||||
{
|
||||
"languageName": "Uzbek",
|
||||
"languageCode": "uz"
|
||||
},
|
||||
{
|
||||
"languageName": "Vietnamese",
|
||||
"languageCode": "vi"
|
||||
},
|
||||
{
|
||||
"languageName": "Xhosa",
|
||||
"languageCode": "xh"
|
||||
},
|
||||
{
|
||||
"languageName": "Yiddish",
|
||||
"languageCode": "yi"
|
||||
},
|
||||
{
|
||||
"languageName": "Chinese (Simplified)",
|
||||
"languageCode": "zh-hans"
|
||||
},
|
||||
{
|
||||
"languageName": "Chinese (Traditional)",
|
||||
"languageCode": "zh-hant"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectKind": "CustomEntityRecognition"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"trainingConfigVersion": "2022-05-01",
|
||||
"modelExpirationDate": "2022-10-28"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"jobId": "c36a8775-35b9-4cb5-a8db-665e7d91aafe_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "c36a8775-35b9-4cb5-a8db-665e7d91aafe_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T16:09:50Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T16:09:58Z",
|
||||
"expirationDateTime": "2022-04-25T16:09:50Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"result": {
|
||||
"modelLabel": "model1",
|
||||
"trainingConfigVersion": "2022-05-01",
|
||||
"estimatedEndDateTime": "2022-04-18T15:47:58.8190649Z",
|
||||
"trainingStatus": {
|
||||
"percentComplete": 3,
|
||||
"startDateTime": "2022-04-18T15:45:06.8190649Z",
|
||||
"status": "running"
|
||||
},
|
||||
"evaluationStatus": {
|
||||
"percentComplete": 0,
|
||||
"status": "notStarted"
|
||||
}
|
||||
},
|
||||
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:44:44Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:45:48Z",
|
||||
"expirationDateTime": "2022-04-25T15:44:44Z",
|
||||
"status": "running"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"jobId": "66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:52:48Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:53:04Z",
|
||||
"expirationDateTime": "2022-04-25T15:52:48Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"Content-Type": "application/json",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"body": {
|
||||
"projectFileVersion": "2022-05-01",
|
||||
"stringIndexType": "Utf16CodeUnit",
|
||||
"metadata": {
|
||||
"projectKind": "CustomEntityRecognition",
|
||||
"storageInputContainerName": "loanagreements",
|
||||
"settings": {},
|
||||
"projectName": "LoanAgreements",
|
||||
"multilingual": false,
|
||||
"description": "This is a sample dataset provided by the Azure Language service team to help users get started with [Custom named entity recognition](https://aka.ms/ct-docs). The provided sample dataset contains 20 loan agreements drawn up between two entities.",
|
||||
"language": "en"
|
||||
},
|
||||
"assets": {
|
||||
"projectKind": "CustomEntityRecognition",
|
||||
"entities": [
|
||||
{
|
||||
"category": "Date"
|
||||
},
|
||||
{
|
||||
"category": "LenderName"
|
||||
},
|
||||
{
|
||||
"category": "LenderAddress"
|
||||
}
|
||||
],
|
||||
"documents": [
|
||||
{
|
||||
"location": "01.txt",
|
||||
"language": "en-us",
|
||||
"entities": [
|
||||
{
|
||||
"regionOffset": 0,
|
||||
"regionLength": 1793,
|
||||
"labels": [
|
||||
{
|
||||
"category": "Date",
|
||||
"offset": 5,
|
||||
"length": 9
|
||||
},
|
||||
{
|
||||
"category": "LenderName",
|
||||
"offset": 273,
|
||||
"length": 14
|
||||
},
|
||||
{
|
||||
"category": "LenderAddress",
|
||||
"offset": 314,
|
||||
"length": 15
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"location": "02.txt",
|
||||
"language": "en-us",
|
||||
"entities": [
|
||||
{
|
||||
"regionOffset": 0,
|
||||
"regionLength": 1804,
|
||||
"labels": [
|
||||
{
|
||||
"category": "Date",
|
||||
"offset": 5,
|
||||
"length": 10
|
||||
},
|
||||
{
|
||||
"category": "LenderName",
|
||||
"offset": 284,
|
||||
"length": 10
|
||||
},
|
||||
{
|
||||
"category": "LenderAddress",
|
||||
"offset": 321,
|
||||
"length": 20
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/import/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2022-05-01"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"projectName": "Booking",
|
||||
"deploymentsMetadata": [
|
||||
{
|
||||
"deploymentName": "staging",
|
||||
"lastDeployedDateTime": "2022-04-18T14:49:01Z",
|
||||
"deploymentExpirationDate": "2023-10-28"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"azureResourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu",
|
||||
"region": "westeurope"
|
||||
},
|
||||
{
|
||||
"azureResourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestEus",
|
||||
"region": "eastus"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"deploymentName": "production",
|
||||
"modelId": "model1-20220418T034749-299f45b8114849538c1a750b21b05a94",
|
||||
"lastTrainedDateTime": "2022-04-18T15:47:49.4334381Z",
|
||||
"lastDeployedDateTime": "2022-04-18T16:03:51Z",
|
||||
"deploymentExpirationDate": "2023-10-28",
|
||||
"modelTrainingConfigVersion": "2022-05-01",
|
||||
"assignedResources": [
|
||||
{
|
||||
"resourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu",
|
||||
"region": "westeurope"
|
||||
},
|
||||
{
|
||||
"resourceId": "/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestEus",
|
||||
"region": "eastus"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"deploymentName": "staging",
|
||||
"modelId": "model1-20220418T034749-299f45b8114849538c1a750b21b05a94",
|
||||
"lastTrainedDateTime": "2022-04-18T15:47:49.4334381Z",
|
||||
"lastDeployedDateTime": "2022-04-18T15:53:04Z",
|
||||
"deploymentExpirationDate": "2023-10-28",
|
||||
"modelTrainingConfigVersion": "2022-05-01"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"label": "model1",
|
||||
"modelId": "model1-20220418T034749-299f45b8114849538c1a750b21b05a94",
|
||||
"lastTrainedDateTime": "2022-04-18T15:47:49Z",
|
||||
"lastTrainingDurationInSeconds": 186,
|
||||
"modelExpirationDate": "2022-10-28",
|
||||
"modelTrainingConfigVersion": "2022-05-01"
|
||||
},
|
||||
{
|
||||
"label": "model2",
|
||||
"modelId": "model2-20220418T052522-c63bd244dd9e4bf8adec1a7129968c99",
|
||||
"lastTrainedDateTime": "2022-04-18T17:25:22Z",
|
||||
"lastTrainingDurationInSeconds": 192,
|
||||
"modelExpirationDate": "2022-10-28",
|
||||
"modelTrainingConfigVersion": "2022-05-01"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"createdDateTime": "2022-04-18T13:53:03Z",
|
||||
"lastModifiedDateTime": "2022-04-18T13:53:03Z",
|
||||
"lastTrainedDateTime": "2022-04-18T14:14:28Z",
|
||||
"lastDeployedDateTime": "2022-04-18T14:49:01Z",
|
||||
"projectKind": "CustomEntityRecognition",
|
||||
"storageInputContainerName": "loanagreements",
|
||||
"projectName": "LoanAgreements",
|
||||
"multilingual": false,
|
||||
"description": "This is a sample dataset provided by the Azure Language service team to help users get started with [Custom named entity recognition](https://aka.ms/ct-docs). The provided sample dataset contains 20 loan agreements drawn up between two entities.",
|
||||
"language": "en"
|
||||
},
|
||||
{
|
||||
"createdDateTime": "2022-04-18T14:03:12Z",
|
||||
"lastModifiedDateTime": "2022-04-18T14:03:12Z",
|
||||
"projectKind": "CustomMultiLabelClassification",
|
||||
"storageInputContainerName": "loanagreements",
|
||||
"projectName": "MoviesSummary",
|
||||
"multilingual": false,
|
||||
"description": "This is a sample dataset adapted from the CMU Movie Summary public dataset. This was prepared by Microsoft Azure Language Services product team to prepare this dataset to be used as a sample for getting started with Custom text classification. This sample dataset consists of 210 files each of them is a movie summary. Each movie can be classified into one or more of the following classes: \"Mystery\", \"Drama\", \"Thriller\", \"Comedy\", \"Action\".",
|
||||
"language": "en"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"value": [
|
||||
{
|
||||
"result": {
|
||||
"modelLabel": "model1",
|
||||
"trainingConfigVersion": "2022-05-01",
|
||||
"trainingStatus": {
|
||||
"percentComplete": 100,
|
||||
"startDateTime": "2022-04-18T15:45:06.8190649Z",
|
||||
"endDateTime": "2022-04-18T15:47:19.2639682Z",
|
||||
"status": "succeeded"
|
||||
},
|
||||
"evaluationStatus": {
|
||||
"percentComplete": 100,
|
||||
"startDateTime": "2022-04-18T15:47:19.2734976Z",
|
||||
"endDateTime": "2022-04-18T15:47:23.8378892Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
},
|
||||
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T15:44:44Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T15:47:50Z",
|
||||
"expirationDateTime": "2022-04-25T15:44:44Z",
|
||||
"status": "succeeded"
|
||||
},
|
||||
{
|
||||
"result": {
|
||||
"modelLabel": "model2",
|
||||
"trainingConfigVersion": "2022-05-01",
|
||||
"trainingStatus": {
|
||||
"percentComplete": 100,
|
||||
"startDateTime": "2022-04-18T17:22:39.3663023Z",
|
||||
"endDateTime": "2022-04-18T17:24:51.9440947Z",
|
||||
"status": "succeeded"
|
||||
},
|
||||
"evaluationStatus": {
|
||||
"percentComplete": 100,
|
||||
"startDateTime": "2022-04-18T17:24:51.9571747Z",
|
||||
"endDateTime": "2022-04-18T17:24:58.1427823Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
},
|
||||
"jobId": "9145f93f-6f37-418c-8527-d2ded84cece0_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T17:22:11Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T17:25:23Z",
|
||||
"expirationDateTime": "2022-04-25T17:22:11Z",
|
||||
"status": "succeeded"
|
||||
},
|
||||
{
|
||||
"result": {
|
||||
"modelLabel": "model2",
|
||||
"trainingConfigVersion": "2022-05-01",
|
||||
"trainingStatus": {
|
||||
"percentComplete": 100,
|
||||
"startDateTime": "2022-04-18T17:44:41.388358Z",
|
||||
"endDateTime": "2022-04-18T17:50:29.5675101Z",
|
||||
"status": "succeeded"
|
||||
},
|
||||
"evaluationStatus": {
|
||||
"percentComplete": 100,
|
||||
"startDateTime": "2022-04-18T17:50:29.5808461Z",
|
||||
"endDateTime": "2022-04-18T17:50:35.3482185Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
},
|
||||
"jobId": "ee23c900-354d-4b6d-96e1-8197db2bd5f7_637858368000000000",
|
||||
"createdDateTime": "2022-04-18T17:44:04Z",
|
||||
"lastUpdatedDateTime": "2022-04-18T17:51:11Z",
|
||||
"expirationDateTime": "2022-04-25T17:44:04Z",
|
||||
"status": "succeeded"
|
||||
}
|
||||
],
|
||||
"nextLink": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"trainedModelLabel": "model1"
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/LoanAgreements/models/model1/load-snapshot/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"Content-Type": "application/json",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"body": {
|
||||
"firstDeploymentName": "production",
|
||||
"secondDeploymentName": "staging"
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/deployments/swap/jobs/c36a8775-35b9-4cb5-a8db-665e7d91aafe_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"body": {
|
||||
"modelLabel": "model1",
|
||||
"trainingConfigVersion": "latest",
|
||||
"evaluationOptions": {
|
||||
"kind": "percentage",
|
||||
"testingSplitPercentage": 20,
|
||||
"trainingSplitPercentage": 80
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/train/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"projectName": "LoanAgreements",
|
||||
"deploymentName": "production",
|
||||
"body": {
|
||||
"assignedResourceIds": [
|
||||
"/subscriptions/8ff19748-59ed-4e8a-af4b-7ce285849735/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/LangTestWeu"
|
||||
]
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/LoanAgreements/resources/unassign/jobs/66fa9a67-a561-42f1-8a13-f3a879b1a324_637858368000000000?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"Content-Type": "application/json",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"body": {
|
||||
"kind": "Conversation",
|
||||
"analysisInput": {
|
||||
"conversationItem": {
|
||||
"id": "1",
|
||||
"participantId": "1",
|
||||
"text": "play In the air tonight from Phil Collins"
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"projectName": "{project-name}",
|
||||
"deploymentName": "{deployment-name}",
|
||||
"stringIndexType": "TextElement_V8"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"kind": "ConversationResult",
|
||||
"result": {
|
||||
"query": "play In the air tonight from Phil Collins",
|
||||
"prediction": {
|
||||
"topIntent": "PlayMusic",
|
||||
"projectKind": "Conversation",
|
||||
"intents": [
|
||||
{
|
||||
"category": "PlayMusic",
|
||||
"confidenceScore": 1
|
||||
},
|
||||
{
|
||||
"category": "SearchCreativeWork",
|
||||
"confidenceScore": 0
|
||||
},
|
||||
{
|
||||
"category": "AddToPlaylist",
|
||||
"confidenceScore": 0
|
||||
}
|
||||
],
|
||||
"entities": [
|
||||
{
|
||||
"category": "Media.Artist",
|
||||
"text": "Phil Collins",
|
||||
"offset": 29,
|
||||
"length": 12,
|
||||
"confidenceScore": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"Content-Type": "application/json",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"body": {
|
||||
"kind": "Conversation",
|
||||
"analysisInput": {
|
||||
"conversationItem": {
|
||||
"participantId": "1",
|
||||
"id": "1",
|
||||
"modality": "text",
|
||||
"language": "en-GB",
|
||||
"text": "How do I integrate QnA Maker and LUIS?"
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"projectName": "{project-name}",
|
||||
"deploymentName": "{deployment-name}",
|
||||
"verbose": true,
|
||||
"isLoggingEnabled": false,
|
||||
"stringIndexType": "TextElement_V8"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"kind": "ConversationResult",
|
||||
"result": {
|
||||
"query": "trains from London",
|
||||
"prediction": {
|
||||
"topIntent": "Rail",
|
||||
"projectKind": "Orchestration",
|
||||
"intents": {
|
||||
"Rail": {
|
||||
"confidenceScore": 1,
|
||||
"targetProjectKind": "Conversation",
|
||||
"result": {
|
||||
"query": "trains from London",
|
||||
"prediction": {
|
||||
"topIntent": "Timetable",
|
||||
"projectKind": "Conversation",
|
||||
"intents": [
|
||||
{
|
||||
"category": "Timetable",
|
||||
"confidenceScore": 0.99968535
|
||||
},
|
||||
{
|
||||
"category": "Locomotive",
|
||||
"confidenceScore": 0.000314623
|
||||
}
|
||||
],
|
||||
"entities": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"Tree": {
|
||||
"confidenceScore": 0.2641529,
|
||||
"targetProjectKind": "QuestionAnswering"
|
||||
},
|
||||
"None": {
|
||||
"confidenceScore": 0,
|
||||
"targetProjectKind": "NonLinked"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Endpoint": "{Endpoint}",
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"Content-Type": "application/json",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"body": {
|
||||
"kind": "Conversation",
|
||||
"analysisInput": {
|
||||
"conversationItem": {
|
||||
"text": "Ports and connectors",
|
||||
"participantId": "1",
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"projectName": "prj1",
|
||||
"deploymentName": "dep1",
|
||||
"directTarget": "qnaProject",
|
||||
"targetProjectParameters": {
|
||||
"qnaProject": {
|
||||
"targetProjectKind": "QuestionAnswering",
|
||||
"callingOptions": {
|
||||
"context": {
|
||||
"previousUserQuery": "Meet Surface Pro 4",
|
||||
"previousQnaId": 4
|
||||
},
|
||||
"top": 1,
|
||||
"question": "App Service overview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"kind": "ConversationResult",
|
||||
"result": {
|
||||
"query": "Ports and connectors",
|
||||
"prediction": {
|
||||
"projectKind": "Orchestration",
|
||||
"topIntent": "qnaTargetApp",
|
||||
"intents": {
|
||||
"qnaTargetApp": {
|
||||
"targetProjectKind": "QuestionAnswering",
|
||||
"confidenceScore": 1,
|
||||
"result": {
|
||||
"answers": [
|
||||
{
|
||||
"questions": [
|
||||
"App Service overview"
|
||||
],
|
||||
"answer": "The compute resources you use are determined by the *App Service plan* that you run your apps on.",
|
||||
"confidenceScore": 0.7384000000000001,
|
||||
"id": 1,
|
||||
"source": "https://docs.microsoft.com/en-us/azure/app-service/overview",
|
||||
"metadata": {},
|
||||
"dialog": {
|
||||
"isContextOnly": false,
|
||||
"prompts": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"Endpoint": "{Endpoint}",
|
||||
"jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"Operation-Location": "{Endpoint}/language/analyze-conversations/jobs/{jobId}?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"Endpoint": "{Endpoint}",
|
||||
"jobId": "{Job ID}",
|
||||
"body": {
|
||||
"displayName": "Redacting PII data from transcribed audio",
|
||||
"analysisInput": {
|
||||
"conversations": [
|
||||
{
|
||||
"id": "1",
|
||||
"language": "en",
|
||||
"modality": "transcript",
|
||||
"domain": "generic",
|
||||
"conversationItems": [
|
||||
{
|
||||
"participantId": "1",
|
||||
"id": "1",
|
||||
"text": "Good morning John Doe.",
|
||||
"itn": "good morning john doe",
|
||||
"maskedItn": "good morning john doe",
|
||||
"lexical": "good morning john doe",
|
||||
"wordLevelTimings": [
|
||||
{
|
||||
"word": "good",
|
||||
"offset": 390000,
|
||||
"duration": 2700000
|
||||
},
|
||||
{
|
||||
"word": "morning",
|
||||
"offset": 4500000,
|
||||
"duration": 920000
|
||||
},
|
||||
{
|
||||
"word": "john",
|
||||
"offset": 590000,
|
||||
"duration": 2700000
|
||||
},
|
||||
{
|
||||
"word": "doe",
|
||||
"offset": 6300000,
|
||||
"duration": 920000
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "Conversation PII",
|
||||
"kind": "ConversationalPIITask",
|
||||
"parameters": {
|
||||
"modelVersion": "latest",
|
||||
"piiCategories": [
|
||||
"All"
|
||||
],
|
||||
"redactionSource": "lexical",
|
||||
"includeAudioRedaction": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"Endpoint": "{Endpoint}",
|
||||
"jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"createdDateTime": "2020-10-01T15:00:45Z",
|
||||
"displayName": "Redacting PII from transcribed audio",
|
||||
"expirationDateTime": "2020-10-03T15:01:03Z",
|
||||
"jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18",
|
||||
"lastUpdatedDateTime": "2022-01-25T15:01:03Z",
|
||||
"status": "succeeded",
|
||||
"tasks": {
|
||||
"completed": 1,
|
||||
"failed": 0,
|
||||
"inProgress": 0,
|
||||
"total": 1,
|
||||
"items": [
|
||||
{
|
||||
"kind": "ConversationalPIIResults",
|
||||
"taskName": "Conversation PII",
|
||||
"lastUpdateDateTime": "2022-01-25T15:01:03Z",
|
||||
"status": "succeeded",
|
||||
"results": {
|
||||
"conversations": [
|
||||
{
|
||||
"id": "1",
|
||||
"conversationItems": [
|
||||
{
|
||||
"id": "1",
|
||||
"redactedContent": {
|
||||
"text": "Good morning *************.",
|
||||
"itn": "good morning *************",
|
||||
"maskedItn": "good morning *************",
|
||||
"lexical": "good morning *************",
|
||||
"audioTimings": [
|
||||
{
|
||||
"offset": 590000,
|
||||
"duration": 920000
|
||||
}
|
||||
]
|
||||
},
|
||||
"entities": [
|
||||
{
|
||||
"category": "Name",
|
||||
"confidenceScore": 0.91,
|
||||
"length": 8,
|
||||
"offset": 13,
|
||||
"text": "john doe"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"warnings": [],
|
||||
"statistics": {
|
||||
"transactionsCount": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"errors": [],
|
||||
"modelVersion": "2022-05-15-preview"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"Endpoint": "{Endpoint}",
|
||||
"jobId": "{Job ID}",
|
||||
"body": {
|
||||
"displayName": "Sentiment Analysis from a call center conversation",
|
||||
"analysisInput": {
|
||||
"conversations": [
|
||||
{
|
||||
"id": "1",
|
||||
"language": "en",
|
||||
"modality": "transcript",
|
||||
"conversationItems": [
|
||||
{
|
||||
"participantId": "1",
|
||||
"id": "1",
|
||||
"text": "I like the service. I do not like the food",
|
||||
"lexical": "i like the service i do not like the food",
|
||||
"itn": "",
|
||||
"maskedItn": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "Conversation Sentiment Analysis",
|
||||
"kind": "ConversationalSentimentTask",
|
||||
"parameters": {
|
||||
"modelVersion": "latest",
|
||||
"predictionSource": "text"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"headers": {
|
||||
"Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"parameters": {
|
||||
"Ocp-Apim-Subscription-Key": "{API key}",
|
||||
"api-version": "2022-10-01-preview",
|
||||
"Endpoint": "{Endpoint}",
|
||||
"jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"headers": {},
|
||||
"body": {
|
||||
"createdDateTime": "2022-04-01T15:00:45Z",
|
||||
"displayName": "Sentiment Analysis from a call center conversation",
|
||||
"expirationDateTime": "2022-04-01T15:00:45Z",
|
||||
"jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18",
|
||||
"lastUpdatedDateTime": "2022-04-01T15:00:45Z",
|
||||
"status": "succeeded",
|
||||
"tasks": {
|
||||
"completed": 1,
|
||||
"failed": 0,
|
||||
"inProgress": 0,
|
||||
"total": 1,
|
||||
"items": [
|
||||
{
|
||||
"kind": "ConversationalSentimentResults",
|
||||
"taskName": "Conversation Sentiment",
|
||||
"lastUpdateDateTime": "2022-04-01T15:00:45Z",
|
||||
"status": "succeeded",
|
||||
"results": {
|
||||
"conversations": [
|
||||
{
|
||||
"id": "1",
|
||||
"conversationItems": [
|
||||
{
|
||||
"id": "1",
|
||||
"participantId": "agent_1",
|
||||
"sentiment": "mixed",
|
||||
"confidenceScores": {
|
||||
"positive": 0.5,
|
||||
"neutral": 0.01,
|
||||
"negative": 0.49
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": [],
|
||||
"statistics": {
|
||||
"transactionsCount": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"errors": [],
|
||||
"modelVersion": "2022-10-01-preview"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче