Aggiungi supporto per il modello AzureOpenAI-Preview in ScenarioExecutionService
This commit is contained in:
@@ -322,6 +322,20 @@ public class ScenarioExecutionService {
|
||||
AzureOpenAiChatModel azureOpenaichatModel = new AzureOpenAiChatModel(openAIClient, openAIChatOptions);
|
||||
logger.info("AI model used: " + aiModel.getModel());
|
||||
return azureOpenaichatModel;
|
||||
|
||||
case "AzureOpenAI-Preview":
|
||||
OpenAIClient openAIClient = new OpenAIClientBuilder()
|
||||
.credential(new AzureKeyCredential(aiModel.getApiKey()))
|
||||
.endpoint(aiModel.getEndpoint())
|
||||
.buildClient();
|
||||
AzureOpenAiChatOptions openAIChatOptions = AzureOpenAiChatOptions.builder()
|
||||
.withDeploymentName(aiModel.getModel())
|
||||
.withTemperature(aiModel.getTemperature())
|
||||
.build();
|
||||
|
||||
AzureOpenAiChatModel azureOpenaichatModel = new AzureOpenAiChatModel(openAIClient, openAIChatOptions);
|
||||
logger.info("AI model used: " + aiModel.getModel());
|
||||
return azureOpenaichatModel;
|
||||
|
||||
case "OpenAI":
|
||||
OpenAiApi openAiApi = new OpenAiApi(aiModel.getApiKey());
|
||||
|
||||
Reference in New Issue
Block a user