Files
semantic-kernel/java
SandraAhlgrimm 1b2e2fbd50 Squashed commit of the following:
commit 538774d7c9
Merge: 1a5f7447c dcd7e1424
Author: Sandra Ahlgrimm <[email protected]>
Date:   Thu Feb 8 08:50:21 2024 +0100

    Merge branch 'main' into update-modelid

commit 1a5f7447ca
Merge: 699eec828 7e431953e
Author: Sandra Ahlgrimm <[email protected]>
Date:   Wed Feb 7 17:35:02 2024 +0100

    Merge branch 'main' into update-modelid

commit 699eec828d
Merge: 60cf261f8 7e431953e
Author: Sandra Ahlgrimm <[email protected]>
Date:   Wed Feb 7 10:30:34 2024 +0100

    Merge branch 'main' into update-modelid

commit 60cf261f8a
Merge: 2f726c2ab 3a7d3bdc5
Author: Sandra Ahlgrimm <[email protected]>
Date:   Wed Feb 7 10:22:51 2024 +0100

    Merge branch 'main' into update-modelid

commit 2f726c2ab0
Merge: 5bdbbd6e4 59508cab6
Author: John Oliver <[email protected]>
Date:   Tue Feb 6 13:02:30 2024 +0000

    Merge branch 'main' into update-modelid

commit 5bdbbd6e49
Merge: ffcf68cb6 eed51932f
Author: Sandra Ahlgrimm <[email protected]>
Date:   Fri Feb 2 22:44:25 2024 +0100

    Merge branch 'main' into update-modelid

commit ffcf68cb6d
Merge: 3a34f5db1 52e317a79
Author: Sandra Ahlgrimm <[email protected]>
Date:   Fri Feb 2 12:15:47 2024 +0100

    Merge branch 'main' into update-modelid

commit 3a34f5db19
Merge: 7933961f6 e58295123
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Feb 2 12:15:13 2024 +0100

    Merge remote-tracking branch 'origin/update-modelid' into update-modelid

commit 7933961f6c
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Feb 2 12:14:50 2024 +0100

    make Deployment Name optional and set modelid with default as requested in review

commit b74843e02e
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Feb 2 12:13:39 2024 +0100

    make Deployment Name optional and set modelid with default as requested in review

commit e582951234
Merge: f7f1664b0 5953beb8b
Author: Sandra Ahlgrimm <[email protected]>
Date:   Fri Jan 26 22:56:33 2024 +0100

    Merge branch 'main' into update-modelid

commit f7f1664b04
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Jan 26 22:51:38 2024 +0100

    spring boot starter gets tested with samples

commit be6cf95226
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Jan 26 12:46:23 2024 +0100

    Need to use JDK 11 to build for JDK 8

commit 1af0f61ddd
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Jan 26 12:43:16 2024 +0100

    Need to use JDK 11 to build for JDK 8

commit 5bebe6c43f
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Jan 26 12:24:46 2024 +0100

    move starter to example package

commit 2f8a8398f4
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Jan 26 10:14:20 2024 +0100

    switch back to jdk 8 and 17 as required by PM

commit 9fdf375fb3
Merge: 1e66ccb52 038ca4554
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Jan 26 10:08:32 2024 +0100

    Merge branch 'main' of https://github.com/SandraAhlgrimm/semantic-kernel into update-modelid

    # Conflicts:
    #	.github/workflows/java-build.yml

commit 038ca4554a
Merge: 21d161af6 e0ccee0e1
Author: Sandra Ahlgrimm <[email protected]>
Date:   Fri Jan 26 10:03:52 2024 +0100

    Merge branch 'microsoft:main' into main

commit 21d161af6c
Merge: a40202602 44453276a
Author: Sandra Ahlgrimm <[email protected]>
Date:   Fri Jan 26 09:31:59 2024 +0100

    Merge pull request #1 from bbenz/main

    bbenz Update java-build.yml

commit a40202602d
Author: Sandra Ahlgrimm <[email protected]>
Date:   Fri Jan 26 09:31:19 2024 +0100

    Update java-build.yml

commit 44453276a9
Author: Brian Benz <[email protected]>
Date:   Thu Jan 25 16:07:29 2024 -0800

    bbenz Update java-build.yml

    Set JDK to 11 or 17

commit 1e66ccb528
Author: Sandra Ahlgrimm <[email protected]>
Date:   Thu Jan 25 21:32:07 2024 +0100

    Update java-build.yml

    update workflow as @bbenz suggested

