fix failing test due to property name change of model->deployment-name in azure

This commit is contained in:
Mark Pollack
2024-03-12 10:45:14 -04:00
parent 1e98f82e03
commit ed5eef4b0b
3 changed files with 5 additions and 5 deletions

View File

@@ -119,7 +119,7 @@ public class OpenAiImageClient implements ImageClient {
/**
* Convert the {@link ImageOptions} into {@link OpenAiImageOptions}.
* @param defaultOptions the image options to use.
* @param runtimeImageOptions the image options to use.
* @return the converted {@link OpenAiImageOptions}.
*/
private OpenAiImageOptions toOpenAiImageOptions(ImageOptions runtimeImageOptions) {

View File

@@ -56,11 +56,11 @@ public class AzureOpenAiAutoConfigurationIT {
"spring.ai.azure.openai.api-key=" + System.getenv("AZURE_OPENAI_API_KEY"),
"spring.ai.azure.openai.endpoint=" + System.getenv("AZURE_OPENAI_ENDPOINT"),
"spring.ai.azure.openai.chat.options.model=" + CHAT_MODEL_NAME,
"spring.ai.azure.openai.chat.options.deployment-name=" + CHAT_MODEL_NAME,
"spring.ai.azure.openai.chat.options.temperature=0.8",
"spring.ai.azure.openai.chat.options.maxTokens=123",
"spring.ai.azure.openai.embedding.options.model=" + EMBEDDING_MODEL_NAME
"spring.ai.azure.openai.embedding.options.deployment-name=" + EMBEDDING_MODEL_NAME
// @formatter:on
).withConfiguration(AutoConfigurations.of(AzureOpenAiAutoConfiguration.class));

View File

@@ -38,7 +38,7 @@ public class AzureOpenAiAutoConfigurationPropertyTests {
new ApplicationContextRunner()
.withPropertyValues("spring.ai.azure.openai.api-key=TEST_API_KEY",
"spring.ai.azure.openai.endpoint=TEST_ENDPOINT",
"spring.ai.azure.openai.embedding.options.model=MODEL_XYZ")
"spring.ai.azure.openai.embedding.options.deployment-name=MODEL_XYZ")
.withConfiguration(AutoConfigurations.of(AzureOpenAiAutoConfiguration.class))
.run(context -> {
var chatProperties = context.getBean(AzureOpenAiEmbeddingProperties.class);
@@ -59,7 +59,7 @@ public class AzureOpenAiAutoConfigurationPropertyTests {
"spring.ai.azure.openai.api-key=API_KEY",
"spring.ai.azure.openai.endpoint=ENDPOINT",
"spring.ai.azure.openai.chat.options.model=MODEL_XYZ",
"spring.ai.azure.openai.chat.options.deployment-name=MODEL_XYZ",
"spring.ai.azure.openai.chat.options.frequencyPenalty=-1.5",
"spring.ai.azure.openai.chat.options.logitBias.myTokenId=-5",
"spring.ai.azure.openai.chat.options.maxTokens=123",