Skip to content
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

Bugfix/list sources #28

Merged
merged 6 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.mule.mulechain</groupId>
<artifactId>mulechain-vectors</artifactId>
<version>0.1.87-SNAPSHOT</version>
<version>0.1.88-SNAPSHOT</version>
<packaging>mule-extension</packaging>
<name>MAC Vectors</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ private Constants() {}
public static final String VECTOR_STORE_AI_SEARCH = "AI_SEARCH";
public static final String VECTOR_STORE_NEO4J = "NEO4J";

public static final String STORE_SCHEMA_METADATA_FIELD_NAME = "metadata";
public static final String STORE_SCHEMA_VECTOR_FIELD_NAME = "vector";

public static final String METADATA_KEY_SOURCE_ID = "source_id";
public static final String METADATA_KEY_INDEX = "index";
public static final String METADATA_KEY_FILE_NAME = "file_name";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,4 @@ private static EmbeddingStore<TextSegment> createWeaviateStore(String protocol,
.apiKey(apiKey)
.build();
}

/*private static EmbeddingStore<TextSegment> createNeo4JStore(String boltURL, String userName, String password, String collectionName, Integer dimension) {
return Neo4jEmbeddingStore.builder()
.withBasicAuth(boltURL, userName, password)
.dimension(dimension)
.databaseName(collectionName)
.build();
}*/

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import dev.langchain4j.store.embedding.filter.Filter;
import org.json.JSONArray;
import org.json.JSONObject;
import org.mule.extension.mulechain.vectors.internal.helper.store.VectorStore;
import org.mule.extension.mulechain.vectors.internal.store.VectorStore;
import org.mule.runtime.extension.api.annotation.Alias;
import org.mule.runtime.extension.api.annotation.param.*;

Expand Down Expand Up @@ -354,9 +354,9 @@ public InputStream listSourcesFromStore(String storeName,
) {

EmbeddingOperationValidator.validateOperationType(
Constants.EMBEDDING_OPERATION_TYPE_FILTER_BY_METADATA,configuration.getVectorStore());
Constants.EMBEDDING_OPERATION_TYPE_QUERY_ALL,configuration.getVectorStore());
EmbeddingOperationValidator.validateOperationType(
Constants.EMBEDDING_OPERATION_TYPE_QUERY_ALL,configuration.getVectorStore());
Constants.EMBEDDING_OPERATION_TYPE_FILTER_BY_METADATA,configuration.getVectorStore());

VectorStore vectorStore = VectorStore.builder()
.storeName(storeName)
Expand Down
Loading