-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds an embedding store for Azure Cosmos DB for NoSQL #1115
Adds an embedding store for Azure Cosmos DB for NoSQL #1115
Conversation
@langchain4j, can you please review this PR as a priority. We need the changes to go in by this Friday. The azure-cosmos dependency will be released tomorrow morning, and I'll update the pom accordingly. I am working adding the IT test. |
@langchain4j any update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi.
A few things:
- please fill out the PR template, it exists for a reason.
- please provide a reason why this PR should be prioritized over 70+ others?
...ain/java/dev/langchain4j/store/embedding/azure/cosmos/no/sql/AzureCosmosDBNoSqlDocument.java
Outdated
Show resolved
Hide resolved
...va/dev/langchain4j/store/embedding/azure/cosmos/no/sql/AzureCosmosDBNoSqlEmbeddingStore.java
Outdated
Show resolved
Hide resolved
...va/dev/langchain4j/store/embedding/azure/cosmos/no/sql/AzureCosmosDBNoSqlEmbeddingStore.java
Outdated
Show resolved
Hide resolved
...va/dev/langchain4j/store/embedding/azure/cosmos/no/sql/AzureCosmosDBNoSqlEmbeddingStore.java
Outdated
Show resolved
Hide resolved
...va/dev/langchain4j/store/embedding/azure/cosmos/no/sql/AzureCosmosDBNoSqlEmbeddingStore.java
Outdated
Show resolved
Hide resolved
...va/dev/langchain4j/store/embedding/azure/cosmos/no/sql/AzureCosmosDBNoSqlEmbeddingStore.java
Outdated
Show resolved
Hide resolved
...a/dev/langchain4j/store/embedding/azure/cosmos/no/sql/AzureCosmosDBNoSqlMatchedDocument.java
Outdated
Show resolved
Hide resolved
...va/dev/langchain4j/store/embedding/azure/cosmos/no/sql/AzureCosmosDBNoSqlEmbeddingStore.java
Outdated
Show resolved
Hide resolved
…11/langchain4j into users/akataria/azurecosmosnosql
@langchain4j I have updated the PR template. This PR is required for a demo and lab at Microsoft Build Conference happening next week. The Azure CosmosDB Java SDK will be released this afternoon. I just wanted to get eyes on the PR, and make it ready so that as soon as the Java SDK is released publicly, we can get the PR in. For now, I have tested this PR in local. |
@langchain4j any update on this. |
...va/dev/langchain4j/store/embedding/azure/cosmos/no/sql/AzureCosmosDbNoSqlEmbeddingStore.java
Outdated
Show resolved
Hide resolved
.cosmosClient(client) | ||
.databaseName(DATABASE_NAME) | ||
.containerName(CONTAINER_NAME) | ||
.cosmosVectorEmbeddingPolicy(populateVectorEmbeddingPolicy(dimensions)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please double check which properties are needed only for creating database/container if it does not exists and which are needed for querying. I suspect some of these properties are not required once db/container are created
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@langchain4j All these properties are required to create a container/database which can perform vector search. Only the path of the embedding path is required for querying.
I'm not sure what else do you want to me check here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you implement it so that user does not have to provide all properties (see all the assertions for null/empty in the constructor) if the database/container are already in place?
…11/langchain4j into users/akataria/azurecosmosnosql
@aayush3011 should I merge and release it as-is now or do you plan to address the comments? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aayush3011 I will merge it now to not block the release, feel free to address comments in the separate PR. Thank you!
Issue
This PR add supports for Azure Cosmos DB for NoSQL embedding store.
Change
General checklist
Checklist for adding new model integration
Checklist for adding new embedding store integration
{NameOfIntegration}EmbeddingStoreIT
that extends from eitherEmbeddingStoreIT
orEmbeddingStoreWithFilteringIT
Checklist for changing existing embedding store integration
{NameOfIntegration}EmbeddingStore
works correctly with the data persisted using the latest released version of LangChain4j