Java: Fix printing result in Example05 (#1982)

Remove stub example Example06_MemoryAndEmbeddings.java
This commit is contained in:
John Oliver
2023-07-13 11:32:15 +01:00
committed by GitHub
parent ee70bae2aa
commit 73840ec558
2 changed files with 1 additions and 34 deletions
@@ -20,7 +20,7 @@ public class Example05_UsingThePlanner {
SequentialPlanner planner = getPlanner(kernel);
System.out.println(planner.createPlanAsync(
"Write a poem about John Doe, then translate it into Italian.")
.block().invokeAsync().block());
.block().invokeAsync().block().getResult());
// TODO: execute the plan
}
@@ -1,33 +0,0 @@
package com.microsoft.semantickernel;
import com.azure.ai.openai.OpenAIAsyncClient;
import com.microsoft.semantickernel.builders.SKBuilders;
import java.io.IOException;
public class Example06_MemoryAndEmbeddings {
public static Kernel getKernel(OpenAIAsyncClient client) {
KernelConfig config = SKBuilders.kernelConfig()
.addTextCompletionService(
"davinci", kernel -> SKBuilders.textCompletionService().build(client, "text-davinci-003"))
.build();
// TODO: Add Volatile memory
Kernel kernel = SKBuilders.kernel()
.withKernelConfig(config)
.build();
return kernel;
}
public static void run(Config.ClientType clientType) throws IOException {
Kernel kernel = getKernel(clientType.getClient());
}
public static void main(String[] args) throws IOException {
// Send one of Config.ClientType.OPEN_AI or Config.ClientType.AZURE_OPEN_AI
run(Config.ClientType.OPEN_AI);
}
}