Rinomina variabili per il supporto del modello AzureOpenAI-Preview in ScenarioExecutionService
This commit is contained in:
@@ -323,19 +323,7 @@ public class ScenarioExecutionService {
|
||||
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());
|
||||
|
||||
@@ -71,6 +71,7 @@ public class AdvancedAIPromptSolver extends StepSolver {
|
||||
|
||||
|
||||
if( chatModel.getDefaultOptions().getModel().contains("o1-") ){
|
||||
//Non funziona
|
||||
logger.info("Using o1- model => " + chatModel.getDefaultOptions().getModel());
|
||||
|
||||
String completePrompt = this.qai_system_prompt_template + userText;
|
||||
|
||||
Reference in New Issue
Block a user