Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public float[] embed(String text) {
return this.jdbcTemplate.queryForObject(
"SELECT pgml.embed(?, ?, ?::JSONB)" + this.defaultOptions.getVectorType().cast + " AS embedding",
this.defaultOptions.getVectorType().rowMapper, this.defaultOptions.getTransformer(), text,
this.defaultOptions.getKwargs());
ModelOptionsUtils.toJsonString(this.defaultOptions.getKwargs()));
}

@Override
Expand Down Expand Up @@ -203,7 +203,6 @@ PostgresMlEmbeddingOptions mergeOptions(EmbeddingOptions requestOptions) {
@Override
public void afterPropertiesSet() {
this.jdbcTemplate.execute("CREATE EXTENSION IF NOT EXISTS pgml");
this.jdbcTemplate.execute("CREATE EXTENSION IF NOT EXISTS hstore");
if (StringUtils.hasText(this.defaultOptions.getVectorType().extensionName)) {
this.jdbcTemplate
.execute("CREATE EXTENSION IF NOT EXISTS " + this.defaultOptions.getVectorType().extensionName);
Expand Down