commit b69342a813
Merge: 79627be66 e0ccee0e1
Author: Sandra Ahlgrimm <[email protected]>
Date:   Thu Jan 25 21:30:42 2024 +0100

    Merge branch 'microsoft:main' into update-modelid

commit 79627be66a
Author: SandraAhlgrimm <[email protected]>
Date:   Thu Jan 25 18:22:56 2024 +0100

    jdk 17 for spring boot starter

commit 14e17ad953
Merge: 4570ad288 00fbab2d3
Author: SandraAhlgrimm <[email protected]>
Date:   Wed Jan 24 21:41:47 2024 +0100

    Merge remote-tracking branch 'origin/update-modelid' into update-modelid

commit 4570ad2889
Author: SandraAhlgrimm <[email protected]>
Date:   Wed Jan 24 21:41:14 2024 +0100

    cleaned up and ready for PR

commit 00fbab2d3e
Author: Sandra Ahlgrimm <[email protected]>
Date:   Wed Jan 24 21:39:57 2024 +0100

    Update java-integration-tests.yml

commit f5baf9ee28
Merge: f76a4b014 f95925622
Author: Sandra Ahlgrimm <[email protected]>
Date:   Wed Jan 24 21:33:28 2024 +0100

    Merge branch 'microsoft:main' into update-modelid

commit f76a4b014d
Merge: a8cf41e5e e4874bb79
Author: Sandra Ahlgrimm <[email protected]>
Date:   Mon Jan 22 16:08:03 2024 +0100

    Merge branch 'microsoft:main' into update-modelid

commit a8cf41e5ef
Author: SandraAhlgrimm <[email protected]>
Date:   Mon Jan 22 16:03:22 2024 +0100

    cleaned up and ready for PR

commit 8d3d26afc8
Author: SandraAhlgrimm <[email protected]>
Date:   Thu Jan 18 22:43:40 2024 +0100

    maven still needs a cleanup

commit f811bc3edf
Merge: 43b0a7f7c c87e45e52
Author: SandraAhlgrimm <[email protected]>
Date:   Wed Jan 17 22:27:39 2024 +0100

    Merge remote-tracking branch 'origin/update-modelid' into update-modelid

commit c87e45e52f
Merge: 355eb6876 fe23d4161
Author: Sandra Ahlgrimm <[email protected]>
Date:   Wed Jan 17 22:20:29 2024 +0100

    Merge branch 'microsoft:main' into update-modelid

commit 43b0a7f7cf
Author: SandraAhlgrimm <[email protected]>
Date:   Wed Jan 17 22:19:31 2024 +0100

    add tests, maven needs a cleanup

commit 355eb68765
Merge: 4277528ea f9bef6375
Author: Sandra Ahlgrimm <[email protected]>
Date:   Tue Jan 16 15:40:51 2024 +0100

    Merge branch 'microsoft:main' into update-modelid

commit 4277528ea0
Merge: f2cab027e 9db47e561
Author: Sandra Ahlgrimm <[email protected]>
Date:   Mon Jan 8 14:22:56 2024 +0100

    Merge branch 'microsoft:main' into update-modelid

commit f2cab027ec
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Jan 5 16:58:21 2024 +0100

    update maven dependencies, test needs to be finished

commit ec31872597
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Jan 5 15:52:49 2024 +0100

    add spring boot starter

commit ff87caa4ed
Merge: c1ccfe087 11369bf28
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Jan 5 13:16:21 2024 +0100

    Merge remote-tracking branch 'origin/update-modelid' into update-modelid

commit c1ccfe0874
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Jan 5 13:16:08 2024 +0100

    add spring boot starter

commit 11369bf289
Merge: ac73cb85e 833a2d7b8
Author: Sandra Ahlgrimm <[email protected]>
Date:   Fri Jan 5 13:13:37 2024 +0100

    Merge branch 'microsoft:main' into update-modelid

commit ac73cb85ee
Merge: c1f4ef8fb 4b9dbed30
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Jan 5 13:11:50 2024 +0100

    Merge branch 'update-modelid' of https://github.com/SandraAhlgrimm/semantic-kernel into update-modelid

commit c1f4ef8fb1
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Jan 5 13:06:20 2024 +0100

    add spring boot starter

commit 4b9dbed305
Merge: 9da9b386a aa62b14d7
Author: John Oliver <[email protected]>
Date:   Thu Jan 4 12:46:38 2024 +0000

    Merge branch 'main' into update-modelid

