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


Sequin - Open Source Message Stream Built On Postgres
31/10/2024

Sequin is a tool for capturing changes and streaming data out of your Postgres database, guaranteeing exactly once processing. What does that mean?



JavaZone - The Conference We Missed
25/10/2024

Amongst the many Java related conferences, this one flew under the radar. A real shame because it had many great sessions.
JavaZone might not be that famous internationally, but it still is the bi [ ... ]


More News

espbook

 

Comments




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

Last Updated ( Monday, 17 June 2024 )