Docs
Getting Started

Getting Started

Option 1: Install using Maven Dependency

Copy and paste the following Maven Dependency into your Mule application pom file.

pom.xml
<dependency>
  <groupId>cloud.anypoint</groupId>
  <artifactId>mule-vectors-connector</artifactId>
  <version>0.1.25</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:

pom.xml
<dependency>
    <groupId>com.mule.mulechain</groupId>
    <artifactId>mulechain-vectors</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

The configuration for the MAC Vectors connector is very similar to MuleSoft AI Chain and Einstein AI Connector. Go to the Global Elements in your MuleSoft project, and create a new configuration. In the Connector Configuration, you will find the MAC Vectors Configuration. Select it and press OK. You can use the DataWeave expression if you want to store this configuration JSON in the resources folder of your Mule application.

DW Expression: mule.home ++ "/apps/" ++ app.name ++ "/envVars.json"

Tools Use AI Service

The Config File

Currently all required attributes must be provided as a json file. You can use the following file as template. It can be stored externally or added directly in the Mule application under the src/main/resource folder.

{
  "OPENAI": {
      "OPENAI_API_KEY": "YOUR_APIKEY"
  },
  "MISTRAL_AI": {
      "MISTRAL_AI_API_KEY": "YOUR_APIKEY"
  },
  "NOMIC" : {
    "NOMIC_API_KEY":"YOUR_APIKEY"
  },
  "CHROMA" : {
    "CHROMA_URL":"chrome-url"
  },
  "ELASTICSEARCH": {
    "ELASTICSEARCH_URL":"elastic-url",
    "ELASTICSEARCH_USER": "elastic-user",
    "ELASTICSEARCH_PASSWORD": "elastic-password"
  },
  "PGVECTOR": {
    "POSTGRES_HOST":"pghost",
    "POSTGRES_PORT":"pgport",
    "POSTGRES_DATABASE":"pgdb",
    "POSTGRES_USER": "pguser",
    "POSTGRES_PASSWORD": "pgpassword"
  },
  "MILVUS": {
    "MILVUS_URL": "milvus-url"
  },
  "PINECONE": {
    "PINECONE_APIKEY": "YOUR_APIKEY",
    "PINECONE_SERVERLESS_CLOUD": "AWS",
    "PINECONE_SERVERLESS_REGION": "us-east-1"
  },
  "QDRANT": {
    "QDRANT_HOST": "YOUR_HOST",
    "QDRANT_API_KEY": "YOUR_APIKEY",
    "QDRANT_GRPC_PORT": "YOUR_PORT",
    "QDRANT_USE_TLS": "false",
    "QDRANT_TEXT_KEY": "text-segment"
  },
  "AI_SEARCH": {
  	"AI_SEARCH_KEY": "YOUR_KEY",
  	"AI_SEARCH_URL": "ai-search-url"
  },
  "OPENSEARCH": {
    "OPENSEARCH_URL": "opensearch-url"
    "OPENSEARCH_USER": "YOUR_USER",
    "OPENSEARCH_PASSWORD": "YOUR_PASSWORD"
  },
  "S3": {
  	"AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY_ID",
  	"AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_ACCESS_KEY",
  	"AWS_DEFAULT_REGION": "us-east-1",
  	"AWS_S3_BUCKET": "muleaichain"
  },
  "AZURE_BLOB": {
  	"AZURE_BLOB_ACCOUNT_NAME": "YOUR_ACCOUNT_NAME",
  	"AZURE_BLOB_ACCOUNT_KEY": "YOUR_ACCOUNT_KEY"
  }
}