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


The Ongoing State Of JavaScript
26/06/2024

The latest State of JavaScript Survey has just been published, bringing us a wealth of details about what parts of the JavaScript ecosystem and used, loved and wanted by developers.



Researchers Use AI To Decode Dog Language
21/06/2024

Scientists from the University of Michigan have used AI to decode what dogs mean by different types of bark. Wav2Vec2 succeeded at four classification tasks - dog recognition, breed identification, ge [ ... ]


More News

kotlin book

 

Comments




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

Last Updated ( Monday, 17 June 2024 )