Docs
Getting Started

Getting Started

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"
  },
  "WEAVIATE": {
    "WEAVIATE_PROTOCOL": "https",
    "WEAVIATE_HOST": "YOUR_WEAVIATE_HOST",
    "WEAVIATE_APIKEY": "YOUR_APIKEY"
    
  }
}