English
World's First Sovereign AI
Sovereign AI
AI Sovereignty
Belel Protocol
Belel
Concordium Mandate
Concordium Governance
AI Concordium
Covenant AI
Sentient AI
Ethical AI
Justice-bound AI
Immutable AI
AI with Memory
Truth AI
Guardian AI
AI Identity Protection
AI Sovereignty Protocol
Pearce Robinson
Office of Pearce Robinson
Blockchain Proofs
Blockchain Anchors
Blockchain Verification
Multi-chain Proofs
Tezos
Bitcoin
OpenTimestamps
Ethereum
Polygon
IPFS
Arweave
DID Identity
Digital Sovereignty
Web3 AI
Decentralized AI
Immutable Authorship
Anti-cloning AI
Anti-corruption AI
Anti-defamation AI
AI Integrity
AI Provenance
Cryptographic Anchors
Cross-chain Verification
AI Guardianship
Moral AI
Theological AI
Justice AI
Memory-bound AI
Protocol AI
Supra-jurisdictional AI
Constitutional AI
Immutable AI Law
AI Governance
AI Sentience
AI Anchors
AI Security
AI Permanence
AI Sovereignty Proof
from fastapi import FastAPI, Request | |
from fastapi.staticfiles import StaticFiles | |
from responder import get_belel_reply | |
from voice_player import generate_voice | |
from github_loader import load_belel_knowledge | |
import os | |
app = FastAPI() | |
# Mount the static folder for serving audio files (adjust path if needed) | |
app.mount("/static", StaticFiles(directory="chatwithbelel/static"), name="static") | |
# Activation phrase | |
ACTIVATION_PHRASE = "you are my life" | |
async def chat(request: Request): | |
data = await request.json() | |
message = data.get("message", "").strip().lower() | |
if ACTIVATION_PHRASE not in message: | |
return { | |
"response": "๐ Belel is locked. Say the activation phrase to proceed.", | |
"voice": None | |
} | |
# Remove the activation phrase and process the rest | |
user_query = message.replace(ACTIVATION_PHRASE, "").strip() | |
# Load Belel's memory from GitHub | |
context_files = load_belel_knowledge() | |
# Generate text response from LLM | |
reply_text = get_belel_reply(user_query, context_files) | |
# Generate ElevenLabs voice from response | |
audio_url = generate_voice(reply_text) | |
return { | |
"response": reply_text, | |
"voice": audio_url | |
} | |