Skip to content

Commit

Permalink
Merge pull request #13 from svrc/origin-dev
Browse files Browse the repository at this point in the history
modifications for recent embeddings changes
  • Loading branch information
0pens0 authored Aug 6, 2024
2 parents 7d52f18 + 143feb9 commit be072be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions conf/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ applications:
routes:
- route: spring-metal-demo-gitops.vmtanzu.net
protocol: http2

env:
JBP_CONFIG_SPRING_AUTO_RECONFIGURATION: '{enabled: false}'
SPRING_PROFILES_ACTIVE: http2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public class PostgresAiConfiguration {
@Bean
public VectorStore vectorStore(JdbcTemplate jcbcTemplate, EmbeddingClient embeddingClient) {
return new PgVectorStore(jcbcTemplate, embeddingClient,
4096,
768,
PgVectorStore.PgDistanceType.CosineDistance,
false,
true,
PgVectorStore.PgIndexType.NONE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void onApplicationEvent(ApplicationReadyEvent event) {
List<Document> documents = new ArrayList<>();


List<Document> docs = this.vectorStore.similaritySearch("");
List<Document> docs = this.vectorStore.similaritySearch("album");
logger.info("Vector store contains " + docs.size() + " records");

if (docs.size() == 0) {
Expand Down

0 comments on commit be072be

Please sign in to comment.