Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gRPC skills functionality #814

Merged
merged 10 commits into from
May 8, 2023
Merged

gRPC skills functionality #814

merged 10 commits into from
May 8, 2023

Commits on Apr 26, 2023

  1. MVP components for gRPC skills (#639)

    ### Motivation and Context
    
    This PR adds a few building blocks for gRPC skills support. The rest of
    the functionality - gRPC skills import, support for complex data
    contract, retries, etc. will/might be added later.
    
    ### Description
    This PR add the following classes/components:
    - Skills.Grpc - project/package added to keep gRPC related
    functionality.
    - ProtoDocumentParser - class responsible for parsing .ptoto files and
    extract them into a list of operations represented by GrpcOperation
    class.
    - GrpcOperation - model class that describes a gRPC operation.
    - GrpcOperationRunner - class responsible for running a gRPC operation.
    
    ### Contribution Checklist
    <!-- Before submitting this PR, please make sure: -->
    - [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 😄
    
    ---------
    
    Co-authored-by: Shawn Callegari <36091529+shawncal@users.noreply.github.com>
    SergeyMenshykh and shawncal committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    06096e6 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2023

  1. Import gRPC skills (#730)

    ### Motivation and Context
    
    This change adds functionality required for gRPC skills import to Kernel
    allowing SK SDK client code to register and use gRPC skills in SK SDK.
    
    ### Description
    This change adds a few ImportGrpc* Kernel extension methods that can
    import gRPC skills from a folder or a file. Additionality,
    GrpcOperationRunner is changed to accept gRPC request message as JSON
    and return the gRPC method result as JSON as well.
    
    ### Contribution Checklist
    <!-- Before submitting this PR, please make sure: -->
    - [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 😄
    SergeyMenshykh committed May 1, 2023
    Configuration menu
    Copy the full SHA
    a02707a View commit details
    Browse the repository at this point in the history
  2. Merge from main

    name committed May 1, 2023
    Configuration menu
    Copy the full SHA
    fd1096a View commit details
    Browse the repository at this point in the history

Commits on May 3, 2023

  1. add Java sample skill (gRPC server) for gRPC operation runner (client…

    …) with a sample proto file (#768)
    
    ### Motivation and Context
    This is related to #451,
    craigomatic#13, and
    craigomatic#16, where we want to
    demonstrate how Native skills can be invoked via gRPC and implemented
    across various languages. In this case, we are specifically implementing
    this polyglot Native skill in Java due to customer inquiries.
    
    
    ### Description
    This change introduces a sample Java application that functions as a
    gRPC server. The `GrpcOperationRunner` can invoke Java code using the
    [activity.proto file in this
    PR](https://github.com/thegovind/semantic-kernel/blob/feature-grpc/samples/java/JavaReferenceSkill/src/main/proto/activity.proto)
    and its operation `GetRandomActivity`, as shown in
    [`Example27_GrpcSkills` in
    `kernel-syntax-examples`](https://github.com/microsoft/semantic-kernel/pull/730/files#diff-29f0ad84e48c3fe28f2ad26603940927306a57aaf76f6c01fc19e7ac82e33da0).
    thegovind committed May 3, 2023
    Configuration menu
    Copy the full SHA
    02edc15 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2023

  1. Merge from main

    name committed May 4, 2023
    Configuration menu
    Copy the full SHA
    e1df6c0 View commit details
    Browse the repository at this point in the history
  2. Fix for the latest, partially successful, merge of gRPC feature branc…

    …h with the main one. (#816)
    
    ### Motivation and Context
    
    Fix for the latest, partially successful, merge of gRPC feature branch
    with the main one.
    SergeyMenshykh committed May 4, 2023
    Configuration menu
    Copy the full SHA
    ef7d592 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2023

  1. Addressing merge PR comments (#824)

    ### Description
    
    This PR addresses comments made in another PR to merge feature-grpc
    branch to the main one. It also contains a small improvement that
    prevents creation of HttpClient per each gRPC operation run and use only
    one HttpClient instance per set of skills imported together. Later, in
    scope of a different task, another improvement will be done to allow
    hosting apps to provide their instances of HttpClient, if needed.
    SergeyMenshykh committed May 6, 2023
    Configuration menu
    Copy the full SHA
    3eda5eb View commit details
    Browse the repository at this point in the history

Commits on May 8, 2023

  1. Merge main

    name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    a962a67 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ab57792 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a86bb44 View commit details
    Browse the repository at this point in the history