Skip to content

Commit

Permalink
Fix native hints
Browse files Browse the repository at this point in the history
  • Loading branch information
making committed Feb 3, 2025
1 parent 6eef196 commit 804bd19
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/am/ik/translation/config/NativeConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
import am.ik.translation.github.CreatePullRequest;
import am.ik.translation.github.CreatePullResponse;
import am.ik.translation.github.IssueEvent;
import am.ik.translation.openai.ChatCompletionRequest;
import am.ik.translation.openai.ChatCompletionResponse;
import am.ik.translation.openai.ChatMessage;
import am.ik.translation.openai.ChatResponseChoice;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
Expand Down Expand Up @@ -53,6 +57,18 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
.registerType(CreatePullResponse.class, MemberCategory.INVOKE_PUBLIC_METHODS,
MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)
.registerType(IssueEvent.class, MemberCategory.INVOKE_PUBLIC_METHODS,
MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)
.registerType(IssueEvent.Issue.class, MemberCategory.INVOKE_PUBLIC_METHODS,
MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)
.registerType(IssueEvent.Repository.class, MemberCategory.INVOKE_PUBLIC_METHODS,
MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)
.registerType(ChatCompletionRequest.class, MemberCategory.INVOKE_PUBLIC_METHODS,
MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)
.registerType(ChatCompletionResponse.class, MemberCategory.INVOKE_PUBLIC_METHODS,
MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)
.registerType(ChatMessage.class, MemberCategory.INVOKE_PUBLIC_METHODS,
MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)
.registerType(ChatResponseChoice.class, MemberCategory.INVOKE_PUBLIC_METHODS,
MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS);
}

Expand Down

0 comments on commit 804bd19

Please sign in to comment.