Semantic Kernel for Java Now GA
Written by Nikos Vaggalis   
Monday, 17 June 2024

The Microsoft Semantic Kernel (SK) is an open source lightweight framework that lets you easily mix conventional programming languages with AI "prompts". After a year of work since the initial release, version 1 of the SDK is now generally available. So what's new?

As reported about the initial version, the Microsoft Semantic Kernel is an SDK which integrates Large Language Models with conventional programming languages like C#, Python or Java. To make it's purpose more evident, it might be helpful to compare Semantic Kernel to Lang4Chain and its Java version to LangChain4j.

Each programming language's library implements the key concepts and foundations of Microsoft Semantic Kernel. As such, the Java version is designed to be used in Java applications in both client (desktop, mobile, CLIs) and server environments and be easily integrated with other Java libraries and frameworks.

Version 1's focus was to develop a common ground in terms of API design for all the underlying language SDKs, be it Java, C# or Python. That means that the SDK reflects the naming conventions of the .NET SDK more closely, helping cross-language developers maintain parity with their code, concepts, and explanations, as well as share knowledge with other teams.

This is pretty important, but other than that, what's new ?

  • Added invocation of native Java functions
  • The audio service now supports both text-to-audio and audio-to-text conversions
  • Monitor key points such as function calls, enabling users to log or intercept them for better tracking and debugging
  • Improved documentation
  • Availability on Maven Central under artifacts:
    Group ID: com. microsoft. semantic-kernel
    Artifact ID: semantickernel-api
    Version: 1.1.3 (latest)

There's plenty of sample code on the project's Github repo, but for demonstration purposes I relay the main part of the code that calls the OpenAI text to speech api:

Adding it as a dependency to your project and equipped with your OpenAI or Azure API key, you can now unleash the power of GenAI in your work.

 

More Information

Semantic Kernel Github Java Trunk

Semantic Kernel Github Java Code samples

Related Articles

Access LLMs From Java code With Semantic Kernel

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Watch The Oregon Programming Language Summer School Lectures
20/09/2024

Each year, the Oregon Programming Language Summer School covers topics in the foundations of programming languages. All the recordings of the lectures that took place during this year's event are now  [ ... ]



Java Version 23 Released
30/09/2024

It was in April 2024 that we had Java 22. Now after just 6 months there's version 23, which is a STS release with lots of features in preview status.


More News

kotlin book

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 17 June 2024 )