diff --git a/README.md b/README.md index 27585762d..8e7945f4a 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,13 @@ Welcome to the Semantic Kernel for Java. For detailed documentation, visit [Micr [Semantic Kernel](https://learn.microsoft.com/en-us/semantic-kernel/overview/) is an SDK that integrates Large Language Models (LLMs) like [OpenAI](https://platform.openai.com/docs/introduction), [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service), and [Hugging Face](https://huggingface.co/) with conventional programming languages like C#, Python, and Java. Semantic Kernel achieves this by allowing you to define [plugins](https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/plugins??tabs=Java&pivots=programming-language-java) that can be chained together in just a [few lines of code](https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/chaining-functions?tabs=Java&pivots=programming-language-java#using-the-runasync-method-to-simplify-your-code). -What makes Semantic Kernel _special_, however, is its ability to _automatically_ orchestrate plugins with AI. With Semantic Kernel [planners](https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/planner?tabs=Java&pivots=programming-language-java), you can ask an LLM to generate a plan that achieves a user's unique goal. Afterwards, Semantic Kernel will execute the plan for the user. +What makes Semantic Kernel _special_, however, is its ability to _automatically_ orchestrate plugins with AI. With Semantic Kernel, you can combine plugins and prompts to create intelligent workflows that achieve your goals. For C#, Python and other language support, see [microsoft/semantic-kernel](https://github.com/microsoft/semantic-kernel). #### Please star the repo to show your support for this project! -![Orchestrating plugins with planner](https://learn.microsoft.com/en-us/semantic-kernel/media/kernel-infographic.png) +![Orchestrating plugins](https://learn.microsoft.com/en-us/semantic-kernel/media/kernel-infographic.png) ## Getting started with Semantic Kernel for Java @@ -34,7 +34,6 @@ on our Learn site. 1. 👄 [Creating semantic functions](https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/semantic-functions?tabs=Java&pivots=programming-language-java) 1. 💽 [Creating native functions](https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/native-functions?tabs=Java&pivots=programming-language-java) 1. ⛓️ [Chaining functions together](https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/chaining-functions?tabs=Java&pivots=programming-language-java) -1. 🤖 [Auto create plans with planner](https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/planner?tabs=Java&pivots=programming-language-java) 1. 💡 [Create and run a ChatGPT plugin](https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/chatgpt-plugins?tabs=Java&pivots=programming-language-java) ## Join the community diff --git a/pom.xml b/pom.xml index 8f8ce2869..e2c017971 100644 --- a/pom.xml +++ b/pom.xml @@ -135,16 +135,7 @@ semantickernel-connectors-ai-openai ${project.version} - - com.microsoft.semantic-kernel.extensions - semantickernel-sequentialplanner-extension - ${project.version} - - - com.microsoft.semantic-kernel.extensions - semantickernel-actionplanner-extension - ${project.version} - + com.github.spotbugs diff --git a/samples/semantickernel-concepts/README.md b/samples/semantickernel-concepts/README.md index a44209028..acfb7c3f2 100644 --- a/samples/semantickernel-concepts/README.md +++ b/samples/semantickernel-concepts/README.md @@ -198,7 +198,6 @@ The `runPrompt` method is defined as follows: ``` For more information, please refer to the following resources: - [Microsoft Documentation on Prompt Template Syntax](https://learn.microsoft.com/en-us/semantic-kernel/prompts/prompt-template-syntax) -- [Microsoft Devblogs on Using Handlebars Planner in Semantic Kernel](https://devblogs.microsoft.com/semantic-kernel/using-handlebars-planner-in-semantic-kernel/) ### Configuration file diff --git a/samples/semantickernel-concepts/semantickernel-syntax-examples/src/main/resources/com/microsoft/semantickernel/samples/syntaxexamples/javaspecific/require_context_variable_planner_prompt.txt b/samples/semantickernel-concepts/semantickernel-syntax-examples/src/main/resources/com/microsoft/semantickernel/samples/syntaxexamples/javaspecific/require_context_variable_planner_prompt.txt deleted file mode 100644 index c949a424f..000000000 --- a/samples/semantickernel-concepts/semantickernel-syntax-examples/src/main/resources/com/microsoft/semantickernel/samples/syntaxexamples/javaspecific/require_context_variable_planner_prompt.txt +++ /dev/null @@ -1,118 +0,0 @@ -Create an XML plan step by step, to satisfy the goal given. -To create a plan, follow these steps: -0. The plan should be as short as possible. -1. From a create a as a series of . -2. Before using any function in a plan, check that it is present in the most recent [AVAILABLE FUNCTIONS] list. If it is not, do not use it. Do not assume that any function that was previously defined or used in another plan or in [EXAMPLES] is automatically available or compatible with the current plan. -3. Only use functions that are required for the given goal. -4. A function has a single 'input' and a single 'output' which are both strings and not objects. -5. The 'output' from each function is automatically passed as 'input' to the subsequent . -6. 'input' does not need to be specified if it consumes the 'output' of the previous function. -7. To save an 'output' from a , to pass into a future , use "/> -8. To save an 'output' from a , to return as part of a plan result, use "/> -9. Append an "END" XML comment at the end of the plan. - -[EXAMPLES] -[AVAILABLE FUNCTIONS] - - EmailConnector.LookupContactEmail: - description: looks up a contact and retrieves their email address - inputs: - - input: the name to look up - - EmailConnector.EmailTo: - description: email the input text to a recipient - inputs: - - input: the text to email - - recipient: the recipient's email address. Multiple addresses may be included if separated by ';'. - - LanguageHelpers.TranslateTo: - description: translate the input to another language - inputs: - - input: the text to translate - - translate_to_language: the language to translate to - - SummarizeSkill.Summarize: - description: summarize input text - inputs: - - input: the text to summarize - -[END AVAILABLE FUNCTIONS] - -Summarize the input, then translate to japanese and email it to Martin - - - - - - - -[AVAILABLE FUNCTIONS] - - _GLOBAL_FUNCTIONS_.GetEmailAddress: - description: Gets email address for given contact - inputs: - - input: the name to look up - - _GLOBAL_FUNCTIONS_.SendEmail: - description: email the input text to a recipient - inputs: - - input: the text to email - - recipient: the recipient's email address. Multiple addresses may be included if separated by ';'. - - AuthorAbility.Summarize: - description: summarizes the input text - inputs: - - input: the text to summarize - - Magician.TranslateTo: - description: translate the input to another language - inputs: - - input: the text to translate - - translate_to_language: the language to translate to - -[END AVAILABLE FUNCTIONS] - -Summarize an input, translate to french, and e-mail to John Doe - - - - - - - -[AVAILABLE FUNCTIONS] - - _GLOBAL_FUNCTIONS_.NovelOutline : - description: Outlines the input text as if it were a novel - inputs: - - input: the title of the novel to outline - - chapterCount: the number of chapters to outline - - Emailer.EmailTo: - description: email the input text to a recipient - inputs: - - input: the text to email - - recipient: the recipient's email address. Multiple addresses may be included if separated by ';'. - - Everything.Summarize: - description: summarize input text - inputs: - - input: the text to summarize - -[END AVAILABLE FUNCTIONS] - -Create an outline for a children's book with 3 chapters about a group of kids in a club and then summarize it. - - - - - -[END EXAMPLES] - -[AVAILABLE FUNCTIONS] - -{{$available_functions}} - -[END AVAILABLE FUNCTIONS] - -{{$input}} diff --git a/semantickernel-api/src/main/java/com/microsoft/semantickernel/semanticfunctions/InputParameter.java b/semantickernel-api/src/main/java/com/microsoft/semantickernel/semanticfunctions/InputParameter.java index 7dbb23694..0bf8901c9 100644 --- a/semantickernel-api/src/main/java/com/microsoft/semantickernel/semanticfunctions/InputParameter.java +++ b/semantickernel-api/src/main/java/com/microsoft/semantickernel/semanticfunctions/InputParameter.java @@ -41,7 +41,7 @@ public String getName() { } /** - * Parameter description for UI apps and planner. Localization is not supported here. + * Parameter description for UI apps. Localization is not supported here. * * @return description */ diff --git a/semantickernel-api/src/test/resources/com/microsoft/semantickernel/planner/stepwiseplanner/response1.txt b/semantickernel-api/src/test/resources/com/microsoft/semantickernel/planner/stepwiseplanner/response1.txt deleted file mode 100644 index 18b36dbe6..000000000 --- a/semantickernel-api/src/test/resources/com/microsoft/semantickernel/planner/stepwiseplanner/response1.txt +++ /dev/null @@ -1,4 +0,0 @@ -[THOUGHT PROCESS] - -[QUESTION] -What year did the first world cup take place? diff --git a/semantickernel-api/src/test/resources/com/microsoft/semantickernel/planner/stepwiseplanner/response2.txt b/semantickernel-api/src/test/resources/com/microsoft/semantickernel/planner/stepwiseplanner/response2.txt deleted file mode 100644 index 76c35d0b8..000000000 --- a/semantickernel-api/src/test/resources/com/microsoft/semantickernel/planner/stepwiseplanner/response2.txt +++ /dev/null @@ -1,2 +0,0 @@ -[THOUGHT] To answer this question, we need to find out the year of the first world cup and then divide it by 2. We can use a web search to find the year of the first world cup and then perform the necessary calculation. -[ACTION] {{"action": "WebSearch.search","action_variables": {"query":"first world cup year","count":"1"}}} \ No newline at end of file diff --git a/semantickernel-api/src/test/resources/com/microsoft/semantickernel/planner/stepwiseplanner/response3.txt b/semantickernel-api/src/test/resources/com/microsoft/semantickernel/planner/stepwiseplanner/response3.txt deleted file mode 100644 index 3eb1a7d24..000000000 --- a/semantickernel-api/src/test/resources/com/microsoft/semantickernel/planner/stepwiseplanner/response3.txt +++ /dev/null @@ -1,2 +0,0 @@ -[THOUGHT] Now that we know the year of the first world cup is 1930, we can divide it by 2 to get the answer to the original question. -[ACTION] {{"action": "AdvancedCalculator.Calculator","action_variables": {"input":"1930/2"}}} \ No newline at end of file diff --git a/semantickernel-api/src/test/resources/com/microsoft/semantickernel/planner/stepwiseplanner/response4.txt b/semantickernel-api/src/test/resources/com/microsoft/semantickernel/planner/stepwiseplanner/response4.txt deleted file mode 100644 index eb869bc5f..000000000 --- a/semantickernel-api/src/test/resources/com/microsoft/semantickernel/planner/stepwiseplanner/response4.txt +++ /dev/null @@ -1,2 +0,0 @@ -[FINAL ANSWER] -The year of the first world cup is 1930, and when divided by 2, the result is 965. \ No newline at end of file