commit 53d4bf7f50
Author: SandraAhlgrimm <[email protected]>
Date:   Wed Jan 3 20:14:32 2024 +0100

    add spring boot starter

commit 9da9b386ad
Merge: a3782cfc6 79908b0cf
Author: Sandra Ahlgrimm <[email protected]>
Date:   Wed Jan 3 13:24:58 2024 +0100

    Merge branch 'main' into update-modelid

commit a3782cfc6f
Merge: a6930990b 240a2cbea
Author: Sandra Ahlgrimm <[email protected]>
Date:   Fri Dec 22 11:40:14 2023 +0100

    Merge branch 'microsoft:main' into update-modelid

commit a6930990be
Author: SandraAhlgrimm <[email protected]>
Date:   Fri Dec 22 11:38:59 2023 +0100

    update modelid to the available davinci-002 on Azure Open AI
2024-02-13 14:21:28 +00:00
..
2023-08-01 14:19:37 +01:00
2023-12-06 17:45:43 +00:00
2023-12-06 17:45:43 +00:00
2023-12-06 17:45:43 +00:00
2024-02-13 14:21:28 +00:00
2023-12-06 17:45:43 +00:00
2023-12-06 17:45:43 +00:00
2023-12-06 17:45:43 +00:00
2023-05-22 14:24:56 -07:00
2023-11-02 14:57:55 +00:00
2023-12-06 17:45:43 +00:00

Semantic Kernel for Java

Semantic Kernel (SK) is a lightweight foundation that lets you easily mix conventional programming languages with the latest in Large Language Model (LLM) AI "prompts" with templating, chaining, and planning capabilities out-of-the-box.

To learn more about Microsoft Semantic Kernel, visit the Microsoft Semantic Kernel documentation.

The Microsoft Semantic Kernel for Java is a library that implements the key concepts and foundations of Microsoft Semantic Kernel. It is designed to be used in Java applications in both client (desktop, mobile, CLIs) and server environments in an idiomatic way, and to be easily integrated with other Java libraries and frameworks.

Get started

To run the LLM prompts and semantic functions in this kernel, make sure you have an Open AI API Key or Azure Open AI service key.

Requirements

To build the Semantic Kernel for Java, you will need:

Build the Semantic Kernel

  1. Clone this repository

     git clone -b java-development https://github.com/microsoft/semantic-kernel/
    
  2. Build the project with the Maven Wrapper

     cd semantic-kernel/java
     ./mvnw install
    

Using the Semantic Kernel for Java

The library is organized in a set of dependencies published to Maven Central. For a list of the Maven dependencies and how to use each of them, see PACKAGES.md.

Alternatively, check the samples folder for examples of common AI-enabled scenarios implemented with Semantic Kernel for Java.

Discord community

Join the Microsoft Semantic Kernel Discord community to discuss the Semantic Kernel and get help from the community. We have a #java channel for Java-specific questions.

Contributing

Testing locally

The project may contain end-to-end tests that require an OpenAI key to run. To run these tests locally, you will need to set the following environment variable:

  • OPENAI_API_KEY - the OpenAI API key.

If you are using Azure OpenAI, you will also need to set the following environment variables:

  • AZURE_OPENAI_ENDPOINT - the Azure OpenAI endpoint found in Keys * Endpoint section of the Azure OpenAI service.
  • AZURE_OPENAI_API_KEY - the Azure OpenAI API key found in Keys * Endpoint section of the Azure OpenAI service.
  • AZURE_OPENAI_DEPLOYMENT_NAME - the custom name you chose for your deployment when you deployed a model. It can be found under Resource Management > Deployments in the Azure Portal.

For more information, see the Azure OpenAI documentation on how to get your Azure OpenAI credentials.

To run the unit tests only, run the following command:

./mvnw package

To run all tests, including integration tests that require an OpenAI key, run the following command:

./mvnw verify

Submitting a pull request

Before submitting a pull request, please make sure that you have run the project with the command:

./mvnw clean package -Pbug-check

The bug-check profile will detect some static analysis issues that will prevent merging as well as apply formatting requirements to the code base.

Also ensure that:

  • All new code is covered by unit tests
  • All new code is covered by integration tests

Once your proposal is ready, submit a pull request to the java-development branch. The pull request will be reviewed by the project maintainers.

Make sure your pull request has an objective title and a clear description explaining the problem and solution.

License

This project is licensed under the MIT License.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct.