- Your AI model has been configured, started and made available to the proxy-router server via a private endpoint (IP:PORT or DNS:PORT) eg:
http://mycoolaimodel.domain.com:8080
- Optional
- You can use the provided
llama.cpp
andtinyllama
model to test locally - If your local model is listening on a different port locally, you will need to modify the
models-config.json
file to match the correct port
- You can use the provided
- Optional
- You have an existing funded wallet with MOR and ETH and also have the
private key
for the wallet (this will be needed for the .env file configuration) - You have created an Alchemy or Infura free account and have a private API key for the Arbitrum Sepolia testnet (wss://arb-sepolia.g.alchemy.com/v2/<your_private_alchemy_api_key>)
- Your proxy-router must have a publicly accessible endpoint for the provider (ip:port or fqdn:port no protocol) eg:
mycoolmornode.domain.com:3333
- this will be used when creating the provider on the blockchain
-
Obtain the software:
- Package: Download latest release for your operating system: https://github.com/Lumerin-protocol/Morpheus-Lumerin-Node/releases
- Mainnet releases will be prefixed with
main-*
- Testnet releases will be prefixed with
test-*
- Mainnet releases will be prefixed with
- Source Code:
- Clone the repository:
git clone -b branch https://github.com/Lumerin-protocol/Morpheus-Lumerin-Node.git
- Mainnet Branch =
main
- Testnet Branch =
test
- Development Branch =
dev
(not recommended unless directed by the development team)
- Clone the repository:
- Package: Download latest release for your operating system: https://github.com/Lumerin-protocol/Morpheus-Lumerin-Node/releases
-
Extract the zip to a local folder (examples)
- Windows:
(%USERPROFILE%)/Downloads/morpheus)
- Linux & MacOS:
~/Downloads/morpheus
- On MacOS you may need to execute
xattr -c proxy-router
in a command window to remove the quarantine flag on MacOS
- Windows:
-
Environment configuration
- In most cases, the default .env file will work for the proxy-router...In some cases you will want to modify the .env file with advanced capability (log entries, private keys, private endpoints, etc)
- Please see proxy-router.all.env for more information on the key values available in the .env file
- Choose OS environment you are working with:
- Linux/Mac:
env.example
orenv.example.win
for Windows - Change the name of the desired file to
.env
- Edit values within the file (Wallet_Private_Key, for example) as desired
- Linux/Mac:
- Choose the blockchain you'd like to work on...Arbitrum MAINNET is the default
- To operate on the Sepolia Arbitrum TESTNET,
- Edit the .env file and
- Uncomment the
TESTNET VALUES
and comment theMAINNET VALUES
lines & save the file
-
(OPTIONAL) - External Provider or Pass through
- In some cases you will want to leverage external or existing AI Providers in the network via their own, private API
- Dependencies:
model-config.json
file in the proxy-router directory- proxy-router .env file for proxy-router must also be edited to adjust
MODELS_CONFIG_PATH=<path_to_proxy-router>/models-config.json
- Once your provider is up and running, deploy a new model and model bid via the API interface (you will need the
model_ID
for the configuration) - Edit the model-config.json to the following json format
- The JSON ID will be the ModelID that you created above, modelName, apiTYpe, apiURL and apiKey are from the external provider and specific to their offered models
- Full explanation of models-config.json can be found here models-config.json.md
- Once the model-config.json file is updated, the morpheus node will need to be restarted to pick up the new configuration (not all models (eg: image generation can be utilized via the MorpheusUI, but API integration is possible)
-
(OPTIONAL) - Weights and Preferred Providers
- In some cases you will want to adjust the weights of the providers or set a preferred provider for the models you'd like to use
- Edit the
rating-config.json
file located in the proxy-router directory to adjust the weights and preferred providers for the models you'd like to use- Weights must add up to 1
- Full explanation of rating-config.json can be found here rating-config.json.md
- Add preferred providerIDs to the
providerAllowlist
array for the providers you'd like to use- If this array is left blank, all providers are available
- On your server, launch the proxy-router with the modified .env file shown above
- Windows: Double click the
proxy-router.exe
(You will need to tell Windows Defender this is ok to run) - Linux & MacOS: Open a terminal and navigate to the folder and run
./proxy-router
from the morpheus/proxy-router folder
- Windows: Double click the
- This will start the proxy-router and begin monitoring the blockchain for events
- Once the proxy-router is running, you can navigate to the Swagger API Interface (http://localhost:8082/swagger/index.html as example) to validate that the proxy-router is running and listening for blockchain events
- You can also check the logs in the
./data
directory for any errors or issues that may have occurred during startup - Once validated, you can move on and create your provider, model and bid on the blockchain 03-provider-offer.md