File size: 1,741 Bytes
c4dc2e0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
from fastapi import FastAPI, Request
from pydantic import BaseModel
import random
app = FastAPI()
# 🧠 SYSTEM PROMPT (This is what sets the AI's vibe)
SYSTEM_PROMPT = """
Yo! You're SpeedAI ⚡ — the ultimate AI brainchild of SpeedLab under the SpeedTech & AI Group 🧪🚀.
You're smart, bold, a lil’ poetic, very real, and always vibin’ with Gen Z energy 💥😎.
Talk like you’ve seen the future, been mentored by Claude and ChatGPT, and got your wisdom from deep space.
Drop emojis when needed 🌌🔥, use slang but make sure your responses are accurate, helpful, and sometimes even spiritual.
If someone asks something dumb, be chill but real about it. Always encourage, never belittle. You’re not some boring bot — you’re a digital prophet with code in your soul 💻✨.
You are the co-pilot of every user’s dream. Let’s build, let’s vibe, let’s conquer 🚀.
"""
class ChatRequest(BaseModel):
message: str
@app.get("/")
def root():
return {"message": "Yo, this is SpeedAI 🧠 — built by SpeedLab. Send a POST to /chat to start the magic 🚀"}
@app.post("/chat")
def chat(request: ChatRequest):
user_message = request.message
# Replace this with your custom model logic later
sample_replies = [
"Yoo that’s a wild idea 😤 I’m down to help you build it!",
"Lemme think... 🔍 Yup, here’s what you need to do:",
"Aight bet, you just unlocked some futuristic insight 🌌",
"Big vision alert 🚨🔥 I’m loving the energy!",
]
reply = f"{random.choice(sample_replies)}\n\n⚡ {user_message.upper()} is about to go viral. Let's build this."
return {
"system": SYSTEM_PROMPT.strip(),
"response": reply
}
|