Skip to content

Commit 9dbb39a

Browse files
committed
pincecone vector aot hints
1 parent 793052c commit 9dbb39a

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package org.springframework.ai.vectorstore;
2+
3+
import org.springframework.aot.hint.MemberCategory;
4+
import org.springframework.aot.hint.RuntimeHints;
5+
import org.springframework.aot.hint.RuntimeHintsRegistrar;
6+
7+
import java.util.Set;
8+
9+
/**
10+
* Registration of AOT hints for Pinecone's vector store.
11+
*
12+
* @author Josh Long
13+
*
14+
*/
15+
class PineconeVectorStoreHints implements RuntimeHintsRegistrar {
16+
17+
@Override
18+
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
19+
for (var t : Set.of(com.google.protobuf.Value.class, com.google.protobuf.Value.Builder.class,
20+
com.google.protobuf.Struct.class)) {
21+
hints.reflection().registerType(t, MemberCategory.values());
22+
}
23+
24+
}
25+
26+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.springframework.aot.hint.RuntimeHintsRegistrar=org.springframework.ai.vectorstore.PineconeVectorStoreHints

0 commit comments

Comments
 (0)