pincecone vector aot hints

This commit is contained in:
Josh Long
2024-08-23 00:26:50 -07:00
parent 793052c2e9
commit 9dbb39ac4a
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package org.springframework.ai.vectorstore;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
import java.util.Set;
/**
* Registration of AOT hints for Pinecone's vector store.
*
* @author Josh Long
*
*/
class PineconeVectorStoreHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
for (var t : Set.of(com.google.protobuf.Value.class, com.google.protobuf.Value.Builder.class,
com.google.protobuf.Struct.class)) {
hints.reflection().registerType(t, MemberCategory.values());
}
}
}

View File

@@ -0,0 +1 @@
org.springframework.aot.hint.RuntimeHintsRegistrar=org.springframework.ai.vectorstore.PineconeVectorStoreHints