-
Notifications
You must be signed in to change notification settings - Fork 38
Update Azure.AI.OpenAI to 2.1.0 and add tests #150
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
Conversation
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.
Copilot reviewed 135 out of 140 changed files in this pull request and generated no comments.
Files not reviewed (5)
- OpenAI-Extension.sln: Language not supported
- java-library/pom.xml: Language not supported
- samples/assistant/csharp-legacy/AssistantSample.csproj: Language not supported
- samples/assistant/csharp-ooproc/AssistantSample.csproj: Language not supported
- samples/assistant/java/extensions.csproj: Language not supported
Comments suppressed due to low confidence (3)
java-library/src/main/java/com/microsoft/azure/functions/openai/annotation/textcompletion/TextCompletion.java:56
- [nitpick] Consider updating the associated Javadoc to reference 'chatModel' instead of 'model' so that the documentation aligns with the new property name.
String chatModel() default "gpt-3.5-turbo";
java-library/src/main/java/com/microsoft/azure/functions/openai/annotation/embeddings/EmbeddingsContext.java:14
- Review the change from using EmbeddingsOptions to List for input to ensure that downstream processing is compatible with the new type; verify any related transformation logic has been updated accordingly.
private List<String> input;
java-library/src/main/java/com/microsoft/azure/functions/openai/annotation/assistant/AssistantMessage.java:28
- [nitpick] Update the Javadoc comment for the constructor to clearly describe the purpose of the 'toolCalls' parameter, ensuring consistency with previous documentation for the renamed property.
public AssistantMessage(String content, String role, String toolCalls) {
...rc/main/java/com/microsoft/azure/functions/openai/annotation/assistant/AssistantMessage.java
Outdated
Show resolved
Hide resolved
src/Functions.Worker.Extensions.OpenAI/Assistants/ChatCompletionJsonConverter.cs
Outdated
Show resolved
Hide resolved
src/WebJobs.Extensions.OpenAI/Embeddings/EmbeddingsConverter.cs
Outdated
Show resolved
Hide resolved
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.
Left a few nit comments but looks good overall!
Hi @manvkaur I'd like to understand the context why you changed the name as breaking change.
I've got the answer from the author.
|
I wanted to create a base class, AssistantBaseAttribute, to serve as the foundation for AssistantAttribute, SemanticSearchAttribute, and TextCompletionAttribute. One of the child classes uses two models - ChatModel and EmbeddingsModel, so I aimed to keep them distinct. Additionally, a new property, AIConnectionName, was introduced for Azure OpenAI connection settings. Therefore, I changed the connection name property for EmbeddingStoreAttribute to storeConnectionName to clearly indicate it is for the embedding store. Similarly, I renamed another connectionName to searchConnectionName to specify it is for the search resource connection. |
This pull request introduces several breaking changes, dependency updates, and enhancements to the Azure Functions OpenAI Extension and its Java library. Key updates include renaming properties and classes for better clarity, adding managed identity support, and updating dependencies. Additionally, a new unit test project has been added, and documentation has been updated to reflect these changes.
Breaking Changes and Enhancements:
model
tochatModel
andembeddingsModel
,connectionName
tosearchConnectionName
andstoreConnectionName
) and renamedChatMessage
toAssistantMessage
. [1] [2] [3] [4] [5] [6]temperature
,topP
,maxTokens
) and replacedEmbeddingsOptions
with aList<String>
for input inEmbeddingsContext
. [1] [2]New Features:
aiConnectionName
for managed identity support in bindings likeAssistantPost
,EmbeddingsStore
,SemanticSearch
andTextCompletion
. [1] [2]isReasoningModel
property to support reasoning models. [1] [2]Dependency Updates:
Azure.AI.OpenAI
to version2.1.0
andazure-ai-openai
to version1.0.0-beta.16
. [1] [2]Testing and CI Enhancements:
WebJobsOpenAIUnitTests
to the solution and included it in the CI pipeline for build and test coverage. [1] [2]Documentation Updates:
README.md
to reflect new requirements (e.g.,.NET 8 SDK
, Azurite) and detailed configuration options for AI service connections. Added examples for managed identity and configuration sections. [1] [2]File and Class Renaming:
ChatMessage
toAssistantMessage
in the Java library, Worker and WebJobs csproj, including corresponding updates to fields and methods. [1] [2] [3] [4]Issues Resolved:
Performance impact:
Will add more test coverage in upcoming PRs.
Next PR: