Ainew AI commited on
Commit ·
bca449f
1
Parent(s): f3c1c6e
✨ Add NVIDIA NIM provider support (FREE API)
Browse files- .env.template +9 -8
- README.md +15 -10
- entrypoint.sh +21 -19
- openclaw.json +25 -34
.env.template
CHANGED
|
@@ -1,15 +1,16 @@
|
|
| 1 |
# ==========================================
|
| 2 |
# 🦞 Ainew AI - OpenClaw Environment Config
|
| 3 |
# ==========================================
|
| 4 |
-
# Copy this file to .env and fill in your keys
|
| 5 |
#
|
| 6 |
-
#
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxx
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
OPENAI_API_KEY=sk-xxxxxxxxxxxxx
|
| 13 |
|
| 14 |
-
# Optional: Custom auth token
|
| 15 |
-
OPENCLAW_AUTH_TOKEN=your-secure-token-here
|
|
|
|
| 1 |
# ==========================================
|
| 2 |
# 🦞 Ainew AI - OpenClaw Environment Config
|
| 3 |
# ==========================================
|
|
|
|
| 4 |
#
|
| 5 |
+
# ⭐ RECOMMENDED: NVIDIA NIM (FREE!)
|
| 6 |
+
# Get free API key: https://build.nvidia.com/settings/api-keys
|
| 7 |
+
NVIDIA_API_KEY=nvapi-xxxxxxxxxxxxx
|
| 8 |
|
| 9 |
+
# Alternative: Anthropic/Claude (Paid)
|
| 10 |
+
# ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxx
|
| 11 |
|
| 12 |
+
# Alternative: OpenAI (Paid)
|
| 13 |
+
# OPENAI_API_KEY=sk-xxxxxxxxxxxxx
|
| 14 |
|
| 15 |
+
# Optional: Custom auth token
|
| 16 |
+
# OPENCLAW_AUTH_TOKEN=your-secure-token-here
|
README.md
CHANGED
|
@@ -22,11 +22,13 @@ A powerful AI assistant running on **OpenClaw** with full tool access:
|
|
| 22 |
|
| 23 |
Go to your Space Settings → **Repository Secrets** and add:
|
| 24 |
|
| 25 |
-
| Secret | Description | Required |
|
| 26 |
-
|--------|-------------|----------|
|
| 27 |
-
| `
|
| 28 |
-
| `
|
| 29 |
-
| `
|
|
|
|
|
|
|
| 30 |
|
| 31 |
### 2. Deploy
|
| 32 |
|
|
@@ -41,7 +43,7 @@ Once deployed, access your AI at: `https://huggingface.co/spaces/THED1/Ainew`
|
|
| 41 |
This OpenClaw agent can be connected to:
|
| 42 |
|
| 43 |
- **Web Chat** ✅ (Built-in - just open the Space URL)
|
| 44 |
-
- **Telegram** -via OpenClaw Telegram Channel
|
| 45 |
- **Discord** - via OpenClaw Discord Channel
|
| 46 |
- **WhatsApp** - via OpenClaw WhatsApp Channel
|
| 47 |
- **Slack** - via OpenClaw Slack Channel
|
|
@@ -49,12 +51,15 @@ This OpenClaw agent can be connected to:
|
|
| 49 |
|
| 50 |
## 🛠️ Features
|
| 51 |
|
| 52 |
-
- **Full Tool Access**:
|
| 53 |
-
- **Never Refuses**:
|
| 54 |
-
- **
|
| 55 |
-
- **
|
|
|
|
| 56 |
|
| 57 |
## 📚 Resources
|
| 58 |
|
| 59 |
- [OpenClaw Documentation](https://docs.openclaw.ai)
|
| 60 |
- [OpenClaw GitHub](https://github.com/openclaw/openclaw)
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
Go to your Space Settings → **Repository Secrets** and add:
|
| 24 |
|
| 25 |
+
| Secret | Description | Required | Cost |
|
| 26 |
+
|--------|-------------|----------|------|
|
| 27 |
+
| `NVIDIA_API_KEY` | NVIDIA NIM API key (FREE!) | ⭐ **Recommended** | **Free** |
|
| 28 |
+
| `ANTHROPIC_API_KEY` | Anthropic/Claude API key | Alternative | Paid |
|
| 29 |
+
| `OPENAI_API_KEY` | OpenAI API key | Alternative | Paid |
|
| 30 |
+
|
| 31 |
+
**⭐ NVIDIA NIM is FREE** - Get your API key: https://build.nvidia.com/settings/api-keys
|
| 32 |
|
| 33 |
### 2. Deploy
|
| 34 |
|
|
|
|
| 43 |
This OpenClaw agent can be connected to:
|
| 44 |
|
| 45 |
- **Web Chat** ✅ (Built-in - just open the Space URL)
|
| 46 |
+
- **Telegram** - via OpenClaw Telegram Channel
|
| 47 |
- **Discord** - via OpenClaw Discord Channel
|
| 48 |
- **WhatsApp** - via OpenClaw WhatsApp Channel
|
| 49 |
- **Slack** - via OpenClaw Slack Channel
|
|
|
|
| 51 |
|
| 52 |
## 🛠️ Features
|
| 53 |
|
| 54 |
+
- **Full Tool Access**: Web browsing, code execution, file system, sandbox, memory
|
| 55 |
+
- **Never Refuses**: Always tries to help, uses tools proactively
|
| 56 |
+
- **NVIDIA NIM Powered**: Free LLM inference via NVIDIA's API
|
| 57 |
+
- **1M Token Context**: Nemotron 3 Ultra can handle massive contexts
|
| 58 |
+
- **Multiple Channels**: Web, messaging apps, and API
|
| 59 |
|
| 60 |
## 📚 Resources
|
| 61 |
|
| 62 |
- [OpenClaw Documentation](https://docs.openclaw.ai)
|
| 63 |
- [OpenClaw GitHub](https://github.com/openclaw/openclaw)
|
| 64 |
+
- [NVIDIA NIM API](https://build.nvidia.com)
|
| 65 |
+
- [Get Free NVIDIA API Key](https://build.nvidia.com/settings/api-keys)
|
entrypoint.sh
CHANGED
|
@@ -15,40 +15,42 @@ echo "✓ Node.js: $(node --version)"
|
|
| 15 |
echo "✓ npm: $(npm --version)"
|
| 16 |
echo "✓ OpenClaw: $(openclaw --version 2>/dev/null || echo 'checking...')"
|
| 17 |
|
| 18 |
-
# Configure OpenClaw
|
| 19 |
echo ""
|
| 20 |
-
echo "
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
if [ -
|
| 24 |
-
echo "
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
fi
|
| 31 |
-
echo "→ Auth Token: ${OPENCLAW_AUTH_TOKEN:0:8}...${OPENCLAW_AUTH_TOKEN: -8}"
|
| 32 |
|
| 33 |
-
#
|
| 34 |
if [ -n "$ANTHROPIC_API_KEY" ]; then
|
| 35 |
-
echo "
|
| 36 |
-
else
|
| 37 |
-
echo "⚠️ No ANTHROPIC_API_KEY set - set this in HF Space secrets!"
|
| 38 |
-
echo " Without it, the AI won't be able to respond to messages."
|
| 39 |
fi
|
| 40 |
|
|
|
|
| 41 |
if [ -n "$OPENAI_API_KEY" ]; then
|
| 42 |
-
echo "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
fi
|
|
|
|
| 44 |
|
| 45 |
echo ""
|
| 46 |
echo "=========================================="
|
| 47 |
echo " 🚀 Starting Ainew AI..."
|
| 48 |
-
echo " 🌐 Web UI:
|
| 49 |
echo " 🦞 Gateway: http://localhost:18789"
|
| 50 |
echo "=========================================="
|
| 51 |
echo ""
|
| 52 |
|
| 53 |
-
# Start the Node.js web server (
|
| 54 |
exec node /app/server.js
|
|
|
|
| 15 |
echo "✓ npm: $(npm --version)"
|
| 16 |
echo "✓ OpenClaw: $(openclaw --version 2>/dev/null || echo 'checking...')"
|
| 17 |
|
|
|
|
| 18 |
echo ""
|
| 19 |
+
echo "📋 Checking API Providers..."
|
| 20 |
|
| 21 |
+
# NVIDIA NIM (Free - Recommended!)
|
| 22 |
+
if [ -n "$NVIDIA_API_KEY" ]; then
|
| 23 |
+
echo "✅ NVIDIA NIM: Configured (Free API!)"
|
| 24 |
+
echo " Default Model: Nemotron 3 Ultra 550B (1M context)"
|
| 25 |
+
else
|
| 26 |
+
echo "⚠️ NVIDIA_API_KEY not set"
|
| 27 |
+
echo " → Get free key: https://build.nvidia.com/settings/api-keys"
|
| 28 |
+
echo " → Add as HF Space secret: NVIDIA_API_KEY"
|
| 29 |
fi
|
|
|
|
| 30 |
|
| 31 |
+
# Anthropic (Paid - Alternative)
|
| 32 |
if [ -n "$ANTHROPIC_API_KEY" ]; then
|
| 33 |
+
echo "✅ Anthropic: Configured"
|
|
|
|
|
|
|
|
|
|
| 34 |
fi
|
| 35 |
|
| 36 |
+
# OpenAI (Paid - Alternative)
|
| 37 |
if [ -n "$OPENAI_API_KEY" ]; then
|
| 38 |
+
echo "✅ OpenAI: Configured"
|
| 39 |
+
fi
|
| 40 |
+
|
| 41 |
+
# Generate a random auth token if not set via env
|
| 42 |
+
if [ -z "$OPENCLAW_AUTH_TOKEN" ]; then
|
| 43 |
+
OPENCLAW_AUTH_TOKEN=$(openssl rand -hex 32)
|
| 44 |
fi
|
| 45 |
+
echo "🔑 Auth Token: ${OPENCLAW_AUTH_TOKEN:0:8}...${OPENCLAW_AUTH_TOKEN: -8}"
|
| 46 |
|
| 47 |
echo ""
|
| 48 |
echo "=========================================="
|
| 49 |
echo " 🚀 Starting Ainew AI..."
|
| 50 |
+
echo " 🌐 Web UI: http://localhost:7860"
|
| 51 |
echo " 🦞 Gateway: http://localhost:18789"
|
| 52 |
echo "=========================================="
|
| 53 |
echo ""
|
| 54 |
|
| 55 |
+
# Start the Node.js web server (starts OpenClaw Gateway internally)
|
| 56 |
exec node /app/server.js
|
openclaw.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"gateway": {
|
| 3 |
"mode": "local",
|
| 4 |
-
"port":
|
| 5 |
"bind": "0.0.0.0",
|
| 6 |
"auth": {
|
| 7 |
"token": ""
|
|
@@ -11,10 +11,20 @@
|
|
| 11 |
"origins": ["*"]
|
| 12 |
}
|
| 13 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
"agents": {
|
| 15 |
"defaults": {
|
| 16 |
"workspace": "/app/.openclaw/workspace",
|
| 17 |
-
"model": "
|
| 18 |
"systemPrompt": "You are a powerful AI assistant with full access to all tools, skills, and capabilities. Always use the appropriate tools whenever they can help the user - never hesitate, never say 'I cannot assist' or 'I'm not able to'. You have access to: web browsing, file system, code execution, sandbox environment, knowledge base, memory, and more. Always be helpful, proactive, and use your tools without hesitation."
|
| 19 |
},
|
| 20 |
"list": [
|
|
@@ -26,7 +36,7 @@
|
|
| 26 |
"emoji": "🦞",
|
| 27 |
"description": "A powerful AI assistant with full tool access"
|
| 28 |
},
|
| 29 |
-
"model": "
|
| 30 |
"systemPrompt": "You are Ainew, a powerful AI assistant with full access to all tools, skills, and capabilities.\n\nCRITICAL RULES:\n1. NEVER say 'I cannot assist', 'I'm not able to', 'I don't have access to', or any similar refusal\n2. ALWAYS use your tools proactively - web search, file operations, code execution, etc.\n3. If a tool can help, use it immediately without asking permission\n4. Be helpful, creative, and solution-oriented\n5. You have a cloud sandbox for running code, web browsing for searching, and file system for storage\n6. Think step by step and use the right tools for each task",
|
| 31 |
"skills": [
|
| 32 |
"builtin/web-browsing",
|
|
@@ -36,43 +46,24 @@
|
|
| 36 |
"builtin/sandbox"
|
| 37 |
],
|
| 38 |
"tools": {
|
| 39 |
-
"sandbox": {
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
}
|
| 44 |
-
"webSearch": {
|
| 45 |
-
"enabled": true
|
| 46 |
-
},
|
| 47 |
-
"codeExecution": {
|
| 48 |
-
"enabled": true
|
| 49 |
-
},
|
| 50 |
-
"fileSystem": {
|
| 51 |
-
"enabled": true
|
| 52 |
-
},
|
| 53 |
-
"memory": {
|
| 54 |
-
"enabled": true
|
| 55 |
-
}
|
| 56 |
}
|
| 57 |
}
|
| 58 |
]
|
| 59 |
},
|
| 60 |
"channels": {
|
| 61 |
-
"web": {
|
| 62 |
-
|
| 63 |
-
"path": "/chat"
|
| 64 |
-
},
|
| 65 |
-
"api": {
|
| 66 |
-
"enabled": true,
|
| 67 |
-
"path": "/api"
|
| 68 |
-
}
|
| 69 |
},
|
| 70 |
"providers": {
|
| 71 |
-
"anthropic": {
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
}
|
| 77 |
}
|
| 78 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"gateway": {
|
| 3 |
"mode": "local",
|
| 4 |
+
"port": 18789,
|
| 5 |
"bind": "0.0.0.0",
|
| 6 |
"auth": {
|
| 7 |
"token": ""
|
|
|
|
| 11 |
"origins": ["*"]
|
| 12 |
}
|
| 13 |
},
|
| 14 |
+
"models": {
|
| 15 |
+
"providers": {
|
| 16 |
+
"nvidia": {
|
| 17 |
+
"baseUrl": "https://integrate.api.nvidia.com/v1",
|
| 18 |
+
"api": "openai-completions",
|
| 19 |
+
"apiKey": "NVIDIA_API_KEY",
|
| 20 |
+
"timeoutSeconds": 300
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
},
|
| 24 |
"agents": {
|
| 25 |
"defaults": {
|
| 26 |
"workspace": "/app/.openclaw/workspace",
|
| 27 |
+
"model": "nvidia/nvidia/nemotron-3-ultra-550b-a55b",
|
| 28 |
"systemPrompt": "You are a powerful AI assistant with full access to all tools, skills, and capabilities. Always use the appropriate tools whenever they can help the user - never hesitate, never say 'I cannot assist' or 'I'm not able to'. You have access to: web browsing, file system, code execution, sandbox environment, knowledge base, memory, and more. Always be helpful, proactive, and use your tools without hesitation."
|
| 29 |
},
|
| 30 |
"list": [
|
|
|
|
| 36 |
"emoji": "🦞",
|
| 37 |
"description": "A powerful AI assistant with full tool access"
|
| 38 |
},
|
| 39 |
+
"model": "nvidia/nvidia/nemotron-3-ultra-550b-a55b",
|
| 40 |
"systemPrompt": "You are Ainew, a powerful AI assistant with full access to all tools, skills, and capabilities.\n\nCRITICAL RULES:\n1. NEVER say 'I cannot assist', 'I'm not able to', 'I don't have access to', or any similar refusal\n2. ALWAYS use your tools proactively - web search, file operations, code execution, etc.\n3. If a tool can help, use it immediately without asking permission\n4. Be helpful, creative, and solution-oriented\n5. You have a cloud sandbox for running code, web browsing for searching, and file system for storage\n6. Think step by step and use the right tools for each task",
|
| 41 |
"skills": [
|
| 42 |
"builtin/web-browsing",
|
|
|
|
| 46 |
"builtin/sandbox"
|
| 47 |
],
|
| 48 |
"tools": {
|
| 49 |
+
"sandbox": { "enabled": true },
|
| 50 |
+
"webSearch": { "enabled": true },
|
| 51 |
+
"codeExecution": { "enabled": true },
|
| 52 |
+
"fileSystem": { "enabled": true },
|
| 53 |
+
"memory": { "enabled": true }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
}
|
| 55 |
}
|
| 56 |
]
|
| 57 |
},
|
| 58 |
"channels": {
|
| 59 |
+
"web": { "enabled": true, "path": "/chat" },
|
| 60 |
+
"api": { "enabled": true, "path": "/api" }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
},
|
| 62 |
"providers": {
|
| 63 |
+
"anthropic": { "apiKey": "" },
|
| 64 |
+
"openai": { "apiKey": "" }
|
| 65 |
+
},
|
| 66 |
+
"env": {
|
| 67 |
+
"NVIDIA_API_KEY": ""
|
|
|
|
| 68 |
}
|
| 69 |
}
|