Repository: DevlinRocha/create-lilypad-module
Pull request #3: Support Anura API
Author: login: DevlinRocha
Labels: name: enhancement
description: New feature or request
Created: 2025-03-02T13:26:33Z | Merged: 2025-03-02T23:09:25Z

## Summary

- **Chores**
  - Updated the package version to v0.0.38.

- **Documentation**
  - Revised module instructions with a structured JSON request format and updated parameter descriptions.
  - Updated help text to reflect new terminology.

- **New Features**
  - Enhanced user interaction by prompting for essential configuration during module execution.
  - Added support for a shorthand flag to simplify local builds.
  - Introduced a new parameter, "stop," for specifying stop sequences in requests.

- **Refactor**
  - Streamlined the request processing for a simpler and more robust experience, including changes to input handling and error management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Chores**
	- Incremented the package version.
	- Enhanced the build process with additional flag support and adjusted version update timing.
- **Documentation**
	- Updated instructions and usage examples for running the module.
	- Refined parameter descriptions by replacing "input" with "request" and introducing a new stop parameter.
- **New Features**
	- Streamlined command input handling with a structured JSON format.
	- Improved user interaction through simplified request processing and clearer output messages.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/package.json b/package.json
index 3b1ed63..6bf223b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "create-lilypad-module",
-  "version": "0.0.32",
+  "version": "0.0.39",
   "description": "Create Lilypad modules with a modern Docker setup and minimal configuration.",
   "bin": {
     "create-lilypad-module": "src/create_lilypad_module/scaffold"
diff --git a/src/create_lilypad_module/templates/Dockerfile b/src/create_lilypad_module/templates/Dockerfile
index 9944d1e..86f011a 100644
--- a/src/create_lilypad_module/templates/Dockerfile
+++ b/src/create_lilypad_module/templates/Dockerfile
@@ -29,7 +29,7 @@ RUN mkdir -p ./outputs && chmod 777 ./outputs
 # Set outputs directory as a volume
 VOLUME ./outputs
 
-# Copy a script to start ollama and handle input
+# Copy source code and handle request
 COPY src ./src
 RUN chmod +x ./src/run_model
 
diff --git a/src/create_lilypad_module/templates/README.md b/src/create_lilypad_module/templates/README.md
index a96fb3b..2fea58f 100644
--- a/src/create_lilypad_module/templates/README.md
+++ b/src/create_lilypad_module/templates/README.md
@@ -17,22 +17,35 @@ Your module's ready! 🎉
 
 Once your Docker image has been pushed to Docker Hub, you can run your module on Lilypad Network.
 
-> Make sure that you Base64 encode your input.
+> Make sure that you Base64 encode your request.
 
 ```sh
 export WEB3_PRIVATE_KEY=WEB3_PRIVATE_KEY
 
-lilypad run github.com/github_username/module_repo:v0.0.0 -i input=$(echo '{"prompt": "Which animal order do frogs belong to?", "system": "You are a helpful AI assistant", "temperature": "0.4"}' | base64 -w 0)
+lilypad run github.com/GITHUB_USERNAME/MODULE_REPO:TAG \
+-i request="$(echo -n '{
+  "model": "MODEL_NAME:MODEL_VERSION",
+  "messages": [{
+    "role": "system",
+    "content": "you are a helpful AI assistant"
+  },
+  {
+  "role": "user",
+  "content": "what is the animal order of the frog?"
+  }],
+  "stream": false,
+  "options": {
+    "temperature": 1.0
+  }
+}' | base64 -w 0)"
 ```
 
-### Valid Parameters and Default Values
+### Valid Options Parameters and Default Values
 
-> \* === Required
+- [Ollama Modelfile](https://github.com/ollama/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values)
 
 | Parameter      | Description                                                                                                                                                                                                                                                                                                                                                 | Default |
 | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
-| prompt\*       | The content of the message sent from the user to the model.                                                                                                                                                                                                                                                                                                 | `""`    |
-| system         | The content of the message sent from the system to the model.                                                                                                                                                                                                                                                                                               | `""`    |
 | mirostat       | Enable Mirostat sampling for controlling perplexity. (0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0)                                                                                                                                                                                                                                                         | `0`     |
 | mirostat_eta   | Influences how quickly the algorithm responds to feedback from the generated text. A lower learning rate will result in slower adjustments, while a higher learning rate will make the algorithm more responsive.                                                                                                                                           | `0.1`   |
 | mirostat_tau   | Controls the balance between coherence and diversity of the output. A lower value will result in more focused and coherent text.                                                                                                                                                                                                                            | `5`     |
@@ -41,7 +54,8 @@ lilypad run github.com/github_username/module_repo:v0.0.0 -i input=$(echo '{"pro
 | repeat_penalty | Sets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient.                                                                                                                                                                                        | `1.1`   |
 | temperature    | The temperature of the model. Increasing the temperature will make the model answer more creatively.                                                                                                                                                                                                                                                        | `0.8`   |
 | seed           | Sets the random number seed to use for generation. Setting this to a specific number will make the model generate the same text for the same prompt.                                                                                                                                                                                                        | `0`     |
-| num_predict    | Maximum number of tokens to predict when generating text. (-1 = infinite generation)	                                                                                                                                                                                                                                                                       | `-1`    |
+| stop           | Sets the stop sequences to use. When this pattern is encountered the LLM will stop generating text and return. Multiple stop patterns may be set by specifying multiple separate stop parameters in a modelfile.                                                                                                                                            |         |
+| num_predict    | Maximum number of tokens to predict when generating text. (-1 = infinite generation)                                                                                                                                                                                                                                                                        | `-1`    |
 | top_k          | Reduces the probability of generating nonsense. A higher value (e.g. 100) will give more diverse answers, while a lower value (e.g. 10) will be more conservative.                                                                                                                                                                                          | `40`    |
 | top_p          | Works together with top-k. A higher value (e.g., 0.95) will lead to more diverse text, while a lower value (e.g., 0.5) will generate more focused and conservative text.                                                                                                                                                                                    | `0.9`   |
 | min_p          | Alternative to the top_p, and aims to ensure a balance of quality and variety. The parameter p represents the minimum probability for a token to be considered, relative to the probability of the most likely token. For example, with p=0.05 and the most likely token having a probability of 0.9, logits with a value less than 0.045 are filtered out. | `0.0`   |
@@ -52,8 +66,8 @@ In the project directory, you can run:
 
 ### [`scripts/configure`](scripts/configure)
 
-Configure your module.
-Set the following values in the [`.env` file](.env)
+Configures your module.
+Sets the following values in the [`.env` file](.env)
 
 ```
 MODEL_NAME
@@ -69,7 +83,7 @@ Builds the Docker image and pushes it to Docker Hub.
 
 ### `--major`, `--minor`, and `--patch` Flags
 
-Increment the specified version before building the Docker image.
+Increments the specified version before building the Docker image.
 
 #### `--local` Flag
 
@@ -77,7 +91,7 @@ Loads the built Docker image into the local Docker daemon.
 
 ### [`scripts/run`](scripts/run)
 
-Run your module.
+Runs your module.
 
 ## Learn More
 
diff --git a/src/create_lilypad_module/templates/help b/src/create_lilypad_module/templates/help
index fe52640..613f8db 100644
--- a/src/create_lilypad_module/templates/help
+++ b/src/create_lilypad_module/templates/help
@@ -9,6 +9,6 @@ else
     echo "Available commands:"
     echo -e "\tscripts/configure                                        Configure the module"
     echo -e "\tscripts/build [--local] [--major] [--minor] [--patch]    Build and push a new Docker image"
-    echo -e "\tscripts/run [--local] <input>                            Run the module"
+    echo -e "\tscripts/run [--local] <request>                          Run the module"
     exit 1
 fi
diff --git a/src/create_lilypad_module/templates/lilypad_module.json.tmpl b/src/create_lilypad_module/templates/lilypad_module.json.tmpl
index 67ec51d..c376cfa 100644
--- a/src/create_lilypad_module/templates/lilypad_module.json.tmpl
+++ b/src/create_lilypad_module/templates/lilypad_module.json.tmpl
@@ -5,11 +5,10 @@
     "Spec": {
       "Deal": { "Concurrency": 1 },
       "Docker": {
-        "WorkingDirectory": "/app",
         "Entrypoint": [
-          "/app/src/run_model", {{ .input }}
+          "/app/src/run_model", {{ .request }}
         ],
-        "Image": "dockerhub_username/image:v0.0.0"
+        "Image": "dockerhub_username/image@"
       },
       "Engine": "Docker",
       "Network": { "Type": "None" },
diff --git a/src/create_lilypad_module/templates/scripts/build b/src/create_lilypad_module/templates/scripts/build
index 77582c9..2697f35 100644
--- a/src/create_lilypad_module/templates/scripts/build
+++ b/src/create_lilypad_module/templates/scripts/build
@@ -13,7 +13,7 @@ if [ -z $MODEL_NAME ] || [ -z $MODEL_VERSION ] || [ -z $DOCKER_IMAGE ]; then
 fi
 
 for arg in $@; do
-  if [ $arg == "--local" ]; then
+  if [ $1 == "--local" ] || [ $1 == "-l" ]; then
     echo "Building the Docker image and loading it into the local Docker daemon..."
     local=true
   fi
@@ -37,7 +37,6 @@ for arg in $@; do
 
     VERSION="v$MAJOR.$MINOR.$PATCH"
     echo "New version: $VERSION"
-    sed -i "" "s/^VERSION=.*/VERSION=$VERSION/" .env
   fi
 
   if [ $arg == "--no-cache" ]; then
@@ -91,6 +90,7 @@ if [ -z $local ]; then
   echo "✅ Docker image built and published to Docker Hub successfully."
   echo -e "\thttps://hub.docker.com/repository/docker/$DOCKER_HUB_REPO/general"
   echo -e "\n\tscripts/run_module"
+  sed -i "" "s/^VERSION=.*/VERSION=$VERSION/" .env
 else
   echo "✅ Docker image built and loaded into local daemon successfully."
   echo -e "\n\tscripts/run_module --local"
diff --git a/src/create_lilypad_module/templates/scripts/run b/src/create_lilypad_module/templates/scripts/run
index aa209d4..f6e7f2d 100644
--- a/src/create_lilypad_module/templates/scripts/run
+++ b/src/create_lilypad_module/templates/scripts/run
@@ -1,39 +1,75 @@
 #!/usr/bin/env bash
 
-if [ $# -lt 1 ] || [ $# -gt 2 ]; then
-    echo "Usage: scripts/run [--local] <input>"
+CONFIG_FILE=".env"
+source $CONFIG_FILE
+
+function request {
+    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
+        printf "Enter your wallet private key: "
+        read -r private_key
+        WEB3_PRIVATE_KEY=$private_key
+        echo "Private key set"
+        echo "(Hint: Use 'export WEB3_PRIVATE_KEY=<PRIVATE_KEY>' to avoid this prompt in the future)"
+    fi
+    echo "Copy the JSON below to form your request:"
+    echo '
+  "messages": [{
+    "role": "system",
+    "content": "you are a helpful AI assistant"
+  },
+  {
+    "role": "user",
+    "content": "what is the animal order of the frog?"
+  }],
+  "options": {
+    "temperature": 1.0
+  }
+'
+    printf "(Paste JSON as one line) ➔ "
+    read -r request
+    request="{\"model\": \"$MODEL_NAME:$MODEL_VERSION\", $request, \"stream\": false}"
+}
+
+if [ $# -gt 2 ]; then
+    echo "Usage: scripts/run [--local] <request>"
     echo "Example: scripts/run 'What animal order do frogs belong to?'"
     exit 1
-fi
+elif [ $# -eq 0 ]; then
+    request
+else
+    while [[ $# -gt 0 ]]; do
+        case $1 in
+        --local | -l)
+            echo "Running the Lilypad module Docker image locally..."
+            local=true
+            shift
+            ;;
+        *)
+            request=$1
+            shift
+            ;;
+        esac
+    done
 
-if [ $1 == "--local" ] || [ $1 == "-l" ]; then
-    if [ $# -ne 2 ]; then
-        echo "❌ Error: Input is required."
-        echo "Example: scripts/run --local 'What animal order do frogs belong to?'"
-        exit 1
+    if [[ -z $request ]]; then
+        request
     fi
-    echo "Running the Lilypad module Docker image locally..."
-    local=true
-    INPUT=$2
-else
-    INPUT=$1
 fi
 
-# Base64 encode the input
-JSON_INPUT="{"messages": [{"role": "user", "content": "$INPUT"}]}"
-BASE64_INPUT=$(echo $JSON_INPUT | base64)
-commit_hash=$(git log --pretty=format:%H | head -n 1)
+# Base64 encode the request
+base64_request=$(echo $request | base64 -w 0)
 
-if [ $local != true ]; then
+if [ -z $local ]; then
+    commit_hash=$(git log --pretty=format:%H | head -n 1)
     MODULE=$GITHUB_REPO:$commit_hash
     echo "Running $MODULE on Lilypad Network..."
-    echo "Original input: $JSON_INPUT"
-    echo "Base64 encoded: $BASE64_INPUT"
-    lilypad run $MODULE -i prompt=$BASE64_INPUT
+    echo "Original request: $request"
+    echo "Base64 encoded: $base64_request"
+    lilypad run $MODULE -i request=$base64_request --web3-private-key=$WEB3_PRIVATE_KEY
 else
     MODULE=$DOCKER_IMAGE:$VERSION
     echo "Running $MODULE locally..."
-    echo "Original input: $JSON_INPUT"
-    echo "Base64 encoded: $BASE64_INPUT"
-    docker run $MODULE $BASE64_INPUT
+    echo "Original request: $request"
+    echo "Base64 encoded: $base64_request"
+    docker run $MODULE $base64_request
 fi
diff --git a/src/create_lilypad_module/templates/src/run_model b/src/create_lilypad_module/templates/src/run_model
index 76346ce..1b8bf21 100644
--- a/src/create_lilypad_module/templates/src/run_model
+++ b/src/create_lilypad_module/templates/src/run_model
@@ -3,83 +3,9 @@
 # Create output directory if it doesn't exist
 mkdir -p /outputs
 
-# Parse base64 input argument and decode to JSON
-echo "Raw input (base64): $1" >&2
-input_json=$(echo "$1" | base64 --d)
-
-# Parse arguments
-prompt=$(echo "$input_json" | sed -n 's/.*"prompt":[[:space:]]*"\([^"]*\)".*/\1/p')
-system=$(echo "$input_json" | sed -n 's/.*"system":[[:space:]]*"\([^"]*\)".*/\1/p')
-mirostat=$(echo "$input_json" | sed -n 's/.*"mirostat":[[:space:]]*"\([^"]*\)".*/\1/p')
-mirostat_eta=$(echo "$input_json" | sed -n 's/.*"mirostat_eta":[[:space:]]*"\([^"]*\)".*/\1/p')
-mirostat_tau=$(echo "$input_json" | sed -n 's/.*"mirostat_tau":[[:space:]]*"\([^"]*\)".*/\1/p')
-num_ctx=$(echo "$input_json" | sed -n 's/.*"num_ctx":[[:space:]]*"\([^"]*\)".*/\1/p')
-repeat_last_n=$(echo "$input_json" | sed -n 's/.*"repeat_last_n":[[:space:]]*"\([^"]*\)".*/\1/p')
-repeat_penalty=$(echo "$input_json" | sed -n 's/.*"repeat_penalty":[[:space:]]*"\([^"]*\)".*/\1/p')
-temperature=$(echo "$input_json" | sed -n 's/.*"temperature":[[:space:]]*"\([^"]*\)".*/\1/p')
-seed=$(echo "$input_json" | sed -n 's/.*"seed":[[:space:]]*"\([^"]*\)".*/\1/p')
-num_predict=$(echo "$input_json" | sed -n 's/.*"num_predict":[[:space:]]*"\([^"]*\)".*/\1/p')
-top_k=$(echo "$input_json" | sed -n 's/.*"top_k":[[:space:]]*"\([^"]*\)".*/\1/p')
-top_p=$(echo "$input_json" | sed -n 's/.*"top_p":[[:space:]]*"\([^"]*\)".*/\1/p')
-min_p=$(echo "$input_json" | sed -n 's/.*"min_p":[[:space:]]*"\([^"]*\)".*/\1/p')
-
-# Initialize default values
-mirostat=${mirostat:-"0"}
-mirostat_eta=${mirostat_eta:-"0.1"}
-mirostat_tau=${mirostat_tau:-"5.0"}
-num_ctx=${num_ctx:-"2048"}
-repeat_last_n=${repeat_last_n:-"64"}
-repeat_penalty=${repeat_penalty:-"1.1"}
-temperature=${temperature:-"0.8"}
-seed=${seed:-"0"}
-num_predict=${num_predict:-"-1"}
-top_k=${top_k:-"40"}
-top_p=${top_p:-"0.9"}
-min_p=${min_p:-"0.0"}
-
-if [[ -z "$prompt" ]]; then
-    echo "❌ Error: Prompt is required" >&2
-    exit 1
-fi
-
-echo "Prompt: $prompt" >&2
-
-# Prepare the messages array
-if [[ -z "$system" ]]; then
-    messages=(
-        "[{\"role\": \"user\", \"content\": \"$prompt\"}]"
-    )
-else
-    messages=(
-        "[{\"role\": \"system\", \"content\": \"$system\"},
-        {\"role\": \"user\", \"content\": \"$prompt\"}]"
-    )
-fi
-
-# Prepare the chat completion request
-request=$(
-    cat <<EOF
-{
-  "model": "$MODEL_ID",
-  "messages": $messages,
-  "stream": false,
-  "options": {
-    "mirostat": $mirostat,
-    "mirostat_eta": $mirostat_eta,
-    "mirostat_tau": $mirostat_tau,
-    "num_ctx": $num_ctx,
-    "repeat_last_n": $repeat_last_n,
-    "repeat_penalty": $repeat_penalty,
-    "temperature": $temperature,
-    "seed": $seed,
-    "num_predict": $num_predict,
-    "top_k": $top_k,
-    "top_p": $top_p,
-    "min_p": $min_p
-  }
-}
-EOF
-)
+# Parse Base64 request argument and decode to JSON
+echo "Raw request (Base64): $1" >&2
+request=$(echo "$1" | base64 -d)
 
 # Start the ollama server in the background
 echo "Starting Ollama server..." >&2
@@ -107,8 +33,6 @@ response=$(curl -s http://127.0.0.1:11434/api/chat \
     -H "Content-Type: application/json" \
     -d "$request")
 
-# Create JSON structure following OpenAI format
-escaped_response=$(echo "$response" | sed 's/"/\\"/g')
 formatted_response="{
     'id': 'cmpl-$(openssl rand -hex 12)',
     'object': 'text_completion',
@@ -131,8 +55,7 @@ formatted_response="{
 {
     echo "=== Debug Info ==="
     date
-    echo "System: $system"
-    echo "Input: $prompt"
+    echo "Request (Base64): $1"
     echo "Request to Ollama: $request"
     echo "Response from Ollama:"
     echo "$response"


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 5**

<details>
<summary>🧹 Nitpick comments (2)</summary><blockquote>

<details>
<summary>src/create_lilypad_module/templates/src/run_model (1)</summary><blockquote>

`8-8`: **Add basic error handling for request decoding**

The script doesn't verify if the base64 decoding was successful or if the request contains the required structure. This could lead to cryptic errors when the API call is made.


Consider adding basic validation:
```diff
echo "Raw request (Base64): $1" >&2
request=$(echo "$1" | base64 -d)
+if [ $? -ne 0 ]; then
+  echo "Error: Failed to decode base64 request" >&2
+  exit 1
+fi
+
+# Verify request is valid JSON
+if ! echo "$request" | jq . >/dev/null 2>&1; then
+  echo "Error: Request is not valid JSON" >&2
+  exit 1
+fi
```

</blockquote></details>
<details>
<summary>src/create_lilypad_module/templates/README.md (1)</summary><blockquote>

`57-57`: **Added 'stop' parameter with missing comma.**

The new 'stop' parameter is a valuable addition, but there's a minor typographical error in the description.

```diff
- When this pattern is encountered the LLM will stop generating text and return.
+ When this pattern is encountered, the LLM will stop generating text and return.
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary>

[typographical] ~57-~57: It seems that a comma is missing.
Context: ... sequences to use. When this pattern is encountered the LLM will stop generating text and r...

(IF_COMMA)

</details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between df42378fea7d88f2377fb00d3b388386eeda3cf5 and 1bb38c588f9fec2173ad884b75707d407cd0b3af.

</details>

<details>
<summary>📒 Files selected for processing (8)</summary>

* `package.json` (1 hunks)
* `src/create_lilypad_module/templates/Dockerfile` (1 hunks)
* `src/create_lilypad_module/templates/README.md` (4 hunks)
* `src/create_lilypad_module/templates/help` (1 hunks)
* `src/create_lilypad_module/templates/lilypad_module.json.tmpl` (1 hunks)
* `src/create_lilypad_module/templates/scripts/build` (2 hunks)
* `src/create_lilypad_module/templates/scripts/run` (1 hunks)
* `src/create_lilypad_module/templates/src/run_model` (2 hunks)

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (2)</summary>

* package.json
* src/create_lilypad_module/templates/Dockerfile

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>src/create_lilypad_module/templates/README.md</summary>

[typographical] ~57-~57: It seems that a comma is missing.
Context: ... sequences to use. When this pattern is encountered the LLM will stop generating text and r...

(IF_COMMA)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (14)</summary><blockquote>

<details>
<summary>src/create_lilypad_module/templates/src/run_model (2)</summary>

`6-8`: **Simplification improves code maintainability**

The code has been greatly simplified by directly decoding the base64 request without extracting individual parameters. This is more maintainable and allows for flexible request parameters.

---

`58-58`: **Terminology updated for consistency**

Updated debug output to use "Request (Base64)" instead of "Input (Base64)", maintaining consistency with the terminology changes throughout the codebase.

</details>
<details>
<summary>src/create_lilypad_module/templates/README.md (5)</summary>

`20-40`: **Improved request structure with JSON format.**

The updated example provides a much clearer structure using JSON to specify the model, messages, streaming options, and parameters. This format is more consistent with modern API practices and provides better guidance for users.

---

`43-45`: **Enhanced parameters header for clarity.**

The header change to "Valid Options Parameters and Default Values" better reflects that these parameters belong to the "options" field in the JSON request structure.

---

`58-58`: **Added 'num_predict' parameter for token generation control.**

The 'num_predict' parameter provides important functionality for controlling the maximum number of tokens to predict when generating text.

---

`69-71`: **Improved script description clarity.**

The updated description provides better clarity about what the script does and adds information about the .env file location.

---

`86-86`: **Clearer version flag description.**

The revised wording provides a clearer explanation of what the version flags do.

</details>
<details>
<summary>src/create_lilypad_module/templates/scripts/run (3)</summary>

`3-5`: **Improved configuration loading.**

Added proper configuration file sourcing to load environment variables from the .env file.

---

`6-29`: **Added interactive request function.**

The new `request` function provides an excellent user experience by:
1. Prompting for wallet credentials if needed
2. Providing a JSON template for the user to customize
3. Combining user input with model information from the environment

This makes the module much more user-friendly.

---

`31-37`: **Updated usage and improved argument handling.**

The script now handles both interactive mode (no arguments) and command-line arguments more elegantly. The usage message has been updated to reflect the new request format.

</details>
<details>
<summary>src/create_lilypad_module/templates/help (1)</summary>

`12-12`: **Consistent terminology update: input to request.**

The change from `<input>` to `<request>` aligns with the broader terminology shift across the codebase, making the help text more consistent with other files.

</details>
<details>
<summary>src/create_lilypad_module/templates/scripts/build (2)</summary>

`16-16`: **Good UX improvement: added shorthand option.**

Adding `-l` as a shorthand for `--local` improves user experience by offering a more concise command-line option.

---

`93-93`: **Version update logic improvement.**

Moving the version update to occur after successful Docker image publishing is a good practice. This ensures the version is only updated when the operation completes successfully.

</details>
<details>
<summary>src/create_lilypad_module/templates/lilypad_module.json.tmpl (1)</summary>

`9-9`: **Consistent terminology update: input to request.**

Changing `{{ .input }}` to `{{ .request }}` aligns with the terminology updates across the codebase.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-02T13:30:13Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 5**

<details>
<summary>🔭 Outside diff range comments (1)</summary><blockquote>

<details>
<summary>src/create_lilypad_module/templates/scripts/run (1)</summary><blockquote>

`1-69`: _🛠️ Refactor suggestion_

**Check environment variables at the beginning of the script.**

The script uses several environment variables (`MODEL_NAME`, `MODEL_VERSION`, `GITHUB_REPO`, `DOCKER_IMAGE`, `VERSION`) but doesn't verify they exist before using them. Add checks at the beginning to fail early with clear error messages.

```diff
#!/usr/bin/env bash

CONFIG_FILE=".env"
source $CONFIG_FILE

+# Check required environment variables
+required_vars=("MODEL_NAME" "MODEL_VERSION")
+missing_vars=()
+
+for var in "${required_vars[@]}"; do
+  if [ -z "${!var}" ]; then
+    missing_vars+=("$var")
+  fi
+done
+
+if [ ${#missing_vars[@]} -ne 0 ]; then
+  echo "Error: The following required environment variables are missing:"
+  for var in "${missing_vars[@]}"; do
+    echo "  - $var"
+  done
+  echo "Please set them in your $CONFIG_FILE file."
+  exit 1
+fi
+
function request {
    # Function implementation...
```

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (1)</summary><blockquote>

<details>
<summary>src/create_lilypad_module/templates/scripts/run (1)</summary><blockquote>

`3-4`: **Add error handling for config file loading.**

The script sources the `.env` file without checking if it exists, which could cause confusing errors if the file is missing.

```diff
CONFIG_FILE=".env"
+if [ ! -f "$CONFIG_FILE" ]; then
+  echo "Error: Config file $CONFIG_FILE not found."
+  exit 1
+fi
source $CONFIG_FILE
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 1bb38c588f9fec2173ad884b75707d407cd0b3af and 961a3d70e14bc5029aee2e32ff5e8f5feb3c671a.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `src/create_lilypad_module/templates/scripts/run` (1 hunks)

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-02T21:31:54Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>♻️ Duplicate comments (1)</summary><blockquote>

<details>
<summary>src/create_lilypad_module/templates/scripts/run (1)</summary><blockquote>

`6-31`: _⚠️ Potential issue_

**Improve security and robustness in the request function.**

The function has several issues:
1. The private key is read in plain text (security risk)
2. No validation of MODEL_NAME and MODEL_VERSION
3. JSON construction doesn't properly handle escaping
4. No validation of user input JSON format

```diff
function request {
+    local request_json
    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
        printf "Enter your wallet private key: "
-        read -r private_key
+        read -rs private_key
+        echo # Add newline after hidden input
        WEB3_PRIVATE_KEY=$private_key
        echo "Private key set"
        echo "(Hint: Use 'export WEB3_PRIVATE_KEY=<PRIVATE_KEY>' to avoid this prompt in the future)"
    fi

+    # Validate required environment variables
+    if [ -z "$MODEL_NAME" ] || [ -z "$MODEL_VERSION" ]; then
+        echo "Error: MODEL_NAME and MODEL_VERSION must be set in $CONFIG_FILE"
+        exit 1
+    fi

    echo "Copy the JSON below to form your request:"
    echo '
  "messages": [{
    "role": "system",
    "content": "you are a helpful AI assistant"
  },
  {
    "role": "user",
    "content": "what is the animal order of the frog?"
  }],
  "options": {
    "temperature": 1.0
  }
'
    printf "(Paste JSON as one line) ➔ "
    read -r request
+    # Basic JSON validation
+    if [[ ! "$request" =~ \"messages\" ]]; then
+        echo "Error: Invalid JSON format. Request must include 'messages' field."
+        return 1
+    fi
    request="{\"model\": \"$MODEL_NAME:$MODEL_VERSION\", $request, \"stream\": false}"
}
```

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (3)</summary><blockquote>

<details>
<summary>src/create_lilypad_module/templates/scripts/run (3)</summary><blockquote>

`3-5`: **Add error handling when sourcing the config file.**

The script sources the config file without checking if it exists or can be read. Also, the CONFIG_FILE variable should be quoted when used to handle paths with spaces.

```diff
-CONFIG_FILE=".env"
-source $CONFIG_FILE
+CONFIG_FILE=".env"
+if [ -f "$CONFIG_FILE" ]; then
+  source "$CONFIG_FILE"
+else
+  echo "Warning: Config file $CONFIG_FILE not found. Using default values."
+fi
```

---

`33-57`: **Improve argument handling for clarity and robustness.**

The current implementation might have unexpected behavior with multiple non-flag arguments. Additionally, it doesn't validate the request argument when provided directly.

```diff
if [ $# -gt 2 ]; then
-    echo "Usage: scripts/run [--local] <request>"
+    echo "Usage: scripts/run [--local] [<JSON request>]"
    echo "Example: scripts/run 'What animal order do frogs belong to?'"
    exit 1
elif [ $# -eq 0 ]; then
    request
else
+    local has_request=false
    while [[ $# -gt 0 ]]; do
        case $1 in
        --local | -l)
            echo "Running the Lilypad module Docker image locally..."
            local=true
            shift
            ;;
        *)
+            if [ "$has_request" = true ]; then
+                echo "Warning: Multiple request arguments provided. Using the last one."
+            fi
            request=$1
+            has_request=true
            shift
            ;;
        esac
    done

    if [[ -z $request ]]; then
        request
    fi
fi
```

---

`1-77`: **Enhance overall script security and error handling.**

The script has several security and robustness issues:

1. The private key handling should be made more secure
2. Proper error checking for commands like git and docker is missing
3. The script doesn't validate JSON input thoroughly
4. There's inconsistent quoting of variables throughout

Consider adding comprehensive error checking, proper private key handling (using a temporary file with restricted permissions or a credential manager), and thorough input validation to make the script more robust and secure.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 961a3d70e14bc5029aee2e32ff5e8f5feb3c671a and 2d01db29cf7b598145409077b9c1a1cb116a4ef8.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `src/create_lilypad_module/templates/scripts/run` (1 hunks)

</details>

<details>
<summary>🔇 Additional comments (2)</summary><blockquote>

<details>
<summary>src/create_lilypad_module/templates/scripts/run (2)</summary>

`59-60`: **Add quotes around variables in the base64 encoding.**

Missing quotes around the `$request` variable can cause issues if the request contains spaces or special characters.

```diff
# Base64 encode the request
-base64_request=$(echo $request | base64 -w 0)
+base64_request=$(echo "$request" | base64 -w 0)
```

---

`71-75`: **Add quotes around variables in the local execution path.**

The script uses variables without quotes which could cause issues with spaces or special characters.

```diff
-    MODULE=$DOCKER_IMAGE:$VERSION
+    MODULE="$DOCKER_IMAGE:$VERSION"
    echo "Running $MODULE locally..."
-    echo "Original request: $request"
-    echo "Base64 encoded: $base64_request"
+    echo "Original request: $request"
+    echo "Base64 encoded: $base64_request"
-    docker run $MODULE $base64_request
+    docker run "$MODULE" "$base64_request"
```

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-02T23:02:25Z

Review comments:
diff_hunk: @@ -1,39 +1,69 @@
 #!/usr/bin/env bash
 
-if [ $# -lt 1 ] || [ $# -gt 2 ]; then
-    echo "Usage: scripts/run [--local] <input>"
-    echo "Example: scripts/run 'What animal order do frogs belong to?'"
-    exit 1
-fi
+CONFIG_FILE=".env"
+source $CONFIG_FILE
 
-if [ $1 == "--local" ] || [ $1 == "-l" ]; then
-    if [ $# -ne 2 ]; then
-        echo "❌ Error: Input is required."
-        echo "Example: scripts/run --local 'What animal order do frogs belong to?'"
-        exit 1
+function request {
+    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
+        printf "Enter your wallet private key: "
+        read -r private_key
+        WEB3_PRIVATE_KEY=$private_key
     fi
-    echo "Running the Lilypad module Docker image locally..."
-    local=true
-    INPUT=$2
+    echo "Copy the JSON below to form your request:"
+    printf '
+  "messages": [{
+    "role": "system",
+    "content": "you are a helpful AI assistant"
+  },
+  {
+    "role": "user",
+    "content": "what is the animal order of the frog?"
+  }],
+  "options": {
+    "temperature": 1.0
+  }
+'
+    printf "\n(Paste JSON as one line) ➔ "
+    read -r request
+    request="{"model": $MODEL_NAME:$MODEL_VERSION, $request, "stream": false}"
+}
+
+if [ $# -gt 2 ]; then
+    echo "Usage: scripts/run [--local] <request>"
+    echo "Example: scripts/run 'What animal order do frogs belong to?'"
+    exit 1
+elif [ $# -eq 0 ]; then
+    request
 else
-    INPUT=$1
+    for arg in $@; do
+        if [ $# -eq 1 ] && ([ $1 == "--local" ] || [ $1 == "-l" ]); then
+            if [ $# -ne 2 ]; then
+                request
+            fi
+            echo "Running the Lilypad module Docker image locally..."
+            lcoal=true
+            REQUEST=$2
+        else
+            REQUEST=$1
+        fi
+    done
 fi
 
-# Base64 encode the input
-JSON_INPUT="{"messages": [{"role": "user", "content": "$INPUT"}]}"
-BASE64_INPUT=$(echo $JSON_INPUT | base64)
-commit_hash=$(git log --pretty=format:%H | head -n 1)
+# Base64 encode the request
+BASE64_REQUEST=$(echo $full_request | base64 -w 0)
+echo $WEB3_PRIVATE_KEY
path: src/create_lilypad_module/templates/scripts/run
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Base64 encoding issue.**

The script tries to encode `$full_request` which is not defined anywhere. This will fail at runtime.

```diff
- BASE64_REQUEST=$(echo $full_request | base64 -w 0)
+ BASE64_REQUEST=$(echo $REQUEST | base64 -w 0)
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
# Base64 encode the request
BASE64_REQUEST=$(echo $REQUEST | base64 -w 0)
echo $WEB3_PRIVATE_KEY
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T13:30:11Z
author_association: NONE
diff_hunk: @@ -1,39 +1,69 @@
 #!/usr/bin/env bash
 
-if [ $# -lt 1 ] || [ $# -gt 2 ]; then
-    echo "Usage: scripts/run [--local] <input>"
-    echo "Example: scripts/run 'What animal order do frogs belong to?'"
-    exit 1
-fi
+CONFIG_FILE=".env"
+source $CONFIG_FILE
 
-if [ $1 == "--local" ] || [ $1 == "-l" ]; then
-    if [ $# -ne 2 ]; then
-        echo "❌ Error: Input is required."
-        echo "Example: scripts/run --local 'What animal order do frogs belong to?'"
-        exit 1
+function request {
+    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
+        printf "Enter your wallet private key: "
+        read -r private_key
+        WEB3_PRIVATE_KEY=$private_key
     fi
-    echo "Running the Lilypad module Docker image locally..."
-    local=true
-    INPUT=$2
+    echo "Copy the JSON below to form your request:"
+    printf '
+  "messages": [{
+    "role": "system",
+    "content": "you are a helpful AI assistant"
+  },
+  {
+    "role": "user",
+    "content": "what is the animal order of the frog?"
+  }],
+  "options": {
+    "temperature": 1.0
+  }
+'
+    printf "\n(Paste JSON as one line) ➔ "
+    read -r request
+    request="{"model": $MODEL_NAME:$MODEL_VERSION, $request, "stream": false}"
+}
+
+if [ $# -gt 2 ]; then
+    echo "Usage: scripts/run [--local] <request>"
+    echo "Example: scripts/run 'What animal order do frogs belong to?'"
+    exit 1
+elif [ $# -eq 0 ]; then
+    request
 else
-    INPUT=$1
+    for arg in $@; do
+        if [ $# -eq 1 ] && ([ $1 == "--local" ] || [ $1 == "-l" ]); then
+            if [ $# -ne 2 ]; then
+                request
+            fi
+            echo "Running the Lilypad module Docker image locally..."
+            lcoal=true
+            REQUEST=$2
+        else
+            REQUEST=$1
+        fi
+    done
 fi
 
-# Base64 encode the input
-JSON_INPUT="{"messages": [{"role": "user", "content": "$INPUT"}]}"
-BASE64_INPUT=$(echo $JSON_INPUT | base64)
-commit_hash=$(git log --pretty=format:%H | head -n 1)
+# Base64 encode the request
+BASE64_REQUEST=$(echo $full_request | base64 -w 0)
+echo $WEB3_PRIVATE_KEY
 
-if [ $local != true ]; then
+if [ -z $lcoal ]; then
+    commit_hash=$(git log --pretty=format:%H | head -n 1)
     MODULE=$GITHUB_REPO:$commit_hash
     echo "Running $MODULE on Lilypad Network..."
-    echo "Original input: $JSON_INPUT"
-    echo "Base64 encoded: $BASE64_INPUT"
-    lilypad run $MODULE -i prompt=$BASE64_INPUT
+    echo "Original request: $request"
+    echo "Base64 encoded: $BASE64_REQUEST"
+    lilypad run $MODULE -i request=$BASE64_REQUEST --web3-private-key=$WEB3_PRIVATE_KEY
 else
     MODULE=$DOCKER_IMAGE:$VERSION
     echo "Running $MODULE locally..."
-    echo "Original input: $JSON_INPUT"
-    echo "Base64 encoded: $BASE64_INPUT"
-    docker run $MODULE $BASE64_INPUT
+    echo "Original request: $request"
+    echo "Base64 encoded: $BASE64_REQUEST"
+    docker run $MODULE $BASE64_REQUEST
path: src/create_lilypad_module/templates/scripts/run
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fix echo statements in local execution path.**

The echo statements reference undefined variables in the local execution path.

```diff
- echo "Original request: $request"
+ echo "Original request: $REQUEST"
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
    echo "Original request: $REQUEST"
    echo "Base64 encoded: $BASE64_REQUEST"
    docker run $MODULE $BASE64_REQUEST
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T13:30:11Z
author_association: NONE
diff_hunk: @@ -1,39 +1,69 @@
 #!/usr/bin/env bash
 
-if [ $# -lt 1 ] || [ $# -gt 2 ]; then
-    echo "Usage: scripts/run [--local] <input>"
-    echo "Example: scripts/run 'What animal order do frogs belong to?'"
-    exit 1
-fi
+CONFIG_FILE=".env"
+source $CONFIG_FILE
 
-if [ $1 == "--local" ] || [ $1 == "-l" ]; then
-    if [ $# -ne 2 ]; then
-        echo "❌ Error: Input is required."
-        echo "Example: scripts/run --local 'What animal order do frogs belong to?'"
-        exit 1
+function request {
+    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
+        printf "Enter your wallet private key: "
+        read -r private_key
+        WEB3_PRIVATE_KEY=$private_key
     fi
-    echo "Running the Lilypad module Docker image locally..."
-    local=true
-    INPUT=$2
+    echo "Copy the JSON below to form your request:"
+    printf '
+  "messages": [{
+    "role": "system",
+    "content": "you are a helpful AI assistant"
+  },
+  {
+    "role": "user",
+    "content": "what is the animal order of the frog?"
+  }],
+  "options": {
+    "temperature": 1.0
+  }
+'
+    printf "\n(Paste JSON as one line) ➔ "
+    read -r request
+    request="{"model": $MODEL_NAME:$MODEL_VERSION, $request, "stream": false}"
+}
+
+if [ $# -gt 2 ]; then
+    echo "Usage: scripts/run [--local] <request>"
+    echo "Example: scripts/run 'What animal order do frogs belong to?'"
+    exit 1
+elif [ $# -eq 0 ]; then
+    request
 else
-    INPUT=$1
+    for arg in $@; do
+        if [ $# -eq 1 ] && ([ $1 == "--local" ] || [ $1 == "-l" ]); then
+            if [ $# -ne 2 ]; then
+                request
+            fi
+            echo "Running the Lilypad module Docker image locally..."
+            lcoal=true
+            REQUEST=$2
+        else
+            REQUEST=$1
+        fi
+    done
 fi
 
-# Base64 encode the input
-JSON_INPUT="{"messages": [{"role": "user", "content": "$INPUT"}]}"
-BASE64_INPUT=$(echo $JSON_INPUT | base64)
-commit_hash=$(git log --pretty=format:%H | head -n 1)
+# Base64 encode the request
+BASE64_REQUEST=$(echo $full_request | base64 -w 0)
+echo $WEB3_PRIVATE_KEY
 
-if [ $local != true ]; then
+if [ -z $lcoal ]; then
+    commit_hash=$(git log --pretty=format:%H | head -n 1)
     MODULE=$GITHUB_REPO:$commit_hash
     echo "Running $MODULE on Lilypad Network..."
-    echo "Original input: $JSON_INPUT"
-    echo "Base64 encoded: $BASE64_INPUT"
-    lilypad run $MODULE -i prompt=$BASE64_INPUT
+    echo "Original request: $request"
+    echo "Base64 encoded: $BASE64_REQUEST"
+    lilypad run $MODULE -i request=$BASE64_REQUEST --web3-private-key=$WEB3_PRIVATE_KEY
path: src/create_lilypad_module/templates/scripts/run
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fix variable reference in conditional.**

There's an inconsistent variable reference and the request echo variables don't match the defined variables.

```diff
- if [ -z $lcoal ]; then
+ if [ -z $local ]; then

- echo "Original request: $request"
+ echo "Original request: $REQUEST"
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
if [ -z $local ]; then
    commit_hash=$(git log --pretty=format:%H | head -n 1)
    MODULE=$GITHUB_REPO:$commit_hash
    echo "Running $MODULE on Lilypad Network..."
    echo "Original request: $REQUEST"
    echo "Base64 encoded: $BASE64_REQUEST"
    lilypad run $MODULE -i request=$BASE64_REQUEST --web3-private-key=$WEB3_PRIVATE_KEY
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T13:30:11Z
author_association: NONE
diff_hunk: @@ -1,39 +1,69 @@
 #!/usr/bin/env bash
 
-if [ $# -lt 1 ] || [ $# -gt 2 ]; then
-    echo "Usage: scripts/run [--local] <input>"
-    echo "Example: scripts/run 'What animal order do frogs belong to?'"
-    exit 1
-fi
+CONFIG_FILE=".env"
+source $CONFIG_FILE
 
-if [ $1 == "--local" ] || [ $1 == "-l" ]; then
-    if [ $# -ne 2 ]; then
-        echo "❌ Error: Input is required."
-        echo "Example: scripts/run --local 'What animal order do frogs belong to?'"
-        exit 1
+function request {
+    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
+        printf "Enter your wallet private key: "
+        read -r private_key
+        WEB3_PRIVATE_KEY=$private_key
     fi
-    echo "Running the Lilypad module Docker image locally..."
-    local=true
-    INPUT=$2
+    echo "Copy the JSON below to form your request:"
+    printf '
+  "messages": [{
+    "role": "system",
+    "content": "you are a helpful AI assistant"
+  },
+  {
+    "role": "user",
+    "content": "what is the animal order of the frog?"
+  }],
+  "options": {
+    "temperature": 1.0
+  }
+'
+    printf "\n(Paste JSON as one line) ➔ "
+    read -r request
+    request="{"model": $MODEL_NAME:$MODEL_VERSION, $request, "stream": false}"
+}
+
+if [ $# -gt 2 ]; then
+    echo "Usage: scripts/run [--local] <request>"
+    echo "Example: scripts/run 'What animal order do frogs belong to?'"
+    exit 1
+elif [ $# -eq 0 ]; then
+    request
 else
-    INPUT=$1
+    for arg in $@; do
+        if [ $# -eq 1 ] && ([ $1 == "--local" ] || [ $1 == "-l" ]); then
+            if [ $# -ne 2 ]; then
+                request
+            fi
+            echo "Running the Lilypad module Docker image locally..."
+            lcoal=true
+            REQUEST=$2
+        else
+            REQUEST=$1
+        fi
+    done
 fi
path: src/create_lilypad_module/templates/scripts/run
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fix typo in local flag variable.**

There's a typo in the variable name used for the local flag.

```diff
- lcoal=true
+ local=true
```

This typo also appears in the conditional check on line 56.


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
    for arg in $@; do
        if [ $# -eq 1 ] && ([ $1 == "--local" ] || [ $1 == "-l" ]); then
            if [ $# -ne 2 ]; then
                request
            fi
            echo "Running the Lilypad module Docker image locally..."
            local=true
            REQUEST=$2
        else
            REQUEST=$1
        fi
    done
fi
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T13:30:11Z
author_association: NONE
diff_hunk: @@ -5,11 +5,10 @@
     "Spec": {
       "Deal": { "Concurrency": 1 },
       "Docker": {
-        "WorkingDirectory": "/app",
         "Entrypoint": [
-          "/app/src/run_model", {{ .input }}
+          "/app/src/run_model", {{ .request }}
         ],
-        "Image": "dockerhub_username/image:v0.0.0"
+        "Image": "dockerhub_username/image@"
path: src/create_lilypad_module/templates/lilypad_module.json.tmpl
user: login: coderabbitai[bot]
body: _💡 Verification agent_

<details>
<summary>🧩 Analysis chain</summary>

**Verify Docker image reference format.**

The Image format has changed from a version-tagged reference (`dockerhub_username/image:v0.0.0`) to a format using `@` (`dockerhub_username/image@`). This appears to be missing a digest or other identifier after the `@` symbol.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check if this is a valid Docker image reference format
echo "Checking Docker image reference format in lilypad_module.json.tmpl"

# Display the current format for verification
grep -n "Image\":" src/create_lilypad_module/templates/lilypad_module.json.tmpl

# Check if there are any examples of this format in other files
echo "Searching for similar image reference patterns in other files:"
rg "Image\":\s+\"[^:]+@" --type json
```

Length of output: 443

---



</details>

**Action Required: Correct Incomplete Docker Image Reference**

The Docker image reference in `src/create_lilypad_module/templates/lilypad_module.json.tmpl` at line 11 is currently written as:

```
"Image": "dockerhub_username/image@"
```

This format suggests that a digest (e.g., `@sha256:<digest_value>`) should follow the `@` symbol; however, it is missing. Please update the image reference by either:

- Appending the correct digest identifier (e.g., `dockerhub_username/image@sha256:<digest_value>`), **or**
- Reverting to the tag-based format (e.g., `dockerhub_username/image:v0.0.0`) if that was the intended reference style.

Manual verification of the desired Docker image reference format is recommended to ensure consistency with the rest of the codebase.

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T13:30:12Z
author_association: NONE
diff_hunk: @@ -1,39 +1,68 @@
 #!/usr/bin/env bash
 
-if [ $# -lt 1 ] || [ $# -gt 2 ]; then
-    echo "Usage: scripts/run [--local] <input>"
-    echo "Example: scripts/run 'What animal order do frogs belong to?'"
-    exit 1
-fi
+CONFIG_FILE=".env"
+source $CONFIG_FILE
 
-if [ $1 == "--local" ] || [ $1 == "-l" ]; then
-    if [ $# -ne 2 ]; then
-        echo "❌ Error: Input is required."
-        echo "Example: scripts/run --local 'What animal order do frogs belong to?'"
-        exit 1
+function request {
+    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
+        printf "Enter your wallet private key: "
+        read -r private_key
+        WEB3_PRIVATE_KEY=$private_key
     fi
-    echo "Running the Lilypad module Docker image locally..."
-    local=true
-    INPUT=$2
+    echo "Copy the JSON below to form your request:"
+    printf '
+  "messages": [{
+    "role": "system",
+    "content": "you are a helpful AI assistant"
+  },
+  {
+    "role": "user",
+    "content": "what is the animal order of the frog?"
+  }],
+  "options": {
+    "temperature": 1.0
+  }
+'
+    printf "\n(Paste JSON as one line) ➔ "
+    read -r request
+    request="{"model": $MODEL_NAME:$MODEL_VERSION, $request, "stream": false}"
+}
+
+if [ $# -gt 2 ]; then
+    echo "Usage: scripts/run [--local] <request>"
+    echo "Example: scripts/run 'What animal order do frogs belong to?'"
+    exit 1
+elif [ $# -eq 0 ]; then
+    request
 else
-    INPUT=$1
+    for arg in $@; do
+        if [ $# -eq 1 ] && ([ $1 == "--local" ] || [ $1 == "-l" ]); then
+            if [ $# -ne 2 ]; then
+                request
+            fi
+            echo "Running the Lilypad module Docker image locally..."
+            local=true
+            request=$2
+        else
+            request=$1
+        fi
+    done
 fi
 
-# Base64 encode the input
-JSON_INPUT="{"messages": [{"role": "user", "content": "$INPUT"}]}"
-BASE64_INPUT=$(echo $JSON_INPUT | base64)
-commit_hash=$(git log --pretty=format:%H | head -n 1)
+# Base64 encode the request
+base64_request=$(echo $request | base64 -w 0)
path: src/create_lilypad_module/templates/scripts/run
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Add quotes around variables in the base64 encoding.**

Missing quotes around the `$request` variable can cause issues if the request contains spaces or special characters.

```diff
# Base64 encode the request
-base64_request=$(echo $request | base64 -w 0)
+base64_request=$(echo "$request" | base64 -w 0)
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
# Base64 encode the request
base64_request=$(echo "$request" | base64 -w 0)
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T21:31:53Z
author_association: NONE
diff_hunk: @@ -1,39 +1,68 @@
 #!/usr/bin/env bash
 
-if [ $# -lt 1 ] || [ $# -gt 2 ]; then
-    echo "Usage: scripts/run [--local] <input>"
-    echo "Example: scripts/run 'What animal order do frogs belong to?'"
-    exit 1
-fi
+CONFIG_FILE=".env"
+source $CONFIG_FILE
 
-if [ $1 == "--local" ] || [ $1 == "-l" ]; then
-    if [ $# -ne 2 ]; then
-        echo "❌ Error: Input is required."
-        echo "Example: scripts/run --local 'What animal order do frogs belong to?'"
-        exit 1
+function request {
+    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
+        printf "Enter your wallet private key: "
+        read -r private_key
+        WEB3_PRIVATE_KEY=$private_key
     fi
-    echo "Running the Lilypad module Docker image locally..."
-    local=true
-    INPUT=$2
+    echo "Copy the JSON below to form your request:"
+    printf '
+  "messages": [{
+    "role": "system",
+    "content": "you are a helpful AI assistant"
+  },
+  {
+    "role": "user",
+    "content": "what is the animal order of the frog?"
+  }],
+  "options": {
+    "temperature": 1.0
+  }
+'
+    printf "\n(Paste JSON as one line) ➔ "
+    read -r request
+    request="{"model": $MODEL_NAME:$MODEL_VERSION, $request, "stream": false}"
+}
+
+if [ $# -gt 2 ]; then
+    echo "Usage: scripts/run [--local] <request>"
+    echo "Example: scripts/run 'What animal order do frogs belong to?'"
+    exit 1
+elif [ $# -eq 0 ]; then
+    request
 else
-    INPUT=$1
+    for arg in $@; do
+        if [ $# -eq 1 ] && ([ $1 == "--local" ] || [ $1 == "-l" ]); then
+            if [ $# -ne 2 ]; then
+                request
+            fi
+            echo "Running the Lilypad module Docker image locally..."
+            local=true
+            request=$2
+        else
+            request=$1
+        fi
+    done
 fi
path: src/create_lilypad_module/templates/scripts/run
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fix argument handling logic issues.**

The current argument handling has logical issues, particularly when handling the `--local` flag. The loop structure is unnecessary since it only uses positional arguments directly.

```diff
if [ $# -gt 2 ]; then
    echo "Usage: scripts/run [--local] <request>"
    echo "Example: scripts/run 'What animal order do frogs belong to?'"
    exit 1
elif [ $# -eq 0 ]; then
    request
else
-    for arg in $@; do
-        if [ $# -eq 1 ] && ([ $1 == "--local" ] || [ $1 == "-l" ]); then
-            if [ $# -ne 2 ]; then
-                request
-            fi
-            echo "Running the Lilypad module Docker image locally..."
-            local=true
-            request=$2
-        else
-            request=$1
-        fi
-    done
+    if [ "$1" == "--local" ] || [ "$1" == "-l" ]; then
+        echo "Running the Lilypad module Docker image locally..."
+        local=true
+        if [ $# -eq 1 ]; then
+            request
+        else
+            request="$2"
+        fi
+    else
+        request="$1"
+    fi
fi
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
if [ $# -gt 2 ]; then
    echo "Usage: scripts/run [--local] <request>"
    echo "Example: scripts/run 'What animal order do frogs belong to?'"
    exit 1
elif [ $# -eq 0 ]; then
    request
else
    if [ "$1" == "--local" ] || [ "$1" == "-l" ]; then
        echo "Running the Lilypad module Docker image locally..."
        local=true
        if [ $# -eq 1 ]; then
            request
        else
            request="$2"
        fi
    else
        request="$1"
    fi
fi
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T21:31:53Z
author_association: NONE
diff_hunk: @@ -1,39 +1,68 @@
 #!/usr/bin/env bash
 
-if [ $# -lt 1 ] || [ $# -gt 2 ]; then
-    echo "Usage: scripts/run [--local] <input>"
-    echo "Example: scripts/run 'What animal order do frogs belong to?'"
-    exit 1
-fi
+CONFIG_FILE=".env"
+source $CONFIG_FILE
 
-if [ $1 == "--local" ] || [ $1 == "-l" ]; then
-    if [ $# -ne 2 ]; then
-        echo "❌ Error: Input is required."
-        echo "Example: scripts/run --local 'What animal order do frogs belong to?'"
-        exit 1
+function request {
+    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
+        printf "Enter your wallet private key: "
+        read -r private_key
+        WEB3_PRIVATE_KEY=$private_key
     fi
-    echo "Running the Lilypad module Docker image locally..."
-    local=true
-    INPUT=$2
+    echo "Copy the JSON below to form your request:"
+    printf '
+  "messages": [{
+    "role": "system",
+    "content": "you are a helpful AI assistant"
+  },
+  {
+    "role": "user",
+    "content": "what is the animal order of the frog?"
+  }],
+  "options": {
+    "temperature": 1.0
+  }
+'
+    printf "\n(Paste JSON as one line) ➔ "
+    read -r request
+    request="{"model": $MODEL_NAME:$MODEL_VERSION, $request, "stream": false}"
+}
path: src/create_lilypad_module/templates/scripts/run
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Secure handling of private keys needed.**

The current implementation reads the private key directly and stores it in an environment variable, which poses security risks. Consider using a more secure approach.

Rather than directly reading the private key and storing it in an environment variable, consider:

1. Using a secure credential manager
2. Prompting for the key only when needed and not storing it
3. Using a temporary file with restricted permissions that is securely deleted after use

For immediate improvement:
```diff
function request {
    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
        printf "Enter your wallet private key: "
-        read -r private_key
-        WEB3_PRIVATE_KEY=$private_key
+        # Read without echoing to terminal
+        read -rs private_key
+        echo # Add newline after hidden input
+        export WEB3_PRIVATE_KEY=$private_key
    fi
    # Rest of function...
}
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
function request {
    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
        printf "Enter your wallet private key: "
        # Read without echoing to terminal
        read -rs private_key
        echo # Add newline after hidden input
        export WEB3_PRIVATE_KEY=$private_key
    fi
    echo "Copy the JSON below to form your request:"
    printf '
  "messages": [{
    "role": "system",
    "content": "you are a helpful AI assistant"
  },
  {
    "role": "user",
    "content": "what is the animal order of the frog?"
  }],
  "options": {
    "temperature": 1.0
  }
'
    printf "\n(Paste JSON as one line) ➔ "
    read -r request
    request="{"model": $MODEL_NAME:$MODEL_VERSION, $request, "stream": false}"
}
`````

</details>

<!-- suggestion_end -->

---

_🛠️ Refactor suggestion_

**Fix JSON construction and variable scoping in the request function.**

There are several issues with the request function that need to be addressed:
1. The function uses global variables without declaring scope
2. There's no validation for the JSON input
3. The JSON construction doesn't properly escape values
4. It uses environment variables without checking if they're defined


```diff
function request {
+    local private_key
+    local user_request
+
    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
        printf "Enter your wallet private key: "
        read -r private_key
        WEB3_PRIVATE_KEY=$private_key
    fi
+
+    # Check if required env variables are set
+    if [ -z "$MODEL_NAME" ] || [ -z "$MODEL_VERSION" ]; then
+        echo "Error: MODEL_NAME and MODEL_VERSION must be set in $CONFIG_FILE"
+        exit 1
+    fi
+
    echo "Copy the JSON below to form your request:"
    printf '
  "messages": [{
    "role": "system",
    "content": "you are a helpful AI assistant"
  },
  {
    "role": "user",
    "content": "what is the animal order of the frog?"
  }],
  "options": {
    "temperature": 1.0
  }
'
    printf "\n(Paste JSON as one line) ➔ "
-    read -r request
-    request="{"model": $MODEL_NAME:$MODEL_VERSION, $request, "stream": false}"
+    read -r user_request
+    request="{\"model\": \"$MODEL_NAME:$MODEL_VERSION\", $user_request, \"stream\": false}"
}
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
function request {
    local private_key
    local user_request

    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
        printf "Enter your wallet private key: "
        read -r private_key
        WEB3_PRIVATE_KEY=$private_key
    fi

    # Check if required env variables are set
    if [ -z "$MODEL_NAME" ] || [ -z "$MODEL_VERSION" ]; then
        echo "Error: MODEL_NAME and MODEL_VERSION must be set in $CONFIG_FILE"
        exit 1
    fi

    echo "Copy the JSON below to form your request:"
    printf '
  "messages": [{
    "role": "system",
    "content": "you are a helpful AI assistant"
  },
  {
    "role": "user",
    "content": "what is the animal order of the frog?"
  }],
  "options": {
    "temperature": 1.0
  }
'
    printf "\n(Paste JSON as one line) ➔ "
    read -r user_request
    request="{\"model\": \"$MODEL_NAME:$MODEL_VERSION\", $user_request, \"stream\": false}"
}
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T21:31:53Z
author_association: NONE
diff_hunk: @@ -1,39 +1,68 @@
 #!/usr/bin/env bash
 
-if [ $# -lt 1 ] || [ $# -gt 2 ]; then
-    echo "Usage: scripts/run [--local] <input>"
-    echo "Example: scripts/run 'What animal order do frogs belong to?'"
-    exit 1
-fi
+CONFIG_FILE=".env"
+source $CONFIG_FILE
 
-if [ $1 == "--local" ] || [ $1 == "-l" ]; then
-    if [ $# -ne 2 ]; then
-        echo "❌ Error: Input is required."
-        echo "Example: scripts/run --local 'What animal order do frogs belong to?'"
-        exit 1
+function request {
+    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
+        printf "Enter your wallet private key: "
+        read -r private_key
+        WEB3_PRIVATE_KEY=$private_key
     fi
-    echo "Running the Lilypad module Docker image locally..."
-    local=true
-    INPUT=$2
+    echo "Copy the JSON below to form your request:"
+    printf '
+  "messages": [{
+    "role": "system",
+    "content": "you are a helpful AI assistant"
+  },
+  {
+    "role": "user",
+    "content": "what is the animal order of the frog?"
+  }],
+  "options": {
+    "temperature": 1.0
+  }
+'
+    printf "\n(Paste JSON as one line) ➔ "
+    read -r request
+    request="{"model": $MODEL_NAME:$MODEL_VERSION, $request, "stream": false}"
+}
+
+if [ $# -gt 2 ]; then
+    echo "Usage: scripts/run [--local] <request>"
+    echo "Example: scripts/run 'What animal order do frogs belong to?'"
+    exit 1
+elif [ $# -eq 0 ]; then
+    request
 else
-    INPUT=$1
+    for arg in $@; do
+        if [ $# -eq 1 ] && ([ $1 == "--local" ] || [ $1 == "-l" ]); then
+            if [ $# -ne 2 ]; then
+                request
+            fi
+            echo "Running the Lilypad module Docker image locally..."
+            local=true
+            request=$2
+        else
+            request=$1
+        fi
+    done
 fi
 
-# Base64 encode the input
-JSON_INPUT="{"messages": [{"role": "user", "content": "$INPUT"}]}"
-BASE64_INPUT=$(echo $JSON_INPUT | base64)
-commit_hash=$(git log --pretty=format:%H | head -n 1)
+# Base64 encode the request
+base64_request=$(echo $request | base64 -w 0)
 
-if [ $local != true ]; then
+if [ -z $local ]; then
+    commit_hash=$(git log --pretty=format:%H | head -n 1)
     MODULE=$GITHUB_REPO:$commit_hash
     echo "Running $MODULE on Lilypad Network..."
-    echo "Original input: $JSON_INPUT"
-    echo "Base64 encoded: $BASE64_INPUT"
-    lilypad run $MODULE -i prompt=$BASE64_INPUT
+    echo "Original request: $request"
+    echo "Base64 encoded: $base64_request"
+    lilypad run $MODULE -i request=$base64_request --web3-private-key=$WEB3_PRIVATE_KEY
 else
     MODULE=$DOCKER_IMAGE:$VERSION
     echo "Running $MODULE locally..."
-    echo "Original input: $JSON_INPUT"
-    echo "Base64 encoded: $BASE64_INPUT"
-    docker run $MODULE $BASE64_INPUT
+    echo "Original request: $request"
+    echo "Base64 encoded: $base64_request"
+    docker run $MODULE $base64_request
 fi
path: src/create_lilypad_module/templates/scripts/run
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Add quotes around variables in the execution logic.**

The script is missing quotes around multiple variables which could cause issues with spaces or special characters. Also, using the private key directly on the command line is a security risk as it can be visible in process listings.

```diff
-if [ -z $local ]; then
+if [ -z "$local" ]; then
    commit_hash=$(git log --pretty=format:%H | head -n 1)
-    MODULE=$GITHUB_REPO:$commit_hash
+    MODULE="$GITHUB_REPO:$commit_hash"
    echo "Running $MODULE on Lilypad Network..."
-    echo "Original request: $request"
-    echo "Base64 encoded: $base64_request"
+    echo "Original request: $request"
+    echo "Base64 encoded: $base64_request"
-    lilypad run $MODULE -i request=$base64_request --web3-private-key=$WEB3_PRIVATE_KEY
+    lilypad run "$MODULE" -i request="$base64_request" --web3-private-key="$WEB3_PRIVATE_KEY"
else
-    MODULE=$DOCKER_IMAGE:$VERSION
+    MODULE="$DOCKER_IMAGE:$VERSION"
    echo "Running $MODULE locally..."
-    echo "Original request: $request"
-    echo "Base64 encoded: $base64_request"
+    echo "Original request: $request"
+    echo "Base64 encoded: $base64_request"
-    docker run $MODULE $base64_request
+    docker run "$MODULE" "$base64_request"
fi
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
if [ -z "$local" ]; then
    commit_hash=$(git log --pretty=format:%H | head -n 1)
    MODULE="$GITHUB_REPO:$commit_hash"
    echo "Running $MODULE on Lilypad Network..."
    echo "Original request: $request"
    echo "Base64 encoded: $base64_request"
    lilypad run "$MODULE" -i request="$base64_request" --web3-private-key="$WEB3_PRIVATE_KEY"
else
    MODULE="$DOCKER_IMAGE:$VERSION"
    echo "Running $MODULE locally..."
    echo "Original request: $request"
    echo "Base64 encoded: $base64_request"
    docker run "$MODULE" "$base64_request"
fi
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T21:31:53Z
author_association: NONE
diff_hunk: @@ -1,39 +1,76 @@
 #!/usr/bin/env bash
 
-if [ $# -lt 1 ] || [ $# -gt 2 ]; then
-    echo "Usage: scripts/run [--local] <input>"
+CONFIG_FILE=".env"
+source $CONFIG_FILE
+
+function request {
+    if ! printenv | grep -q "WEB3_PRIVATE_KEY=."; then
+        printf "Enter your wallet private key: "
+        read -r private_key
+        WEB3_PRIVATE_KEY=$private_key
+        echo "Private key set"
+        echo "(Hint: Use 'export WEB3_PRIVATE_KEY=<PRIVATE_KEY>' to avoid this prompt in the future)"
+    fi
+    echo "Copy the JSON below to form your request:"
+    echo '
+  "messages": [{
+    "role": "system",
+    "content": "you are a helpful AI assistant"
+  },
+  {
+    "role": "user",
+    "content": "what is the animal order of the frog?"
+  }],
+  "options": {
+    "temperature": 1.0
+  }
+'
+    printf "(Paste JSON as one line) ➔ "
+    read -r request
+    request="{\"model\": \"$MODEL_NAME:$MODEL_VERSION\", $request, \"stream\": false}"
+}
+
+if [ $# -gt 2 ]; then
+    echo "Usage: scripts/run [--local] <request>"
     echo "Example: scripts/run 'What animal order do frogs belong to?'"
     exit 1
-fi
+elif [ $# -eq 0 ]; then
+    request
+else
+    while [[ $# -gt 0 ]]; do
+        case $1 in
+        --local | -l)
+            echo "Running the Lilypad module Docker image locally..."
+            local=true
+            shift
+            ;;
+        *)
+            request=$1
+            shift
+            ;;
+        esac
+    done
 
-if [ $1 == "--local" ] || [ $1 == "-l" ]; then
-    if [ $# -ne 2 ]; then
-        echo "❌ Error: Input is required."
-        echo "Example: scripts/run --local 'What animal order do frogs belong to?'"
-        exit 1
+    if [[ -z $request ]]; then
+        request
     fi
-    echo "Running the Lilypad module Docker image locally..."
-    local=true
-    INPUT=$2
-else
-    INPUT=$1
 fi
 
-# Base64 encode the input
-JSON_INPUT="{"messages": [{"role": "user", "content": "$INPUT"}]}"
-BASE64_INPUT=$(echo $JSON_INPUT | base64)
-commit_hash=$(git log --pretty=format:%H | head -n 1)
+# Base64 encode the request
+base64_request=$(echo $request | base64 -w 0)
 
-if [ $local != true ]; then
+if [ -z $local ]; then
+    commit_hash=$(git log --pretty=format:%H | head -n 1)
     MODULE=$GITHUB_REPO:$commit_hash
     echo "Running $MODULE on Lilypad Network..."
-    echo "Original input: $JSON_INPUT"
-    echo "Base64 encoded: $BASE64_INPUT"
-    lilypad run $MODULE -i prompt=$BASE64_INPUT
+    echo "Original request: $request"
+    echo "Base64 encoded: $base64_request"
+    echo lilypad run $MODULE -i request=$base64_request --web3-private-key=$WEB3_PRIVATE_KEY
+    lilypad run $MODULE -i request=$base64_request --web3-private-key=$WEB3_PRIVATE_KEY
path: src/create_lilypad_module/templates/scripts/run
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Add quotes around variables and improve error handling in the Lilypad execution path.**

The script uses variables without quotes and exposes the private key on the command line. Also, there's no error handling for the git command.

```diff
-if [ -z $local ]; then
+if [ -z "$local" ]; then
+    # Get latest commit hash with error handling
+    if ! commit_hash=$(git log --pretty=format:%H | head -n 1); then
+        echo "Error: Failed to get commit hash. Make sure you're in a git repository."
+        exit 1
+    fi
-    commit_hash=$(git log --pretty=format:%H | head -n 1)
-    MODULE=$GITHUB_REPO:$commit_hash
+    MODULE="$GITHUB_REPO:$commit_hash"
    echo "Running $MODULE on Lilypad Network..."
-    echo "Original request: $request"
-    echo "Base64 encoded: $base64_request"
+    echo "Original request: $request"
+    echo "Base64 encoded: $base64_request"
-    echo lilypad run $MODULE -i request=$base64_request --web3-private-key=$WEB3_PRIVATE_KEY
-    lilypad run $MODULE -i request=$base64_request --web3-private-key=$WEB3_PRIVATE_KEY
+    echo lilypad run "$MODULE" -i request="$base64_request" --web3-private-key="$WEB3_PRIVATE_KEY"
+    lilypad run "$MODULE" -i request="$base64_request" --web3-private-key="$WEB3_PRIVATE_KEY"
```



<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
if [ -z "$local" ]; then
    # Get latest commit hash with error handling
    if ! commit_hash=$(git log --pretty=format:%H | head -n 1); then
        echo "Error: Failed to get commit hash. Make sure you're in a git repository."
        exit 1
    fi
    MODULE="$GITHUB_REPO:$commit_hash"
    echo "Running $MODULE on Lilypad Network..."
    echo "Original request: $request"
    echo "Base64 encoded: $base64_request"
    echo lilypad run "$MODULE" -i request="$base64_request" --web3-private-key="$WEB3_PRIVATE_KEY"
    lilypad run "$MODULE" -i request="$base64_request" --web3-private-key="$WEB3_PRIVATE_KEY"
fi
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-02T23:02:24Z
author_association: NONE

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-03-02T13:26:39Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: skip review by coderabbit.ai -->

> [!IMPORTANT]
> ## Review skipped
> 
> Auto reviews are disabled on base/target branches other than the default branch.
> 
> 
> 
> Please check the settings in the CodeRabbit UI or the `.coderabbit.yaml` file in this repository. To trigger a single review, invoke the `@coderabbitai review` command.
> 
> You can disable this status message by setting the `reviews.review_status` to `false` in the CodeRabbit configuration file.

<!-- end of auto-generated comment: skip review by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough
The changes include a version bump in the package, updates to Docker configuration comments and parameters, revised documentation with updated terminology and a new parameter, and significant modifications to several scripts. The build and run scripts now feature enhanced argument handling and JSON request processing, while the run_model script has been simplified for input decoding.

## Changes

| Files | Change Summary |
|-------|----------------|
| **package.json** | Version updated from "0.0.32" to "0.0.38". |
| **src/.../Dockerfile<br>src/.../lilypad_module.json.tmpl** | Docker configuration updated: Dockerfile comment changed; JSON template removes `"WorkingDirectory"`, updates `"Entrypoint"` from `{{ .input }}` to `{{ .request }}`, and changes the image reference from a versioned tag to a tagless format. |
| **src/.../README.md<br>src/.../help** | Documentation revised: terminology changed from "input" to "request"; the README now presents a structured JSON example with a new `stop` parameter and updated header; help text updated accordingly. |
| **src/.../scripts/build<br>src/.../scripts/run<br>src/.../src/run_model** | Script modifications: build script extends local flag checking (`--local` and `-l`) and repositions version updating; run script now sources the `.env`, prompts for a wallet key if absent, and constructs a JSON request; run_model simplifies Base64 decoding and removes detailed parameter extraction. |

## Sequence Diagram(s)
```mermaid
sequenceDiagram
    participant User
    participant RunScript as "scripts/run"
    participant Env as ".env File"
    participant RequestFunc as "Request Handler"
    participant RunModel as "run_model Script"
    
    User->>RunScript: Execute command
    RunScript->>Env: Check if .env exists
    alt .env is present
        Env-->>RunScript: Load configuration
    else .env missing
        RunScript->>User: Prompt for wallet private key
        User-->>RunScript: Provide key
    end
    RunScript->>RequestFunc: Construct structured JSON request
    RequestFunc-->>RunScript: Return JSON request
    RunScript->>RunScript: Base64-encode the request
    RunScript->>RunModel: Pass encoded request
    RunModel->>RunModel: Decode Base64 into JSON
    RunModel-->>RunScript: Process request and return output
    RunScript->>User: Display result
```

## Poem
> In code I hop with joy so grand,  
> Each update a treat as I nibble and stand.  
> From version bumps to JSON so bright,  
> Docker whispers and scripts take flight.  
> I’m a coding rabbit, quick and keen—  
> Leaping through changes in fields unseen!  
> 🐰💻

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpADK2VmgqyjcEj2wAbb5AokAI7Y0riQ4rjedJ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er it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE
user: login: DevlinRocha
created_at: 2025-03-02T13:26:49Z
body: @coderabbit review
author_association: OWNER
user: login: DevlinRocha
created_at: 2025-03-02T13:26:53Z
body: @coderabbit summary
author_association: OWNER
user: login: coderabbitai[bot]
created_at: 2025-03-02T13:26:54Z
body: <!-- This is an auto-generated reply by CodeRabbit -->
<details>
<summary>:white_check_mark: Actions performed</summary>

Review triggered.

> Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

</details>
author_association: NONE
user: login: coderabbitai[bot]
created_at: 2025-03-02T13:26:58Z
body: <!-- This is an auto-generated reply by CodeRabbit -->
<details>
<summary>:white_check_mark: Actions performed</summary>

Summary regeneration triggered.

</details>
author_association: NONE
user: login: DevlinRocha
created_at: 2025-03-02T21:29:44Z
body: @coderabbit review
author_association: OWNER
user: login: coderabbitai[bot]
created_at: 2025-03-02T21:29:48Z
body: <!-- This is an auto-generated reply by CodeRabbit -->
<details>
<summary>:white_check_mark: Actions performed</summary>

Review triggered.

> Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

</details>
author_association: NONE
user: login: DevlinRocha
created_at: 2025-03-02T22:59:14Z
body: @coderabbit review
author_association: OWNER
user: login: coderabbitai[bot]
created_at: 2025-03-02T22:59:18Z
body: <!-- This is an auto-generated reply by CodeRabbit -->
<details>
<summary>:white_check_mark: Actions performed</summary>

Review triggered.

> Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

</details>
author_association: NONE