Files
semantic-kernel/dotnet/samples/CreateChatGptPlugin/MathPlugin/azure-function/Logo.cs
T
Gil LaHaye 22bfdf8001 .Net: Move documentation examples from documentation repo into SK repo (#4704)
### Motivation and Context
In order to keep documentation examples up to date, moving them to a
repo where they will actually be built and run.

### Description
Move documentation examples from doc repo to this one.

### Contribution Checklist
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-02-01 00:20:17 +00:00

22 lines
645 B
C#

// Copyright (c) Microsoft. All rights reserved.
using System.Net;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
public class Logo
{
[Function("GetLogo")]
public HttpResponseData Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "logo.png")] HttpRequestData req)
{
// Return logo.png that's in the root of the project
var response = req.CreateResponse(HttpStatusCode.OK);
response.Headers.Add("Content-Type", "image/png");
var logo = System.IO.File.ReadAllBytes("logo.png");
response.Body.Write(logo);
return response;
}
}