diff --git a/CSharp/intelligence-ImageCaption/Controllers/MessagesController.cs b/CSharp/intelligence-ImageCaption/Controllers/MessagesController.cs index c49f934018..46d52c7036 100644 --- a/CSharp/intelligence-ImageCaption/Controllers/MessagesController.cs +++ b/CSharp/intelligence-ImageCaption/Controllers/MessagesController.cs @@ -42,7 +42,7 @@ public async Task Post([FromBody]Activity activity) } catch (Exception e) { - message = "Oops! Something went wrong. Try again later."; + message = "Oops! Something went wrong. Try again later (hint: also check your APIKEY at web.config)."; Trace.TraceError(e.ToString()); } diff --git a/CSharp/intelligence-ImageCaption/ImageCaption.csproj b/CSharp/intelligence-ImageCaption/ImageCaption.csproj index be82c39166..70f29b350f 100644 --- a/CSharp/intelligence-ImageCaption/ImageCaption.csproj +++ b/CSharp/intelligence-ImageCaption/ImageCaption.csproj @@ -50,21 +50,21 @@ packages\Chronic.Signed.0.3.2\lib\net40\Chronic.dll True - - packages\Microsoft.Bot.Builder.3.5.3\lib\net46\Microsoft.Bot.Builder.dll + + packages\Microsoft.Bot.Builder.3.8.0\lib\net46\Microsoft.Bot.Builder.dll True - - packages\Microsoft.Bot.Builder.3.5.3\lib\net46\Microsoft.Bot.Builder.Autofac.dll + + packages\Microsoft.Bot.Builder.3.8.0\lib\net46\Microsoft.Bot.Builder.Autofac.dll True - - packages\Microsoft.Bot.Builder.3.5.3\lib\net46\Microsoft.Bot.Connector.dll + + packages\Microsoft.Bot.Builder.3.8.0\lib\net46\Microsoft.Bot.Connector.dll True - - packages\Microsoft.IdentityModel.Protocol.Extensions.1.0.3.308261200\lib\net45\Microsoft.IdentityModel.Protocol.Extensions.dll + + packages\Microsoft.IdentityModel.Protocol.Extensions.1.0.4.403061554\lib\net45\Microsoft.IdentityModel.Protocol.Extensions.dll True @@ -84,8 +84,8 @@ True - - packages\System.IdentityModel.Tokens.Jwt.4.0.3.308261200\lib\net45\System.IdentityModel.Tokens.Jwt.dll + + packages\System.IdentityModel.Tokens.Jwt.4.0.4.403061554\lib\net45\System.IdentityModel.Tokens.Jwt.dll True diff --git a/CSharp/intelligence-ImageCaption/README.md b/CSharp/intelligence-ImageCaption/README.md index d47aad8bd6..c2145f4dc8 100644 --- a/CSharp/intelligence-ImageCaption/README.md +++ b/CSharp/intelligence-ImageCaption/README.md @@ -14,10 +14,16 @@ The minimum prerequisites to run this sample are: * The Bot Framework Emulator. To install the Bot Framework Emulator, download it from [here](https://emulator.botframework.com/). Please refer to [this documentation article](https://github.com/microsoft/botframework-emulator/wiki/Getting-Started) to know more about the Bot Framework Emulator. * This sample currently uses a free trial Microsoft Cognitive service key with limited QPS. Please subscribe to Vision API services [here](https://www.microsoft.com/cognitive-services/en-us/subscriptions) and update the `MicrosoftVisionApiKey` key in [Web.config](Web.config) file to try it out further. +````XML + + + +```` + ### Code Highlights Microsoft Computer Vision API provides a number of methods that allows you to analyze an image. Check out [IVisionServiceClient.cs](https://github.com/Microsoft/Cognitive-Vision-Windows/blob/master/ClientLibrary/IVisionServiceClient.cs) for a complete reference of the methods available. In this sample we are using `AnalyzeImageAsync(string url, ...)` and `AnalyzeImageAsync(Stream imageStream, ...)` to analyze an image from a URL and stream respectively. The `AnalyzeImageAsync` method returns [AnalysisResult.cs](https://github.com/Microsoft/Cognitive-Vision-Windows/blob/master/ClientLibrary/Contract/AnalysisResult.cs) class which contains rich information about the image: -```C# +````C# namespace Microsoft.ProjectOxford.Vision.Contract { public class AnalysisResult @@ -35,7 +41,7 @@ namespace Microsoft.ProjectOxford.Vision.Contract public Tag[] Tags { get; set; } } } -``` +```` In this sample we are using the API to get the image description and send it back to the user. Check out the use of the `MicrosoftCognitiveCaptionService.GetCaptionAsync()` method in the [MicrosoftCognitiveCaptionService.cs](Services/MicrosoftCognitiveCaptionService.cs) class. diff --git a/CSharp/intelligence-ImageCaption/packages.config b/CSharp/intelligence-ImageCaption/packages.config index 874bce462f..07fa5b06a7 100644 --- a/CSharp/intelligence-ImageCaption/packages.config +++ b/CSharp/intelligence-ImageCaption/packages.config @@ -6,11 +6,11 @@ - - + + - + \ No newline at end of file