How to change Microsoft.Azure.CognitiveServices.FormRecognizer v0.8.0-preview API endpoint to v.2.0.0? - azure

I'm currently training a custom model (manual labeling) using the OCR labeling tool
I noticed the model was stored on the https:///formrecognizer/v2.0-preview/custom/models endpoint.
The Form Recognizer .NET SDK (Microsoft.Azure.CognitiveServices.FormRecognizer v0.8.0-preview) are currently directed to the v1.0.0-endpoint because the model id is not available when I executed a GET request to https:///formrecognizer/v2.0-preview/custom/models and It did exists on https:///formrecognizer/v1.0-preview/custom/models. Does anybody know how to fix this problem without having to implement the REST API manually all over again or waiting for the next version of nuget package to come out?
Any help would be appreciated!

You can check out this website for the code snippets of how to use the v2.0 REST API:
aka.ms/Form-aka.ms/Form-Recognizer/api
The current SDK only supports v1.0 release, but the SDK for v2.0 release is coming soon. Stay tuned.

The new Azure SDK Azure.AI.FormRecognizer preview library supporting Form Recognizer service version 2.0-preview is now available. Details on how to use it can be found in the package README.

Related

Form Recognizer labeling tool - what is the API version?

I have used the Form Recognizer labeling tool to create train and create models. At the time I started I had used the 2.1 preview and the API version was v2.1-preview.3
To use the models created with the labeling tool via the analyze REST api I used the url endpoint and API version as:
https://{endpoint}/formrecognizer/v2.1preview3/custom/models/...
Now the 2.1 GA version of the labeling tool is available.
Is the version of the API used by the from labeling tool fixed based on which version of the labeling tool docker image we run?
If I use the docker image {mcr.microsoft.com/azure-cognitive-services/custom-form/labeltool:latest-2.1}, the API endpoint will be
https://{endpoint}/formrecognizer/v2.1/custom/models/...
AND
If I use the docker image {mcr.microsoft.com/azure-cognitive-services/custom-form/labeltool:latest-preview} then it is the last preview and the API endpoint will be
https://{endpoint}/formrecognizer/v2.1-preview.3/custom/models/...
Or is there someway I can set explicitly set the API version so I can be sure which API version is being used by the labeling tool?
Is there any settings that I am missing where I can set or at least confirm which version is being used by the tool?
The .fott file has a version property which is set to "2.1.0" in the project created with the preview version and "2.1" with the GA version. Does this property indicate anything?
Thanks
The project (.fott) file has an optional property "apiVersion", you can set it to "v2.1" or "v2.1-preview.3" based on your needs :)
If this property is not set in the project file, label tool will use the default version which will be the same as tool version.
note: the "version" property in .fott doesn't represent the API version, instead it's just reflect the source control version.
Thanks!

Unable to set mandatory headers for ContactOriginData PATCH in batch mode

According to the integration guide for Contacts OData the Sap-Cuan-SequenceId header is mandatory when updating a ContactOriginData record. When updating in singleton mode I am able to set this header as follows and it works without issue:
service
.updateContactOriginData(contact)
.withHeader("Sap-Cuan-SequenceId", "PatchUpdate")
.executeRequest(destination);
However, there is no option to set this header when performing the same update in batch mode:
service
.batch()
.beginChangeSet()
.updateContactOriginData(contact)
.withHeader(...) // this option does not exist
.endChangeSet()
.executeRequest(destination);
When I run the batch one my SAP Import Monitor shows the error:
Invalid content in field Sap-Cuan-SequenceId
Is it possible to set this header in batch mode and I'm just not seeing how? I am using version 3.39.0 of the SDK. Any help would be greatly appreciated!
Thanks!
This clearly looks like an implementation shortcoming. The SDK has a new API for OData BATCH in the OData v4 client which shouldn't have this issue. Mentioned service exposes OData v2 only and the OData v2 BATCH implementation has been historically different. For compatibility reasons, it has to be kept like this. We plan to provide a parallel implementation to align it with OData v4 and fix many minor and major inconsistencies.
If this is super urgent we can try to provide a workaround using the SDK's generic OData client otherwise create an issue in this GitHub repository and the SDK team will update you when the fix for adding headers is going to be released.

SAP Cloud SDK CI/CD Pipeline: Usage with non S\4 Services

I am using SAP Cloud SDK (Java flavour) to create an extension application of SuccessFactors.
I sadly discovered that the Jenkins pipeline does not allow me to use any other service than the ones listed here: SCN Blog (scroll to the Appendix).
This does not make so much sense to me, as now the SDK can be used - and it is sponsored to be used by SAP - also with SaaS in its ecosystem, SuccessFactors being one of them.
Any hint? Can this check be somehow "bypassed"?
Thanks,
Roberto.
Please note that the blog post is quite old, have you verified your assumption that it does not work with SuccessFactors API?
Nonetheless, we recently introduced a configuration option which allows you to disable certain checks, cf https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/configuration.md#s4sdkqualitychecks
checkServices is what you would want to disable in your scenario.
As stated by Florian in the comment and following the Project Piper documentation, parameters "checkServices" and "customODataServices" can be used to customize the behavior of the pipeline when running upon a non-Business Hub API.
"checkServices: false" will completely deactivated the check, whereas "customODataServices: [ yourApiName ]" will skip the check just for the specified services.

Where is the Azure Storage library changelog?

I'm using the official nuget package of Windows Azure Storage Client Library to retrieve items of my Azure tables.
Recently I updated the package from version 2.0.2.0 to 2.0.5.0 and my app stopped working because the results returned by my storage query are different with the new version.
I'm looking for the library changelog in order to understand how to fix the issue.
Do you know where can I find it ?
The link provided on the nuget page seems to be outdated (it's a changelog between 1.x and 2.x, not between 2.0.2 and 2.0.5 !). Also, the Windows Azure Storage team's blog is not updated.
Please refer to the changelog.txt that is always updated with the respective source code changes.
The changelog is always up to date at https://github.com/Azure/azure-storage-net/blob/master/changelog.txt

Servicestack - run built-in clients on the .net client profile framework

Is it possible to run servicestack's built-in clients on the .net client profile framework?
When i change the target framework property in the project settings to ".Net Framework Client Profile" and try to compile i get the following message: the namespace ServiceClient does not exist in the namespace servicestack.
We use servicestack services to send exception reports. We use the JsonServiceClient and feel really comfortable with it. We could change the target framework - but then we have to check all installations for the availability of the full .net framework.
Any idea how to solve this?
Thanks.
From the package contents of the latest ServiceStack.Common package there seems to be no -client version included (See Common Framework and Profile Targeting Examples under NuGet - Creating and Publishing a Package).
You should either change the target framework the full profile or pull the code from ServiceStack's GitHub Repo and try to build it for client profile yourself. The downside of this is that you will loose Nuget's awesome update features...
You could off course file an issue at GitHub for the guys maintaining ServiceStack to add a client profile version of the framework, but I guess that there's a good reason for why it's not there already.

Resources