-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
I am using PGVector to store my vector embeddings and this works fine when fetching. Our vectordb was populated through a non spring-ai script and we are not conforming to a UUID as the id of the record and are instead using our own internal key. When I try to add/update a document in our table, I am getting the following error:
java.lang.IllegalArgumentException: Invalid UUID string: A101750
at java.base/java.util.UUID.fromString1(UUID.java:282)
at java.base/java.util.UUID.fromString(UUID.java:260)
at org.springframework.ai.vectorstore.PgVectorStore$1.setValues(PgVectorStore.java:216)
at org.springframework.jdbc.core.JdbcTemplate.lambda$getPreparedStatementCallback$6(JdbcTemplate.java:1603)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:701)
at org.springframework.jdbc.core.JdbcTemplate.batchUpdate(JdbcTemplate.java:1047)
And it is due to the following code in PgVectorStore.java
:
Line 229 in f922195
StatementCreatorUtils.setParameterValue(ps, 1, SqlTypeValue.TYPE_UNKNOWN, |
Why is this enforced to be a UUID? Can this be changed to allow any type? I would like to use the convenience of the VectorStore abstraction to handle embedding and everything for me, but will have to use a workaround with it in the current state.