-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Azure OpenAI Chat and Embedding Options #286
Add Azure OpenAI Chat and Embedding Options #286
Conversation
tzolov
commented
Jan 30, 2024
- Add AzureOpenAiChatOptions
- Add default options field to AzureOpenAiChatClient.
- Impl runtime (e.g. prompt) and default options on call.
- Add options field to the AzureOpenAiChatProperties.
- Add AzureOpenAiEmbeddingOptions
- Add default options field to AzureOpenAiEmbeddingClient.
- Implement runtime and default option merging on embedding request.
- Add options field to AzureOpenAiEmbeddingProperties.
- Add Unit and ITs.
- Split the azure-openai.adoc into ./clients/azure-openai-chat.adoc and ./embeddings/azure-openai-embeddings.adoc.
- Provide detailed explanation how to use the chat and embedding clients manually or via the auto-configuration.
4b88b5c
to
c2dbc31
Compare
fe7ebf8
to
8c99ea3
Compare
- Add AzureOpenAiChatOptions - Add default options field to AzureOpenAiChatClient. - Impl runtime (e.g. prompt) and default options on call. - Add options field to the AzureOpenAiChatProperties. - Add AzureOpenAiEmbeddingOptions - Add default options field to AzureOpenAiEmbeddingClient. - Impmlement runtime and default option merging on embedding request. - Add options field to AzureOpenAiEmbeddingProperties. - Add Unit and ITs. - Split the azure-openai.adoc into ./clients/azure-openai-chat.adoc and ./embeddings/azure-openai-embeddings.adoc. - Provide detailed explanation how to use the chat and embedding clients manually or via the auto-configuration.
8c99ea3
to
2470f54
Compare
review this in the context of #10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will merge, but let's circle back on the comments in another issue/iteration.
Tx!
@@ -1,78 +1,9 @@ | |||
# 1. Azure OpenAI | |||
# Azure OpenAI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not remove this readme... docs should be centralized.
mergedAzureOptions.setTemperature(azureOptions.getTemperature()); | ||
if (mergedAzureOptions.getTemperature() == null && springAiOptions.getTemperature() != null) { | ||
mergedAzureOptions.setTemperature(springAiOptions.getTemperature().doubleValue()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have if (mergedAzureOptions.getTemperature() == null && springAiOptions.getTemperature() != null) {
instead of if (mergedAzureOptions.getTemperature() == null
as in the other cases?
Also we don't need to call doubleValue()
in mergedAzureOptions.setTemperature(springAiOptions.getTemperature().doubleValue());
as it accepts the wrapper number type directly.
merged as dfbea8c |