From 8a7ad8621eb03d5d8f802f250520bb04de96256d Mon Sep 17 00:00:00 2001 From: LangChain4j Date: Tue, 9 Jan 2024 19:49:09 +0100 Subject: [PATCH] Fix #444: Added missing GraalVM metadata for Gson and excluded commons-logging (#482) This PR is a fix for #444 - Missing metadata for Gson serialization was added for `langchain4j-vertex-ai` module - `commons-logging` was excluded from dependencies as it causes troubles during native build --- langchain4j-vertex-ai/pom.xml | 8 +++- .../langchain4j-vertex-ai/reflect-config.json | 47 +++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 langchain4j-vertex-ai/src/main/resources/META-INF/native-image/dev.langchain4j/langchain4j-vertex-ai/reflect-config.json diff --git a/langchain4j-vertex-ai/pom.xml b/langchain4j-vertex-ai/pom.xml index a9ead7617c9..f96b28aa07e 100644 --- a/langchain4j-vertex-ai/pom.xml +++ b/langchain4j-vertex-ai/pom.xml @@ -26,7 +26,13 @@ com.google.cloud google-cloud-aiplatform - 3.24.0 + 3.33.0 + + + commons-logging + commons-logging + + diff --git a/langchain4j-vertex-ai/src/main/resources/META-INF/native-image/dev.langchain4j/langchain4j-vertex-ai/reflect-config.json b/langchain4j-vertex-ai/src/main/resources/META-INF/native-image/dev.langchain4j/langchain4j-vertex-ai/reflect-config.json new file mode 100644 index 00000000000..50c83df12ec --- /dev/null +++ b/langchain4j-vertex-ai/src/main/resources/META-INF/native-image/dev.langchain4j/langchain4j-vertex-ai/reflect-config.json @@ -0,0 +1,47 @@ +[ + { + "name" : "dev.langchain4j.model.vertexai.VertexAiChatInstance", + "allDeclaredConstructors" : true, + "allPublicConstructors" : true, + "allDeclaredMethods" : true, + "allPublicMethods" : true, + "allDeclaredFields" : true, + "allPublicFields" : true + }, + { + "name" : "dev.langchain4j.model.vertexai.VertexAiChatInstance$Message", + "allDeclaredConstructors" : true, + "allPublicConstructors" : true, + "allDeclaredMethods" : true, + "allPublicMethods" : true, + "allDeclaredFields" : true, + "allPublicFields" : true + }, + { + "name" : "dev.langchain4j.model.vertexai.VertexAiEmbeddingInstance", + "allDeclaredConstructors" : true, + "allPublicConstructors" : true, + "allDeclaredMethods" : true, + "allPublicMethods" : true, + "allDeclaredFields" : true, + "allPublicFields" : true + }, + { + "name" : "dev.langchain4j.model.vertexai.VertexAiParameters", + "allDeclaredConstructors" : true, + "allPublicConstructors" : true, + "allDeclaredMethods" : true, + "allPublicMethods" : true, + "allDeclaredFields" : true, + "allPublicFields" : true + }, + { + "name" : "dev.langchain4j.model.vertexai.VertexAiTextInstance", + "allDeclaredConstructors" : true, + "allPublicConstructors" : true, + "allDeclaredMethods" : true, + "allPublicMethods" : true, + "allDeclaredFields" : true, + "allPublicFields" : true + } +] \ No newline at end of file