semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

Sample: ChatGPT Plugins Server, powered by SK

Open shawncal opened this issue 2 years ago • 0 comments

Motivation and Context

Hosting SK Skills/Functions as Chat GPT Plugins.

Description

An Azure Functions REST server that hosts SK functions as HTTP Endpoints with annotations for ChatGPT Plugins.

Features:

  • Each Skill is implemented as a class with 1 or more functions, based on folder structure of the semantic functions.
  • For each skill, we publish an AI Plugin json file for use in ChatGPT,
  • and an OpenAI (swagger) json file
  • Uses source generators to convert skill details to OpenAPI attributes and build the calling code

Not yet implemented:

  • Support for code generation for Native Functions - mitigation: you can write your own Azure functions and host them in the same project, with the same effect.
  • Extracting all parameter names from the semantic function templates -- coming soon
  • Complex return types -- for now, all results are in the response body as plain/text.

Contribution Checklist

  • [x] The code builds clean without any errors or warnings
  • [x] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
  • [x] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with dotnet format
  • [x] All unit tests pass, and I have added new tests where possible
  • [x] I didn't break anyone :smile:

shawncal avatar Apr 06 '23 23:04 shawncal