Getting Started
Option 1: Install using Maven Dependency
Copy and paste the following Maven Dependency into your Mule application pom file.
<dependency>
<groupId>cloud.anypoint</groupId>
<artifactId>mule4-vectors-connector</artifactId>
<version>0.2.50</version>
<classifier>mule-plugin</classifier>
</dependency>
Option 2: Install Manually using Maven
System Requirements
Before you start, ensure you have the following prerequisites:
- Java Development Kit (JDK) 8, 11, and 17
- Apache Maven
- MuleSoft Anypoint Studio
Download the MAC Vectors Connector
Clone the MAC Vectors Connector repository from GitHub:
git clone https://github.com/MuleSoft-AI-Chain-Project/mac-vectors.git
cd mac-vectors
Install the Connector with Java 8
mvn clean install -Dmaven.test.skip=true -DskipTests
Installing with Java 11, 17, 21, 22, etc.
Step 1
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED"
Step 2
For Java 11
mvn clean install -Dmaven.test.skip=true -DskipTests -Djdeps.multiRelease=11
For Java 17
mvn clean install -Dmaven.test.skip=true -DskipTests -Djdeps.multiRelease=17
For Java 21
mvn clean install -Dmaven.test.skip=true -DskipTests -Djdeps.multiRelease=21
For Java 22
mvn clean install -Dmaven.test.skip=true -DskipTests -Djdeps.multiRelease=22
Add the Connector to Your Project
Add the following dependency to your pom.xml
file:
<dependency>
<groupId>com.mulesoft.connectors</groupId>
<artifactId>mule4-vectors-connector</artifactId>
<version>{version}</version>
<classifier>mule-plugin</classifier>
</dependency>
The MAC Project connectors are constantly updated, and the version is regularly changed.
Make sure to replace {version}
with the latest release from our GitHub repository (opens in a new tab).
Configuration
Go to the Global Elements
in your MuleSoft project, and create a new configuration.
In the Connector Configuration
, you will find the MuleSoft Vectors Connector Configuration. Select it and press OK.
In the connector configuration you will be required to configure the Embedding Model Service
and Vector Store
,
while the Storage
configuration is optional (you can define/override it at operation level).
Here an example of fully configured connector.
Embedding Model Service Configuration
You can choose one of the available Embedding Model Service
.
Based on the selection you will be presented with the related required parameters.
Vector Store Configuration
You can choose one of the available Vector Store
.
Based on the selection you will be presented with the related required parameters.
Storage Configuration
This configuration is optional and you can decide to define it or override it at operation level.
You can choose one of the available Storage
options.
Based on the selection you will be presented with the related required parameters.
Expression (Dataweave)
Is it possible to define the storage configuration using a dataweave expression following some examples.
Local
output application/java
---
{
workingDirectory: ""
} as Object {
class : "org.mule.extension.vectors.internal.storage.local.LocalStorageConfiguration"
}
AWS S3
output application/java
---
{
awsRegion: p('s3.awsDefaultRegion'),
awsAccessKeyId: p('s3.awsAccessKeyId'),
awsSecretAccessKey: p('s3.awsDefaultRegion')
} as Object {
class : "org.mule.extension.vectors.internal.storage.s3.AWSS3StorageConfiguration"
}
Azure Blob
output application/java
---
{
azureName: p('azureBlob.accountName'),
azureKey: p('azureBlob.accountKey')
} as Object {
class : "org.mule.extension.vectors.internal.storage.azureblob.AzureBlobStorageConfiguration"
}