commit538774d7c9Merge:1a5f7447cdcd7e1424Author: Sandra Ahlgrimm <[email protected]> Date: Thu Feb 8 08:50:21 2024 +0100 Merge branch 'main' into update-modelid commit1a5f7447caMerge:699eec8287e431953eAuthor: Sandra Ahlgrimm <[email protected]> Date: Wed Feb 7 17:35:02 2024 +0100 Merge branch 'main' into update-modelid commit699eec828dMerge:60cf261f87e431953eAuthor: Sandra Ahlgrimm <[email protected]> Date: Wed Feb 7 10:30:34 2024 +0100 Merge branch 'main' into update-modelid commit60cf261f8aMerge:2f726c2ab3a7d3bdc5Author: Sandra Ahlgrimm <[email protected]> Date: Wed Feb 7 10:22:51 2024 +0100 Merge branch 'main' into update-modelid commit2f726c2ab0Merge:5bdbbd6e459508cab6Author: John Oliver <[email protected]> Date: Tue Feb 6 13:02:30 2024 +0000 Merge branch 'main' into update-modelid commit5bdbbd6e49Merge:ffcf68cb6eed51932fAuthor: Sandra Ahlgrimm <[email protected]> Date: Fri Feb 2 22:44:25 2024 +0100 Merge branch 'main' into update-modelid commitffcf68cb6dMerge:3a34f5db152e317a79Author: Sandra Ahlgrimm <[email protected]> Date: Fri Feb 2 12:15:47 2024 +0100 Merge branch 'main' into update-modelid commit3a34f5db19Merge:7933961f6e58295123Author: SandraAhlgrimm <[email protected]> Date: Fri Feb 2 12:15:13 2024 +0100 Merge remote-tracking branch 'origin/update-modelid' into update-modelid commit7933961f6cAuthor: 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 commitb74843e02eAuthor: 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 commite582951234Merge:f7f1664b05953beb8bAuthor: Sandra Ahlgrimm <[email protected]> Date: Fri Jan 26 22:56:33 2024 +0100 Merge branch 'main' into update-modelid commitf7f1664b04Author: SandraAhlgrimm <[email protected]> Date: Fri Jan 26 22:51:38 2024 +0100 spring boot starter gets tested with samples commitbe6cf95226Author: SandraAhlgrimm <[email protected]> Date: Fri Jan 26 12:46:23 2024 +0100 Need to use JDK 11 to build for JDK 8 commit1af0f61dddAuthor: SandraAhlgrimm <[email protected]> Date: Fri Jan 26 12:43:16 2024 +0100 Need to use JDK 11 to build for JDK 8 commit5bebe6c43fAuthor: SandraAhlgrimm <[email protected]> Date: Fri Jan 26 12:24:46 2024 +0100 move starter to example package commit2f8a8398f4Author: SandraAhlgrimm <[email protected]> Date: Fri Jan 26 10:14:20 2024 +0100 switch back to jdk 8 and 17 as required by PM commit9fdf375fb3Merge:1e66ccb52038ca4554Author: 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 commit038ca4554aMerge:21d161af6e0ccee0e1Author: Sandra Ahlgrimm <[email protected]> Date: Fri Jan 26 10:03:52 2024 +0100 Merge branch 'microsoft:main' into main commit21d161af6cMerge:a4020260244453276aAuthor: 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 commita40202602dAuthor: Sandra Ahlgrimm <[email protected]> Date: Fri Jan 26 09:31:19 2024 +0100 Update java-build.yml commit44453276a9Author: Brian Benz <[email protected]> Date: Thu Jan 25 16:07:29 2024 -0800 bbenz Update java-build.yml Set JDK to 11 or 17 commit1e66ccb528Author: Sandra Ahlgrimm <[email protected]> Date: Thu Jan 25 21:32:07 2024 +0100 Update java-build.yml update workflow as @bbenz suggested commitb69342a813Merge:79627be66e0ccee0e1Author: Sandra Ahlgrimm <[email protected]> Date: Thu Jan 25 21:30:42 2024 +0100 Merge branch 'microsoft:main' into update-modelid commit79627be66aAuthor: SandraAhlgrimm <[email protected]> Date: Thu Jan 25 18:22:56 2024 +0100 jdk 17 for spring boot starter commit14e17ad953Merge:4570ad28800fbab2d3Author: SandraAhlgrimm <[email protected]> Date: Wed Jan 24 21:41:47 2024 +0100 Merge remote-tracking branch 'origin/update-modelid' into update-modelid commit4570ad2889Author: SandraAhlgrimm <[email protected]> Date: Wed Jan 24 21:41:14 2024 +0100 cleaned up and ready for PR commit00fbab2d3eAuthor: Sandra Ahlgrimm <[email protected]> Date: Wed Jan 24 21:39:57 2024 +0100 Update java-integration-tests.yml commitf5baf9ee28Merge:f76a4b014f95925622Author: Sandra Ahlgrimm <[email protected]> Date: Wed Jan 24 21:33:28 2024 +0100 Merge branch 'microsoft:main' into update-modelid commitf76a4b014dMerge:a8cf41e5ee4874bb79Author: Sandra Ahlgrimm <[email protected]> Date: Mon Jan 22 16:08:03 2024 +0100 Merge branch 'microsoft:main' into update-modelid commita8cf41e5efAuthor: SandraAhlgrimm <[email protected]> Date: Mon Jan 22 16:03:22 2024 +0100 cleaned up and ready for PR commit8d3d26afc8Author: SandraAhlgrimm <[email protected]> Date: Thu Jan 18 22:43:40 2024 +0100 maven still needs a cleanup commitf811bc3edfMerge:43b0a7f7cc87e45e52Author: SandraAhlgrimm <[email protected]> Date: Wed Jan 17 22:27:39 2024 +0100 Merge remote-tracking branch 'origin/update-modelid' into update-modelid commitc87e45e52fMerge:355eb6876fe23d4161Author: Sandra Ahlgrimm <[email protected]> Date: Wed Jan 17 22:20:29 2024 +0100 Merge branch 'microsoft:main' into update-modelid commit43b0a7f7cfAuthor: SandraAhlgrimm <[email protected]> Date: Wed Jan 17 22:19:31 2024 +0100 add tests, maven needs a cleanup commit355eb68765Merge:4277528eaf9bef6375Author: Sandra Ahlgrimm <[email protected]> Date: Tue Jan 16 15:40:51 2024 +0100 Merge branch 'microsoft:main' into update-modelid commit4277528ea0Merge:f2cab027e9db47e561Author: Sandra Ahlgrimm <[email protected]> Date: Mon Jan 8 14:22:56 2024 +0100 Merge branch 'microsoft:main' into update-modelid commitf2cab027ecAuthor: SandraAhlgrimm <[email protected]> Date: Fri Jan 5 16:58:21 2024 +0100 update maven dependencies, test needs to be finished commitec31872597Author: SandraAhlgrimm <[email protected]> Date: Fri Jan 5 15:52:49 2024 +0100 add spring boot starter commitff87caa4edMerge:c1ccfe08711369bf28Author: SandraAhlgrimm <[email protected]> Date: Fri Jan 5 13:16:21 2024 +0100 Merge remote-tracking branch 'origin/update-modelid' into update-modelid commitc1ccfe0874Author: SandraAhlgrimm <[email protected]> Date: Fri Jan 5 13:16:08 2024 +0100 add spring boot starter commit11369bf289Merge:ac73cb85e833a2d7b8Author: Sandra Ahlgrimm <[email protected]> Date: Fri Jan 5 13:13:37 2024 +0100 Merge branch 'microsoft:main' into update-modelid commitac73cb85eeMerge:c1f4ef8fb4b9dbed30Author: 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 commitc1f4ef8fb1Author: SandraAhlgrimm <[email protected]> Date: Fri Jan 5 13:06:20 2024 +0100 add spring boot starter commit4b9dbed305Merge:9da9b386aaa62b14d7Author: John Oliver <[email protected]> Date: Thu Jan 4 12:46:38 2024 +0000 Merge branch 'main' into update-modelid commit53d4bf7f50Author: SandraAhlgrimm <[email protected]> Date: Wed Jan 3 20:14:32 2024 +0100 add spring boot starter commit9da9b386adMerge:a3782cfc679908b0cfAuthor: Sandra Ahlgrimm <[email protected]> Date: Wed Jan 3 13:24:58 2024 +0100 Merge branch 'main' into update-modelid commita3782cfc6fMerge:a6930990b240a2cbeaAuthor: Sandra Ahlgrimm <[email protected]> Date: Fri Dec 22 11:40:14 2023 +0100 Merge branch 'microsoft:main' into update-modelid commita6930990beAuthor: SandraAhlgrimm <[email protected]> Date: Fri Dec 22 11:38:59 2023 +0100 update modelid to the available davinci-002 on Azure Open AI
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:
- Required:
- OpenJDK 17 or newer
Build the Semantic Kernel
-
Clone this repository
git clone -b java-development https://github.com/microsoft/semantic-kernel/ -
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.