Code examples of Semantic Kernel with Java SDK
Detailed Blog is in here
- Check out Semantic Kernel Java Branch and run
mvn install
. 2. The samples are based on the checkout from 8-Aug-2023 - Create Azure Open AI resource in Azure portal and deploy 'gpt-35-turbo' and 'text-embedding-ada-002' models there.
- Optionally, create Azure Congnitive Search resource, if you want to run the cognitive search sample (
Example06_SKwithCognitiveSearch.class
). - Rename
src/main/resources/conf.properties.example
tosrc/main/resources/conf.properties
and update it with the details from Step #2 and #3.
Example01_InlineFunction.class
> Demonstrates, how to initialize a Kernel and use an Inline function with Azure Open AI(AOAI).Example02_SummarizerAsPrompt.class
> Demonstrates, how to use a Skill and Function from skills directory with a skprompt.txt and config.json.Example03_SummarizerAsPlugin.class
> Demonstrates, how to use a Skill and Function defined as plugin.Example04_SkillsPipeline.class
> Demonstrates, how to use a Skill and Function in a pipeline or chain, passing output from one function to another as input.Example05_SKwithMemory.class
> Demonstrates, how to use a volatile memory (local simulation of a vector DB) with AOAI.Example06_SKwithCognitiveSearch.class
> Demonstrates, how to use a Azure Cognitive Search with AOAI.Example08_SequentialPlanner.class
> Demonstrates, how to use a bunch of Skills together and instruct the LLM to pick intelligently a or combination of Skills depending on the input provided.
Example07_DesignThinking.class
Sample of Stanford University's approach to "Design Thinking" with phases: Empathize, Define, Ideate, Prototype, Test.
Inspired from SKRecipes