Simplified method (deleted unnecessary local variable)

This commit is contained in:
pavel
2025-01-12 21:52:15 -05:00
committed by Ilayaperumal Gopinathan
parent 329e6c0219
commit d66d85bb69

View File

@@ -207,14 +207,12 @@ public class SimpleVectorStore extends AbstractObservationVectorStore {
private String getVectorDbAsJson() {
ObjectWriter objectWriter = this.objectMapper.writerWithDefaultPrettyPrinter();
String json;
try {
json = objectWriter.writeValueAsString(this.store);
return objectWriter.writeValueAsString(this.store);
}
catch (JsonProcessingException e) {
throw new RuntimeException("Error serializing documentMap to JSON.", e);
}
return json;
}
private float[] getUserQueryEmbedding(String query) {