Skip to content

Commit cb11219

Browse files
author
Milder Hernandez Cagua
committed
Comment Planner examples as it comes from core
1 parent 7edccc5 commit cb11219

2 files changed

Lines changed: 27 additions & 27 deletions

File tree

‎samples/java/semantickernel-samples/src/main/java/com/microsoft/semantickernel/Example03SemanticFunctionInline.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import com.microsoft.openai.OpenAIAsyncClient;
44
import com.microsoft.semantickernel.builders.SKBuilders;
55
import com.microsoft.semantickernel.orchestration.ReadOnlySKContext;
6-
import com.microsoft.semantickernel.orchestration.SemanticSKFunction;
6+
import com.microsoft.semantickernel.orchestration.SKFunction;
77
import com.microsoft.semantickernel.textcompletion.CompletionSKContext;
88
import reactor.core.publisher.Mono;
99
import java.io.IOException;
@@ -23,7 +23,7 @@ public class Example03SemanticFunctionInline {
2323
* @param text Input to the function
2424
*/
2525
public static void inlineFunction (Kernel kernel, String prompt, String functionName, String text) {
26-
SemanticSKFunction summarize =
26+
SKFunction summarize =
2727
SKBuilders.completionFunctions()
2828
.createFunction(
2929
prompt,

‎samples/java/semantickernel-samples/src/main/java/com/microsoft/semantickernel/Example05UsingThePlanner.java‎

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@
22

33
import com.microsoft.openai.OpenAIAsyncClient;
44
import com.microsoft.semantickernel.extensions.KernelExtensions;
5-
import com.microsoft.semantickernel.planner.sequentialplanner.SequentialPlanner;
6-
import java.io.IOException;
5+
// import com.microsoft.semantickernel.planner.sequentialplanner.SequentialPlanner;
76

87
public class Example05UsingThePlanner {
98

10-
public static SequentialPlanner getPlanner(Kernel kernel) {
11-
kernel.importSkills("SummarizeSkill", KernelExtensions.importSemanticSkillFromDirectory(
12-
"samples/skills", "SummarizeSkill"));
13-
kernel.importSkills("WriterSkill", KernelExtensions.importSemanticSkillFromDirectory(
14-
"samples/skills", "WriterSkill"));
9+
// public static SequentialPlanner getPlanner(Kernel kernel) {
10+
// kernel.importSkills("SummarizeSkill", KernelExtensions.importSemanticSkillFromDirectory(
11+
// "samples/skills", "SummarizeSkill"));
12+
// kernel.importSkills("WriterSkill", KernelExtensions.importSemanticSkillFromDirectory(
13+
// "samples/skills", "WriterSkill"));
14+
//
15+
// return new SequentialPlanner(kernel, null, null);
16+
// }
17+
//
18+
// public static void run (boolean useAzureOpenAI) {
19+
// OpenAIAsyncClient client = Example00GettingStarted.getClient(useAzureOpenAI);
20+
// Kernel kernel = Example00GettingStarted.getKernel(client);
21+
//
22+
// SequentialPlanner planner = getPlanner(kernel);
23+
// System.out.println(planner.createPlanAsync(
24+
// "Write a poem about John Doe, then translate it into Italian.")
25+
// .block().getResult());
26+
//
27+
// // TODO: execute the plan
28+
// }
29+
//
30+
// public static void main (String[] args) {
31+
// run(false);
32+
// }
1533

16-
return new SequentialPlanner(kernel, null, null);
17-
}
18-
19-
public static void run (boolean useAzureOpenAI) {
20-
OpenAIAsyncClient client = Example00GettingStarted.getClient(useAzureOpenAI);
21-
Kernel kernel = Example00GettingStarted.getKernel(client);
22-
23-
SequentialPlanner planner = getPlanner(kernel);
24-
System.out.println(planner.createPlanAsync(
25-
"Write a poem about John Doe, then translate it into Italian.")
26-
.block().getResult());
27-
28-
// TODO: execute the plan
29-
}
30-
31-
public static void main (String[] args) {
32-
run(false);
33-
}
3434
}

0 commit comments

Comments
 (0)