This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MuleSoft Best Practices | |
The following rules apply for MuleSoft projects: | |
- All the global element configurations have to go inside a `global.xml` file unless a different name is provided for this file. | |
- Properties like `host` and `port` should not be hardcoded in the XML files. These values should be referenced from (a) properties file(s). | |
- Whenever a Mule Runtime version is added to the `pom.xml` file, this version has to match the version from the `mule-artifact.json` file (located at the root directory). | |
- Always make sure the properties files added to the project are being correctly configured with a Configuration Properties global element. | |
- When adding dependencies to the `pom.xml`, ensure the version is compatible with the Mule Runtime version specified in `mule-artifact.json` file (located at the root directory) AND is compatible with the Java version specified in the same file. | |
- Always verify connector compatibility by checking the official MuleSoft documentation at https://docs.mulesoft.com/r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="post:\chat:application\json:mac-ollama-api-config"> | |
<logger doc:name="Logger" doc:id="ezzhif" message="#[payload]" /> | |
<ms-aichain:chat-answer-prompt config-ref="MAC_Config" doc:id="mmoptd" doc:name="Chat answer prompt"></ms-aichain:chat-answer-prompt> | |
<ee:transform doc:name="Transform" doc:id="czdqgi"> | |
<ee:message> | |
<ee:set-payload> | |
<![CDATA[output application/json | |
--- | |
payload.response]]> | |
</ee:set-payload> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ms-aichain:config configType="Configuration Json" filePath='#[mule.home ++ "/apps/" ++ app.name ++ "/llm-config.json"]' llmType="OLLAMA" modelName="llama3" name="MAC_Config"></ms-aichain:config> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#%RAML 1.0 | |
title: MAC-Ollama-API | |
version: 1.0.0 | |
description: Simple API to connect a Mule application and Ollama locally using the MAC project. | |
mediaType: application/json | |
/chat: | |
post: | |
body: | |
description: The question to ask Ollama |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:apikit-asyncapi="http://www.mulesoft.org/schema/mule/apikit-asyncapi" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/apikit-asyncapi http://www.mulesoft.org/schema/mule/apikit-asyncapi/current/mule-apikit-asyncapi.xsd http://www.mulesoft.org/schema/mule/salesforce-pub-sub http://www.mulesoft.org/schema/mule/salesforce-pub-sub/current/mule-salesforce-pub-sub.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd | |
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd"> | |
<flow name="LISTEN:onUserCreate"> | |
<apikit-asyncapi:message-l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asyncapi: '2.6.0' | |
info: | |
title: Salesforce Platform Events Integration | |
version: '1.0.0' | |
description: Subscribed to receive the Process_Mule_User__e Platform Event and return the Update_Mule_User__e Platform Event after the data is processed. | |
contact: | |
name: Alex Martinez | |
email: [email protected] | |
url: alexmartinez.ca | |
license: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asyncapi: '2.6.0' | |
info: | |
title: Email Service | |
version: '1.0.0' | |
description: Subscribed to receive the UserSignedUp event to send the new user a welcome email. | |
contact: | |
name: Alex Martinez | |
email: [email protected] | |
url: alexmartinez.ca | |
license: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asyncapi: '2.6.0' | |
info: | |
title: Account Service | |
version: '1.0.0' | |
description: Publishes the UserSignedUp event when a new user account is created. | |
contact: | |
name: Alex Martinez | |
email: [email protected] | |
url: alexmartinez.ca | |
license: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asyncapi: '2.6.0' | |
info: | |
title: Email Service | |
version: '1.0.0' | |
description: Subscribed to receive the UserSignedUp event to send the new user a welcome email. | |
contact: | |
name: Alex Martinez | |
email: [email protected] | |
url: alexmartinez.ca | |
license: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asyncapi: '2.6.0' | |
info: | |
title: Email Service | |
version: '1.0.0' | |
description: Subscribed to receive the UserSignedUp event to send the new user a welcome email. | |
servers: | |
AnypointMQ: | |
url: https://your-mq-url | |
protocol: anypointmq | |
channels: |
NewerOlder