update modelid to the available davinci-002 on Azure Open AI

This commit is contained in:
SandraAhlgrimm
2023-12-22 11:38:59 +01:00
parent 783908e74f
commit a6930990be
9 changed files with 10 additions and 10 deletions
@@ -35,7 +35,7 @@ public class Example04_CombineLLMPromptsAndNativeCode {
OpenAIAsyncClient client = SamplesConfig.getClient();
TextCompletion textCompletion = SKBuilders.textCompletion()
.withModelId("text-davinci-003")
.withModelId("davinci-002")
.withOpenAIClient(client)
.build();
@@ -26,7 +26,7 @@ public class Example05_InlineFunctionDefinition {
OpenAIAsyncClient client = SamplesConfig.getClient();
TextCompletion textCompletion = SKBuilders.textCompletion()
.withModelId("text-davinci-003")
.withModelId("davinci-002")
.withOpenAIClient(client)
.build();
@@ -27,7 +27,7 @@ public class Example06_TemplateLanguage {
Kernel kernel = SKBuilders.kernel()
.withDefaultAIService(SKBuilders.textCompletion()
.withModelId("text-davinci-003")
.withModelId("davinci-002")
.withOpenAIClient(client)
.build())
.build();
@@ -77,7 +77,7 @@ public class Example08_RetryHandler {
String prompt = "{{$input}}\nSummarize the content above.";
TextCompletion textCompletion = SKBuilders.textCompletion()
.withModelId("text-davinci-003")
.withModelId("davinci-002")
.withOpenAIClient(client)
.build();
@@ -26,7 +26,7 @@ public class Example09_FunctionTypes {
OpenAIAsyncClient client = SamplesConfig.getClient();
TextCompletion textCompletion = SKBuilders.textCompletion()
.withModelId("text-davinci-003")
.withModelId("davinci-002")
.withOpenAIClient(client)
.build();
@@ -186,11 +186,11 @@ public class Example13_ConversationSummarySkill {
private static Kernel initializeKernel(OpenAIAsyncClient client) {
TextCompletion textCompletion = SKBuilders.textCompletion()
.withModelId("text-davinci-003")
.withModelId("davinci-002")
.withOpenAIClient(client)
.build();
return SKBuilders.kernel()
.withAIService("text-davinci-003", textCompletion, true, TextCompletion.class).build();
.withAIService("davinci-002", textCompletion, true, TextCompletion.class).build();
}
}
@@ -43,7 +43,7 @@ public class Example15_MemorySkill {
TextCompletion textCompletionService =
SKBuilders.textCompletion()
.withModelId("text-davinci-003")
.withModelId("davinci-002")
.withOpenAIClient(client)
.build();
@@ -121,7 +121,7 @@ public class Example51_StepwisePlanner {
} else {
textCompletion = SKBuilders.textCompletion()
.withOpenAIClient(client)
.withModelId("text-davinci-003")
.withModelId("davinci-002")
.build();
}
@@ -46,7 +46,7 @@ public class SequentialPlanner_AnswerQuestion {
OpenAIAsyncClient client = SamplesConfig.getClient();
var kernel = SKBuilders.kernel()
.withDefaultAIService(SKBuilders.textCompletion()
.withModelId("text-davinci-003")
.withModelId("davinci-002")
.withOpenAIClient(client)
.build())
.build();