Spaces:
Running
Running
Upload main.py
Browse files
main.py
CHANGED
@@ -84,6 +84,7 @@ SOURCE_WAIFU_URL = os.environ["SOURCE_WAIFU_URL"]
|
|
84 |
SOURCE_TIKTOK_WTF_URL = os.environ["SOURCE_TIKTOK_WTF_URL"]
|
85 |
SOURCE_TIKTOK_TECH_URL = os.environ["SOURCE_TIKTOK_TECH_URL"]
|
86 |
SOURCE_CALLI_GRAPHY_URL = os.environ["SOURCE_CALLI_GRAPHY_URL"]
|
|
|
87 |
|
88 |
client_mongo = MongoClient(MONGO_URL)
|
89 |
db = client_mongo["tiktokbot"]
|
@@ -586,6 +587,25 @@ def chatbot(
|
|
586 |
except:
|
587 |
return {"status": "false", "message": "Error response."}
|
588 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
@app.get("/ryuzaki/waifu")
|
590 |
def waifu_pics(
|
591 |
types: str="sfw",
|
|
|
84 |
SOURCE_TIKTOK_WTF_URL = os.environ["SOURCE_TIKTOK_WTF_URL"]
|
85 |
SOURCE_TIKTOK_TECH_URL = os.environ["SOURCE_TIKTOK_TECH_URL"]
|
86 |
SOURCE_CALLI_GRAPHY_URL = os.environ["SOURCE_CALLI_GRAPHY_URL"]
|
87 |
+
SOURCE_WHAT_GAY_URL = os.environ["SOURCE_WHAT_GAY_URL"]
|
88 |
|
89 |
client_mongo = MongoClient(MONGO_URL)
|
90 |
db = client_mongo["tiktokbot"]
|
|
|
587 |
except:
|
588 |
return {"status": "false", "message": "Error response."}
|
589 |
|
590 |
+
@app.get("/ryuzaki/llama")
|
591 |
+
def get_llama(query: str):
|
592 |
+
api_url = SOURCE_WHAT_GAY_URL
|
593 |
+
params = {"query": query}
|
594 |
+
x = requests.get(f"{api_url}/llama", params=params)
|
595 |
+
if x.status_code != 200:
|
596 |
+
return "Error api request"
|
597 |
+
try:
|
598 |
+
y = x.json()
|
599 |
+
response = y["answer"]
|
600 |
+
return {
|
601 |
+
"status": "true",
|
602 |
+
"randydev":{
|
603 |
+
"message": response
|
604 |
+
}
|
605 |
+
}
|
606 |
+
except:
|
607 |
+
return {"status": "false", "message": "Error response."}
|
608 |
+
|
609 |
@app.get("/ryuzaki/waifu")
|
610 |
def waifu_pics(
|
611 |
types: str="sfw",
|