Adding VoyageAI integration - #345
Conversation
|
fzowl - test / build failures if you can PTAL? |
|
fzowl - seeing errors such as: Error: Medium: Exception thrown in class com.microsoft.semantickernel.services.reranking.RerankResult at new com.microsoft.semantickernel.services.reranking.RerankResult(int, String, double) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. [com.microsoft.semantickernel.services.reranking.RerankResult, com.microsoft.semantickernel.services.reranking.RerankResult] At RerankResult.java:[line 21]At RerankResult.java:[line 21] CT_CONSTRUCTOR_THROW |
…CONSTRUCTOR_THROW SpotBugs (bug-check profile) flagged CT_CONSTRUCTOR_THROW on classes whose constructors throw validation exceptions while being non-final, which the Java CI build treats as an error and fails merge-gatekeeper. Marking these value/service classes final removes the finalizer-attack vector SpotBugs warns about while preserving the existing constructor validation.
After merging upstream/main, the repository version advanced to 1.5.1-SNAPSHOT while the VoyageAI module still pinned the old 1.4.4-RC3-SNAPSHOT parent, which made the semantickernel-bom import unresolvable and broke the reactor build.
The VoyageAIModels request/response DTOs expose their mutable list and array fields directly through getters, setters and one constructor, which SpotBugs (bug-check profile) flags as EI_EXPOSE_REP/EI_EXPOSE_REP2. These are plain Jackson-mapped data holders, so annotate the individual accessors with @SuppressFBWarnings, matching the pattern already used by the other aiservices DTOs (e.g. HuggingFace, OpenAI, Google).
|
Thanks Martijn Verburg (@karianna) — pushed a fix. The
I also merged current |
Motivation and Context
VoyageAI provides state-of-the-art embeddings models
Description
Adding VoyageAI integration
MicrosoftDocs/semantic-kernel-docs#327
Contribution Checklist