News

Semantic Kernel AI SDK Advances to GA in Java and Python

Microsoft yesterday announced the general availability of Semantic Kernel for Python and Java, advancing the open source AI integration SDK that is a key component of the company's Copilot stack of AI tools.

Specifically, during the Build 2024 developer conference, the company announced Semantic Kernel Python 1.0.0 and Semantic Kernel Java v1.

Semantic Kernel
[Click on image for larger view.] Semantic Kernel (source: Microsoft).

The C#/.NET SDK reached v1.0.1 in December 2023, and the company has been working on the Python and Java versions since then, (see "Microsoft's Semantic Kernel SDK Ships with AI Agents, Plugins, Planners and Personas").

The open source project helps developers integrate cutting-edge large language model (LLM) tech into their apps, acting like an AI orchestration layer for Microsoft's stack of AI models and Copilot AI assistants by providing interaction services to work with underlying foundation models and AI infrastructure.

The company explains more in its documentation: "Semantic Kernel is an open-source SDK that lets you easily combine AI services like OpenAI, Azure OpenAI, and Hugging Face with conventional programming languages like C# and Python. By doing so, you can create AI apps that combine the best of both worlds."

Semantic Kernel in the Copilot Stack
[Click on image for larger view.] Semantic Kernel in the Copilot Stack (source: Microsoft).

Java
New features for the Java SDK include:

  • Tool Calling, which enables the AI service to request the invocation of native Java functions, essentially functioning as a planning mechanism.
  • Text-to-audio and audio-to-text conversions in the audio service.
  • Enhanced type conversion, which allows users to register types and serialize/deserialize them to and from prompts.
  • Hooks that monitor key points such as function calls, enabling users to log or intercept them for better tracking and debugging.

Also, along with new documentation, Microsoft announced improved API consistency, saying "The new release improves the consistency of the API, making it more intuitive and easier to adopt for new users. While adhering to Java principles, and maintaining compatibility with Java 8 and later, 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 their cousin teams."

Developers can get started with the Java tool at its GitHub repo.

Python
Just as with the Java SDK, the Python team noted improved API consistency, along with new features including:

  • Shared Prompts Across Languages: Developers can easily share prompts across various programming languages, streamlining development and enhancing collaboration for AI-driven applications. Developers can now write a prompt in Python, whether it’s in a skprompt.txt/config.json, a YAML file, or a Handlebars format, and easily share it with developers using different languages, ensuring consistency and saving valuable development time.
  • Cross-Language Prompt Sharing: Developers can enhance efficiency and collaboration by using consistent prompts across different programming languages, especially in diverse team environments.

Also as with the Java tool, the Python team noted expanded documentation and restructured sample code to help developers get started quickly and leverage the full potential of the SDK, with more syntax examples coming soon.

Developers can get started at the main Semantic Kernel GitHub repo.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

Subscribe on YouTube