Spaces:
Paused
Paused
Upload 19 files
Browse files- Dockerfile +1 -1
- README.md +4 -6
- functions.py +1 -1
- main.py +380 -877
- requirements.txt +2 -3
Dockerfile
CHANGED
|
@@ -18,4 +18,4 @@ COPY . .
|
|
| 18 |
RUN pip3 install --upgrade pip setuptools
|
| 19 |
RUN pip3 install -r requirements.txt
|
| 20 |
|
| 21 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 18 |
RUN pip3 install --upgrade pip setuptools
|
| 19 |
RUN pip3 install -r requirements.txt
|
| 20 |
|
| 21 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
README.md
CHANGED
|
@@ -1,10 +1,8 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: π
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
-
---
|
| 9 |
-
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: UFoP Api
|
| 3 |
emoji: π
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
+
---
|
|
|
|
|
|
functions.py
CHANGED
|
@@ -29,4 +29,4 @@ def ryuzaki_ai_text(text):
|
|
| 29 |
API_URL = SOURCE_ALPHA_URL
|
| 30 |
headers = {"Authorization": f"Bearer {HUGGING_TOKEN}"}
|
| 31 |
response = requests.post(API_URL, headers=headers, json={"inputs": text})
|
| 32 |
-
return response.json()
|
|
|
|
| 29 |
API_URL = SOURCE_ALPHA_URL
|
| 30 |
headers = {"Authorization": f"Bearer {HUGGING_TOKEN}"}
|
| 31 |
response = requests.post(API_URL, headers=headers, json={"inputs": text})
|
| 32 |
+
return response.json()
|
main.py
CHANGED
|
@@ -25,19 +25,17 @@ import uvicorn
|
|
| 25 |
import os
|
| 26 |
import shutil
|
| 27 |
import random
|
|
|
|
| 28 |
import tempfile
|
| 29 |
import io
|
| 30 |
-
import openai
|
| 31 |
from io import BytesIO
|
| 32 |
from datetime import datetime as dt
|
| 33 |
from dotenv import load_dotenv
|
| 34 |
from bs4 import BeautifulSoup
|
| 35 |
|
| 36 |
-
from typing import
|
| 37 |
from typing_extensions import Annotated
|
| 38 |
from typing import Annotated, Union
|
| 39 |
-
from typing import Optional, List, Dict, Any
|
| 40 |
-
|
| 41 |
|
| 42 |
from pydantic import BaseModel
|
| 43 |
from base64 import b64decode as kc
|
|
@@ -49,10 +47,9 @@ from telegraph import Telegraph, upload_file
|
|
| 49 |
from pathlib import Path
|
| 50 |
from serpapi import GoogleSearch
|
| 51 |
|
| 52 |
-
from fastapi import FastAPI, UploadFile, File
|
| 53 |
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
|
| 54 |
from fastapi import Depends, FastAPI, HTTPException, status
|
| 55 |
-
from fastapi.openapi.utils import get_openapi
|
| 56 |
from fastapi.responses import StreamingResponse
|
| 57 |
from fastapi import HTTPException
|
| 58 |
from fastapi import FastAPI, Request, Header
|
|
@@ -61,70 +58,50 @@ from fastapi.staticfiles import StaticFiles
|
|
| 61 |
from fastapi.templating import Jinja2Templates
|
| 62 |
from fastapi.responses import FileResponse
|
| 63 |
|
| 64 |
-
from pymongo import MongoClient
|
| 65 |
-
|
| 66 |
from RyuzakiLib.hackertools.chatgpt import RendyDevChat
|
| 67 |
from RyuzakiLib.hackertools.openai_api import OpenAiToken
|
| 68 |
from RyuzakiLib.mental import BadWordsList
|
| 69 |
-
from RyuzakiLib.
|
| 70 |
-
|
| 71 |
-
from bardapi import Bard
|
| 72 |
-
|
| 73 |
-
from models import *
|
| 74 |
-
|
| 75 |
-
from gpytranslate import SyncTranslator
|
| 76 |
|
| 77 |
import logging
|
|
|
|
| 78 |
import functions as code
|
| 79 |
|
| 80 |
logging.basicConfig(level=logging.ERROR)
|
| 81 |
|
| 82 |
-
|
| 83 |
load_dotenv()
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
# source url
|
| 89 |
SOURCE_UNSPLASH_URL = os.environ["SOURCE_UNSPLASH_URL"]
|
| 90 |
SOURCE_OCR_URL = os.environ["SOURCE_OCR_URL"]
|
| 91 |
SOURCE_ALPHA_URL = os.environ["SOURCE_ALPHA_URL"]
|
| 92 |
-
|
| 93 |
-
SOURCE_ANIME_STYLED_URL = os.environ["SOURCE_ANIME_STYLED_URL"]
|
| 94 |
-
SOURCE_WAIFU_URL = os.environ["SOURCE_WAIFU_URL"]
|
| 95 |
SOURCE_TIKTOK_WTF_URL = os.environ["SOURCE_TIKTOK_WTF_URL"]
|
| 96 |
SOURCE_TIKTOK_TECH_URL = os.environ["SOURCE_TIKTOK_TECH_URL"]
|
| 97 |
-
|
| 98 |
-
SOURCE_ASSISTANT_GOOGLE_AI = os.environ["SOURCE_ASSISTANT_GOOGLE_AI"]
|
| 99 |
-
SOURCE_OPENAI_ACCESS_URL = os.environ["SOURCE_OPENAI_ACCESS_URL"]
|
| 100 |
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
HUGGING_TOKEN = os.environ["HUGGING_TOKEN"]
|
| 106 |
-
ASSISTANT_GOOGLE_API_KEYS = os.environ["ASSISTANT_GOOGLE_API_KEYS"]
|
| 107 |
-
#COOKIE_BARD_TOKEN = os.environ["COOKIE_BARD_TOKEN"]
|
| 108 |
-
|
| 109 |
-
client_mongo = MongoClient(MONGO_URL)
|
| 110 |
-
db = client_mongo["tiktokbot"]
|
| 111 |
-
collection = db["users"]
|
| 112 |
-
|
| 113 |
-
trans = SyncTranslator()
|
| 114 |
-
|
| 115 |
-
app = FastAPI(docs_url=None, redoc_url="/")
|
| 116 |
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
def validate_api_key(api_key: str = Header(...)):
|
| 127 |
-
USERS_API_KEYS = get_all_api_keys()
|
| 128 |
if api_key not in USERS_API_KEYS:
|
| 129 |
raise HTTPException(status_code=401, detail="Invalid API key")
|
| 130 |
|
|
@@ -132,151 +109,10 @@ def validate_api_key_only_devs(api_key: str = Header(...)):
|
|
| 132 |
if api_key not in ONLY_DEVELOPER_API_KEYS:
|
| 133 |
raise HTTPException(status_code=401, detail="Invalid API key")
|
| 134 |
|
| 135 |
-
RAMDOM_STATUS = [
|
| 136 |
-
"civilian",
|
| 137 |
-
"wanted",
|
| 138 |
-
"undercover",
|
| 139 |
-
"rogue_agent",
|
| 140 |
-
"innocent",
|
| 141 |
-
"fugitive",
|
| 142 |
-
"covert_operator"
|
| 143 |
-
]
|
| 144 |
-
|
| 145 |
-
def remove_sibyl_system_banned(user_id):
|
| 146 |
-
update_doc = {
|
| 147 |
-
"sibyl_ban": None,
|
| 148 |
-
"reason_sibyl": None,
|
| 149 |
-
"is_banned_sibly": None,
|
| 150 |
-
"date_joined_sib": None,
|
| 151 |
-
"sibyl_userid": None
|
| 152 |
-
}
|
| 153 |
-
return collection.update_one({"user_id": user_id}, {"$unset": update_doc}, upsert=True)
|
| 154 |
-
|
| 155 |
-
def new_sibyl_system_banned(user_id, name, reason, date_joined):
|
| 156 |
-
update_doc = {
|
| 157 |
-
"sibyl_ban": name,
|
| 158 |
-
"reason_sibyl": reason,
|
| 159 |
-
"is_banned_sibly": True,
|
| 160 |
-
"date_joined_sib": date_joined,
|
| 161 |
-
"sibyl_userid": user_id
|
| 162 |
-
}
|
| 163 |
-
return collection.update_one({"user_id": user_id}, {"$set": update_doc}, upsert=True)
|
| 164 |
-
|
| 165 |
-
def get_sibyl_system_banned(user_id):
|
| 166 |
-
user = collection.find_one({"user_id": user_id})
|
| 167 |
-
if user:
|
| 168 |
-
sibyl_name = user.get("sibyl_ban")
|
| 169 |
-
reason = user.get("reason_sibyl")
|
| 170 |
-
is_banned = user.get("is_banned_sibly")
|
| 171 |
-
date_joined = user.get("date_joined_sib")
|
| 172 |
-
sibyl_user_id = user.get("sibyl_userid")
|
| 173 |
-
return sibyl_name, reason, is_banned, date_joined, sibyl_user_id
|
| 174 |
-
else:
|
| 175 |
-
return None
|
| 176 |
-
|
| 177 |
-
def get_all_banned():
|
| 178 |
-
banned_users = []
|
| 179 |
-
|
| 180 |
-
users = collection.find({})
|
| 181 |
-
|
| 182 |
-
for user_id in users:
|
| 183 |
-
reason = user_id.get("reason_sibyl")
|
| 184 |
-
user_id = user_id.get("sibyl_userid")
|
| 185 |
-
banned_users.append({"user_id": user_id, "reason": reason})
|
| 186 |
-
return banned_users
|
| 187 |
-
|
| 188 |
-
def new_profile_clone(
|
| 189 |
-
user_id,
|
| 190 |
-
first_name,
|
| 191 |
-
last_name=None,
|
| 192 |
-
profile_id=None,
|
| 193 |
-
bio=None
|
| 194 |
-
):
|
| 195 |
-
update_doc = {
|
| 196 |
-
"first_name_2": first_name,
|
| 197 |
-
"last_name_2": last_name,
|
| 198 |
-
"profile_id_2": profile_id,
|
| 199 |
-
"bio_2": bio
|
| 200 |
-
}
|
| 201 |
-
collection.update_one({"user_id": user_id}, {"$set": update_doc}, upsert=True)
|
| 202 |
-
|
| 203 |
-
def get_profile_clone(user_id):
|
| 204 |
-
user = collection.find_one({"user_id": user_id})
|
| 205 |
-
if user:
|
| 206 |
-
first_name = user.get("first_name_2")
|
| 207 |
-
last_name = user.get("last_name_2")
|
| 208 |
-
profile_id = user.get("profile_id_2")
|
| 209 |
-
bio = user.get("bio_2")
|
| 210 |
-
return first_name, last_name, profile_id, bio
|
| 211 |
-
else:
|
| 212 |
-
return None
|
| 213 |
-
|
| 214 |
-
@app.post("/ryuzaki/profile-clone", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 215 |
-
def profile_clone(
|
| 216 |
-
item: ProfileClone,
|
| 217 |
-
api_key: None = Depends(validate_api_key)
|
| 218 |
-
):
|
| 219 |
-
if item.user_id == 1191668125:
|
| 220 |
-
return {"status": "false", "message": "Only Developer"}
|
| 221 |
-
|
| 222 |
-
try:
|
| 223 |
-
new_profile_clone(
|
| 224 |
-
user_id=item.user_id,
|
| 225 |
-
first_name=item.first_name,
|
| 226 |
-
last_name=item.last_name,
|
| 227 |
-
profile_id=item.profile_id,
|
| 228 |
-
bio=item.bio
|
| 229 |
-
)
|
| 230 |
-
return SuccessResponse(
|
| 231 |
-
status="True",
|
| 232 |
-
randydev={
|
| 233 |
-
"user_id": item.user_id,
|
| 234 |
-
"first_name": item.first_name,
|
| 235 |
-
"last_name": item.last_name,
|
| 236 |
-
"profile_id": item.profile_id,
|
| 237 |
-
"bio": item.bio
|
| 238 |
-
}
|
| 239 |
-
)
|
| 240 |
-
except Exception as e:
|
| 241 |
-
return ErrorStatus(status="false", message=f"Internal server error: {str(e)}")
|
| 242 |
-
|
| 243 |
-
@app.get("/ryuzaki/get-profile-clone", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 244 |
-
def get_profile_(
|
| 245 |
-
item: GetProfileClone,
|
| 246 |
-
api_key: None = Depends(validate_api_key)
|
| 247 |
-
):
|
| 248 |
-
try:
|
| 249 |
-
first_name, last_name, profile_id, bio = get_profile_clone(item.user_id)
|
| 250 |
-
if last_name is None:
|
| 251 |
-
last_name_str = ""
|
| 252 |
-
else:
|
| 253 |
-
last_name_str = last_name
|
| 254 |
-
if bio is None:
|
| 255 |
-
bio_str = ""
|
| 256 |
-
else:
|
| 257 |
-
bio_str = bio
|
| 258 |
-
if first_name and profile_id:
|
| 259 |
-
return SuccessResponse(
|
| 260 |
-
status="True",
|
| 261 |
-
randydev={
|
| 262 |
-
"user_id": item.user_id,
|
| 263 |
-
"first_name": first_name,
|
| 264 |
-
"last_name": last_name_str,
|
| 265 |
-
"profile_id": profile_id,
|
| 266 |
-
"bio": bio_str
|
| 267 |
-
}
|
| 268 |
-
)
|
| 269 |
-
else:
|
| 270 |
-
return SuccessResponse(
|
| 271 |
-
status="False",
|
| 272 |
-
randydev={"message": "Not found user"}
|
| 273 |
-
)
|
| 274 |
-
except Exception as e:
|
| 275 |
-
return ErrorStatus(status="false", message=f"Internal server error: {str(e)}")
|
| 276 |
|
| 277 |
@app.get("/UFoP/getbanlist")
|
| 278 |
def sibyl_get_all_banlist():
|
| 279 |
-
banned_users = get_all_banned()
|
| 280 |
return {
|
| 281 |
"status": "True",
|
| 282 |
"randydev": {
|
|
@@ -284,7 +120,7 @@ def sibyl_get_all_banlist():
|
|
| 284 |
}
|
| 285 |
}
|
| 286 |
|
| 287 |
-
@app.get("/
|
| 288 |
def blacklist_words():
|
| 289 |
try:
|
| 290 |
BLACKLIST_WORDS = BadWordsList()
|
|
@@ -293,130 +129,128 @@ def blacklist_words():
|
|
| 293 |
except Exception as e:
|
| 294 |
return {"status": "false", "message": f"Internal server error: {str(e)}"}
|
| 295 |
|
| 296 |
-
@app.delete("/UFoP/
|
| 297 |
def sibyl_system_delete(
|
| 298 |
-
|
| 299 |
api_key: None = Depends(validate_api_key_only_devs)
|
| 300 |
):
|
| 301 |
try:
|
| 302 |
-
_, _, _, _, sibyl_user_id = get_sibyl_system_banned(
|
| 303 |
|
| 304 |
if sibyl_user_id:
|
| 305 |
-
remove_sibyl_system_banned(
|
| 306 |
-
return
|
| 307 |
-
status="True",
|
| 308 |
-
randydev={"message": f"Successfully removed {item.user_id} from the Sibyl ban list"}
|
| 309 |
-
)
|
| 310 |
else:
|
| 311 |
-
return
|
| 312 |
-
status="False",
|
| 313 |
-
randydev={"message": "Not Found UserID"}
|
| 314 |
-
)
|
| 315 |
except Exception as e:
|
| 316 |
-
return
|
| 317 |
|
| 318 |
-
@app.post("/UFoP/
|
| 319 |
def sibyl_system_ban(
|
| 320 |
-
|
|
|
|
| 321 |
api_key: None = Depends(validate_api_key_only_devs)
|
| 322 |
):
|
| 323 |
-
if
|
| 324 |
return {"status": "false", "message": "Only Developer"}
|
| 325 |
|
| 326 |
try:
|
| 327 |
date_joined = str(dt.now())
|
| 328 |
-
sibyl_ban = random.choice(RAMDOM_STATUS)
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
if
|
|
|
|
| 332 |
return {"status": "false", "message": "User is already banned"}
|
| 333 |
|
| 334 |
-
new_sibyl_system_banned(
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
|
|
|
| 339 |
"sibyl_name": sibyl_ban,
|
| 340 |
-
"reason":
|
| 341 |
"date_joined": date_joined,
|
| 342 |
-
"message": f"Successfully banned {
|
| 343 |
}
|
| 344 |
-
|
| 345 |
except Exception as e:
|
| 346 |
-
|
|
|
|
| 347 |
|
| 348 |
-
@app.get("/UFoP/
|
| 349 |
def sibyl_system(
|
| 350 |
-
|
| 351 |
-
api_key: None = Depends(validate_api_key)
|
| 352 |
):
|
| 353 |
-
|
| 354 |
-
if
|
| 355 |
-
sibyl_name, reason, is_banned, date_joined, sibyl_user_id =
|
| 356 |
-
return
|
| 357 |
-
status
|
| 358 |
-
randydev
|
| 359 |
"sibyl_name": sibyl_name,
|
| 360 |
"reason": reason,
|
| 361 |
"is_banned": is_banned,
|
| 362 |
"date_joined": date_joined,
|
| 363 |
"sibyl_user_id": sibyl_user_id
|
| 364 |
}
|
| 365 |
-
|
| 366 |
else:
|
| 367 |
-
return
|
| 368 |
-
status="false",
|
| 369 |
-
randydev={
|
| 370 |
-
"message": "Not found user"
|
| 371 |
-
}
|
| 372 |
-
)
|
| 373 |
|
| 374 |
-
@app.get("/ryuzaki/
|
| 375 |
-
def
|
| 376 |
-
|
|
|
|
| 377 |
):
|
| 378 |
try:
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 389 |
|
| 390 |
-
@app.get("/ryuzaki/translate", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 391 |
-
def get_translate(
|
| 392 |
-
item: TranslateCustom,
|
| 393 |
-
):
|
| 394 |
try:
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
| 398 |
-
|
| 399 |
-
randydev={
|
| 400 |
-
"translation": translation.text,
|
| 401 |
-
"translation_original": item.text
|
| 402 |
-
}
|
| 403 |
-
)
|
| 404 |
-
except:
|
| 405 |
-
return SuccessResponse(
|
| 406 |
-
status="True",
|
| 407 |
-
randydev={"message": "Error not responding"})
|
| 408 |
|
| 409 |
-
|
|
|
|
|
|
|
| 410 |
def google_reverse(
|
| 411 |
-
|
|
|
|
|
|
|
|
|
|
| 412 |
api_key: None = Depends(validate_api_key)
|
| 413 |
):
|
| 414 |
params = {
|
| 415 |
"api_key": REVERSE_IMAGE_API,
|
| 416 |
-
"engine":
|
| 417 |
-
"image_url":
|
| 418 |
-
"hl":
|
| 419 |
-
"gl":
|
| 420 |
}
|
| 421 |
try:
|
| 422 |
search = GoogleSearch(params)
|
|
@@ -425,28 +259,30 @@ def google_reverse(
|
|
| 425 |
total_time_taken = results["search_metadata"]["total_time_taken"]
|
| 426 |
create_at = results["search_metadata"]["created_at"]
|
| 427 |
processed_at = results["search_metadata"]["processed_at"]
|
| 428 |
-
return
|
| 429 |
-
status
|
| 430 |
-
randydev
|
| 431 |
"link": link,
|
| 432 |
"total_time_taken": total_time_taken,
|
| 433 |
"create_at": create_at,
|
| 434 |
"processed_at": processed_at
|
| 435 |
}
|
| 436 |
-
|
| 437 |
-
except Exception:
|
| 438 |
-
return {"status": "false", "message": "
|
| 439 |
|
| 440 |
-
@app.get("/ryuzaki/ocr"
|
| 441 |
def ocr_space_url(
|
| 442 |
-
|
|
|
|
|
|
|
| 443 |
api_key: None = Depends(validate_api_key)
|
| 444 |
):
|
| 445 |
payload = {
|
| 446 |
-
"url":
|
| 447 |
-
"isOverlayRequired":
|
| 448 |
"apikey": OCR_API_KEY,
|
| 449 |
-
"language":
|
| 450 |
}
|
| 451 |
try:
|
| 452 |
response = requests.post(SOURCE_OCR_URL, data=payload)
|
|
@@ -457,403 +293,53 @@ def ocr_space_url(
|
|
| 457 |
try:
|
| 458 |
parsed_response = json.loads(test_url)
|
| 459 |
if "ParsedResults" in parsed_response and len(parsed_response["ParsedResults"]) > 0:
|
| 460 |
-
return
|
| 461 |
-
status
|
| 462 |
-
randydev
|
| 463 |
"text": parsed_response["ParsedResults"][0]["ParsedText"]
|
| 464 |
}
|
| 465 |
-
|
| 466 |
else:
|
| 467 |
return {"status": "false", "message": "Error response."}
|
| 468 |
except (json.JSONDecodeError, KeyError):
|
| 469 |
return "Error parsing the OCR response."
|
| 470 |
|
| 471 |
-
@app.get("/ryuzaki/
|
| 472 |
-
def
|
| 473 |
-
|
| 474 |
-
response = RendyDevChat(item.query).get_response_beta(joke=True)
|
| 475 |
-
return SuccessResponse(
|
| 476 |
-
status="True",
|
| 477 |
-
randydev={
|
| 478 |
-
"message": response
|
| 479 |
-
}
|
| 480 |
-
)
|
| 481 |
-
except:
|
| 482 |
-
return {"status": "false", "message": "Error response."}
|
| 483 |
-
|
| 484 |
-
@app.get("/ryuzaki/freechatgpt-bing", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 485 |
-
def free_chatgpt4_bing(item: ChatgptCustom):
|
| 486 |
-
try:
|
| 487 |
-
response = RendyDevChat(query).get_response_bing(bing=True)
|
| 488 |
-
return SuccessResponse(
|
| 489 |
-
status="True",
|
| 490 |
-
randydev={
|
| 491 |
-
"message": response
|
| 492 |
-
}
|
| 493 |
-
)
|
| 494 |
-
except:
|
| 495 |
-
return {"status": "false", "message": "Error response."}
|
| 496 |
-
|
| 497 |
-
@app.post("/ryuzaki/ai", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 498 |
-
def ryuzaki_ai(
|
| 499 |
-
item: RyuzakiAi,
|
| 500 |
-
api_key: None = Depends(validate_api_key)
|
| 501 |
-
):
|
| 502 |
-
try:
|
| 503 |
-
response_data = code.ryuzaki_ai_text(item.text)
|
| 504 |
-
|
| 505 |
-
if isinstance(response_data, list) and len(response_data) > 0:
|
| 506 |
-
first_result = response_data[0]
|
| 507 |
-
if "generated_text" in first_result:
|
| 508 |
-
message = first_result["generated_text"]
|
| 509 |
-
return SuccessResponse(
|
| 510 |
-
status="True",
|
| 511 |
-
randydev={
|
| 512 |
-
"ryuzaki_text": message
|
| 513 |
-
}
|
| 514 |
-
)
|
| 515 |
-
return {"status": "false", "message": "Invalid response format"}
|
| 516 |
-
|
| 517 |
-
except Exception:
|
| 518 |
-
return {"status": "false", "message": "Internal server error"}
|
| 519 |
-
|
| 520 |
-
@app.post("/ryuzaki/opendalle")
|
| 521 |
-
def open_dalle(
|
| 522 |
-
item: OpenDalle,
|
| 523 |
api_key: None = Depends(validate_api_key)
|
| 524 |
):
|
| 525 |
-
API_URL = SOURCE_OPENDALLE_URL
|
| 526 |
-
try:
|
| 527 |
-
payload = {"inputs": item.query}
|
| 528 |
-
headers = {"Authorization": f"Bearer {HUGGING_TOKEN}"}
|
| 529 |
-
response = requests.post(API_URL, headers=headers, json=payload)
|
| 530 |
-
response.raise_for_status()
|
| 531 |
-
except requests.exceptions.RequestException:
|
| 532 |
-
raise HTTPException(
|
| 533 |
-
status_code=500,
|
| 534 |
-
detail=CustomErrorResponseModel(detail=[{}])
|
| 535 |
-
)
|
| 536 |
try:
|
| 537 |
-
|
| 538 |
-
|
| 539 |
-
|
| 540 |
-
status_code=500,
|
| 541 |
-
detail=CustomErrorResponseModel(detail=[{}])
|
| 542 |
)
|
| 543 |
-
|
| 544 |
-
|
| 545 |
-
|
| 546 |
-
|
| 547 |
-
|
| 548 |
-
@app.post("/ryuzaki/anime-styled")
|
| 549 |
-
def Anime_Styled(
|
| 550 |
-
item: AnimeStyled,
|
| 551 |
-
api_key: None = Depends(validate_api_key)
|
| 552 |
-
):
|
| 553 |
-
API_URL = SOURCE_ANIME_STYLED_URL
|
| 554 |
-
try:
|
| 555 |
-
payload = {"inputs": item.query}
|
| 556 |
-
headers = {"Authorization": f"Bearer {HUGGING_TOKEN}"}
|
| 557 |
-
response = requests.post(API_URL, headers=headers, json=payload)
|
| 558 |
-
response.raise_for_status()
|
| 559 |
-
except requests.exceptions.RequestException:
|
| 560 |
-
raise HTTPException(
|
| 561 |
-
status_code=500,
|
| 562 |
-
detail=CustomErrorResponseModel(detail=[{}])
|
| 563 |
-
)
|
| 564 |
-
try:
|
| 565 |
-
encoded_string = base64.b64encode(response.content).decode("utf-8")
|
| 566 |
-
except Exception:
|
| 567 |
-
raise HTTPException(
|
| 568 |
-
status_code=500,
|
| 569 |
-
detail=CustomErrorResponseModel(detail=[{}])
|
| 570 |
-
)
|
| 571 |
-
if encoded_string:
|
| 572 |
-
return SuccessResponse(status="True", randydev={"data": encoded_string})
|
| 573 |
-
else:
|
| 574 |
-
return SuccessResponse(status="False", randydev={"data": "Not found image data"})
|
| 575 |
-
|
| 576 |
-
@app.post("/ryuzaki/unsplash")
|
| 577 |
-
def image_unsplash(item: GetImageUnsplash):
|
| 578 |
-
url = SOURCE_UNSPLASH_URL
|
| 579 |
-
image_url = f"{url}/?{item.query}/{item.size}"
|
| 580 |
-
try:
|
| 581 |
-
response = requests.get(image_url)
|
| 582 |
-
response.raise_for_status()
|
| 583 |
-
except requests.exceptions.RequestException:
|
| 584 |
-
raise HTTPException(
|
| 585 |
-
status_code=500,
|
| 586 |
-
detail=CustomErrorResponseModel(detail=[{}])
|
| 587 |
-
)
|
| 588 |
-
try:
|
| 589 |
-
encoded_string = base64.b64encode(response.content).decode("utf-8")
|
| 590 |
-
except Exception:
|
| 591 |
-
raise HTTPException(
|
| 592 |
-
status_code=500,
|
| 593 |
-
detail=CustomErrorResponseModel(detail=[{}])
|
| 594 |
-
)
|
| 595 |
-
if encoded_string:
|
| 596 |
-
return SuccessResponse(status="True", randydev={"data": encoded_string})
|
| 597 |
-
else:
|
| 598 |
-
return SuccessResponse(status="False", randydev={"data": "Not found image data"})
|
| 599 |
-
|
| 600 |
-
@app.post("/ryuzaki/chatgpt-model", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 601 |
-
def chatgpt_model(item: ChatgptModel):
|
| 602 |
-
url = "https://lexica.qewertyy.me/models"
|
| 603 |
-
if item.is_models:
|
| 604 |
-
params = {"model_id": item.model_id, "prompt": item.query}
|
| 605 |
-
response = requests.post(url, params=params)
|
| 606 |
-
if response.status_code != 200:
|
| 607 |
-
return f"Error status: {response.status_code}"
|
| 608 |
-
check_response = response.json()
|
| 609 |
-
answer = check_response.get("content")
|
| 610 |
-
return SuccessResponse(
|
| 611 |
-
status="True",
|
| 612 |
-
randydev={"message": answer}
|
| 613 |
-
)
|
| 614 |
-
else:
|
| 615 |
-
params = {"model_id": 5, "prompt": item.query}
|
| 616 |
-
response = requests.post(url, params=params)
|
| 617 |
-
if response.status_code != 200:
|
| 618 |
-
return f"Error status: {response.status_code}"
|
| 619 |
-
check_response = response.json()
|
| 620 |
-
answer = check_response.get("content")
|
| 621 |
-
return SuccessResponse(
|
| 622 |
-
status="True",
|
| 623 |
-
randydev={"message": answer}
|
| 624 |
-
)
|
| 625 |
-
|
| 626 |
-
@app.post("/ryuzaki/chatgpt3-turbo", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 627 |
-
def chatgpt3_turbo(item: Chatgpt3Texts):
|
| 628 |
-
if item.is_openai_original:
|
| 629 |
-
try:
|
| 630 |
-
GPTbase = SOURCE_OPENAI_ACCESS_URL
|
| 631 |
-
response = OpenAiToken(api_key=item.api_key, api_base=GPTbase).chat_message_turbo(
|
| 632 |
-
query=item.query,
|
| 633 |
-
model=item.model,
|
| 634 |
-
is_stream=item.is_stream
|
| 635 |
-
)
|
| 636 |
-
answer = response[0]
|
| 637 |
-
continue_chat = response[1]
|
| 638 |
-
return SuccessResponse(
|
| 639 |
-
status="True",
|
| 640 |
-
randydev={
|
| 641 |
-
"message": answer,
|
| 642 |
-
"chat_history": continue_chat
|
| 643 |
-
}
|
| 644 |
-
)
|
| 645 |
-
except Exception as e:
|
| 646 |
-
return SuccessResponse(status="False", randydev={"message": f"Error responding: {e}"})
|
| 647 |
-
else:
|
| 648 |
-
url = "https://lexica.qewertyy.me/models"
|
| 649 |
-
params = {"model_id": 5, "prompt": item.query}
|
| 650 |
-
response = requests.post(url, params=params)
|
| 651 |
-
if response.status_code != 200:
|
| 652 |
-
return f"Error status: {response.status_code}"
|
| 653 |
-
check_response = response.json()
|
| 654 |
-
answer = check_response.get("content")
|
| 655 |
-
return SuccessResponse(
|
| 656 |
-
status="True",
|
| 657 |
-
randydev={"message": answer}
|
| 658 |
-
)
|
| 659 |
-
|
| 660 |
-
@app.post("/ryuzaki/chatgpt4-turbo", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 661 |
-
def chatgpt4_turbo(
|
| 662 |
-
item: OpenaiTexts,
|
| 663 |
-
api_key: None = Depends(validate_api_key)
|
| 664 |
-
):
|
| 665 |
-
try:
|
| 666 |
-
GPTbase = SOURCE_OPENAI_ACCESS_URL
|
| 667 |
-
response = OpenAiToken(api_key=item.api_key, api_base=GPTbase).chat_message_turbo(
|
| 668 |
-
query=item.query,
|
| 669 |
-
model=item.model,
|
| 670 |
-
is_stream=item.is_stream
|
| 671 |
-
)
|
| 672 |
-
if item.model == "gpt-5":
|
| 673 |
-
return SuccessResponse(status="False", randydev={"message": "Coming Soon in 2024"})
|
| 674 |
-
elif item.model == "gpt-5-turbo":
|
| 675 |
-
return SuccessResponse(status="False", randydev={"message": "Coming Soon in 2024"})
|
| 676 |
-
elif item.model == "gpt-5-plus":
|
| 677 |
-
return SuccessResponse(status="False", randydev={"message": "Coming Soon in 2024"})
|
| 678 |
-
answer = response[0]
|
| 679 |
-
continue_chat = response[1]
|
| 680 |
-
return SuccessResponse(
|
| 681 |
-
status="True",
|
| 682 |
-
randydev={
|
| 683 |
-
"message": answer,
|
| 684 |
-
"chat_history": continue_chat
|
| 685 |
-
}
|
| 686 |
-
)
|
| 687 |
-
except Exception as e:
|
| 688 |
-
return SuccessResponse(status="False", randydev={"message": f"Error responding: {e}"})
|
| 689 |
-
|
| 690 |
-
@app.post("/ryuzaki/google-ai", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 691 |
-
def v1beta3_google_ai(
|
| 692 |
-
item: ChatgptCustom,
|
| 693 |
-
api_key: None = Depends(validate_api_key)
|
| 694 |
-
):
|
| 695 |
-
url = SOURCE_ASSISTANT_GOOGLE_AI
|
| 696 |
-
token = ASSISTANT_GOOGLE_API_KEYS
|
| 697 |
-
api_url = f"{SOURCE_ASSISTANT_GOOGLE_AI}/v1beta3/models/text-bison-001:generateText?key={ASSISTANT_GOOGLE_API_KEYS}"
|
| 698 |
-
try:
|
| 699 |
-
headers = {"Content-Type": "application/json"}
|
| 700 |
-
data = {
|
| 701 |
-
"prompt": {
|
| 702 |
-
"text": item.query
|
| 703 |
}
|
| 704 |
}
|
| 705 |
-
response = requests.post(api_url, headers=headers, json=data)
|
| 706 |
-
response_str = response.json()
|
| 707 |
-
answer = response_str["candidates"]
|
| 708 |
-
for results in answer:
|
| 709 |
-
message = results.get("output")
|
| 710 |
-
return SuccessResponse(
|
| 711 |
-
status="True",
|
| 712 |
-
randydev={
|
| 713 |
-
"message": message
|
| 714 |
-
}
|
| 715 |
-
)
|
| 716 |
except:
|
| 717 |
return {"status": "false", "message": "Error response."}
|
| 718 |
|
| 719 |
-
|
| 720 |
-
|
| 721 |
-
|
| 722 |
-
|
| 723 |
-
|
| 724 |
-
#):
|
| 725 |
-
# if item.is_login:
|
| 726 |
-
# token = item.bard_api_key
|
| 727 |
-
# else:
|
| 728 |
-
# token = COOKIE_BARD_TOKEN
|
| 729 |
-
# owner_base = f"""
|
| 730 |
-
# Your name is Randy Dev. A kind and friendly AI assistant that answers in
|
| 731 |
-
# a short and concise answer. Give short step-by-step reasoning if required.
|
| 732 |
-
#
|
| 733 |
-
# Today is {dt.now():%A %d %B %Y %H:%M}
|
| 734 |
-
# """
|
| 735 |
-
# try:
|
| 736 |
-
# session = requests.Session()
|
| 737 |
-
# session.headers = {
|
| 738 |
-
# "Host": "bard.google.com",
|
| 739 |
-
# "X-Same-Domain": "1",
|
| 740 |
-
# "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36",
|
| 741 |
-
# "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
| 742 |
-
# "Origin": "https://bard.google.com",
|
| 743 |
-
# "Referer": "https://bard.google.com/"
|
| 744 |
-
# }
|
| 745 |
-
# session.cookies.set("__Secure-1PSID", token)
|
| 746 |
-
# bard = Bard(token=token, session=session, timeout=30)
|
| 747 |
-
# bard.get_answer(owner_base)["content"]
|
| 748 |
-
# message = bard.get_answer(item.query)["content"]
|
| 749 |
-
# return SuccessResponse(
|
| 750 |
-
# status="True",
|
| 751 |
-
# randydev={
|
| 752 |
-
# "message": message
|
| 753 |
-
# }
|
| 754 |
-
# )
|
| 755 |
-
# except:
|
| 756 |
-
# return {"status": "false", "message": "Error response."}
|
| 757 |
-
|
| 758 |
-
@app.post("/ryuzaki/v1beta2-google-ai", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 759 |
-
def v1beta2_google_ai(
|
| 760 |
-
item: ChatgptCustom,
|
| 761 |
-
api_key: None = Depends(validate_api_key)
|
| 762 |
):
|
| 763 |
-
url = SOURCE_ASSISTANT_GOOGLE_AI
|
| 764 |
-
token = ASSISTANT_GOOGLE_API_KEYS
|
| 765 |
-
api_url = f"{SOURCE_ASSISTANT_GOOGLE_AI}/v1beta2/models/chat-bison-001:generateMessage?key={ASSISTANT_GOOGLE_API_KEYS}"
|
| 766 |
try:
|
| 767 |
-
|
| 768 |
-
|
| 769 |
-
"
|
| 770 |
-
|
| 771 |
-
|
| 772 |
-
response = requests.post(api_url, headers=headers, json=data)
|
| 773 |
-
response_str = response.json()
|
| 774 |
-
answer = response_str["candidates"]
|
| 775 |
-
for results in answer:
|
| 776 |
-
message = results.get("content")
|
| 777 |
-
return SuccessResponse(
|
| 778 |
-
status="True",
|
| 779 |
-
randydev={
|
| 780 |
-
"message": message
|
| 781 |
}
|
| 782 |
-
|
| 783 |
except:
|
| 784 |
return {"status": "false", "message": "Error response."}
|
| 785 |
|
| 786 |
-
#@app.post("/ryuzaki/new-monitor", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 787 |
-
#def new_monitor(
|
| 788 |
-
# item: NewMonitor,
|
| 789 |
-
# api_key: None = Depends(validate_api_key)
|
| 790 |
-
#):
|
| 791 |
-
# urls = SOURCE_MONITOR_URL
|
| 792 |
-
# token = MONITOR_API_KEYS
|
| 793 |
-
# api_url = f"{urls}/newMonitor"
|
| 794 |
-
# try:
|
| 795 |
-
# headers = {
|
| 796 |
-
# "content-type": "application/x-www-form-urlencoded",
|
| 797 |
-
# "cache-control": "no-cache"
|
| 798 |
-
# }
|
| 799 |
-
# payload = {
|
| 800 |
-
# "api_key": token,
|
| 801 |
-
# "format": "json",
|
| 802 |
-
# "type": item.type,
|
| 803 |
-
# "url": item.url,
|
| 804 |
-
# "friendly_name": item.friendly_name
|
| 805 |
-
# }
|
| 806 |
-
# response = requests.post(api_url, data=payload, headers=headers)
|
| 807 |
-
# response_str = response.json()
|
| 808 |
-
# status_ok = response_str["stat"]
|
| 809 |
-
# monitor_id = response_str["monitor"].get("id")
|
| 810 |
-
# monitor_status = response_str["monitor"].get("status")
|
| 811 |
-
# return {
|
| 812 |
-
# "status": "true",
|
| 813 |
-
# "randydev":{
|
| 814 |
-
# "status_ok": status_ok,
|
| 815 |
-
# "monitor_id": monitor_id,
|
| 816 |
-
# "monitor_status": monitor_status
|
| 817 |
-
# }
|
| 818 |
-
# }
|
| 819 |
-
# except:
|
| 820 |
-
# return {"status": "false", "message": "Error response."}
|
| 821 |
-
|
| 822 |
-
#@app.post("/ryuzaki/get-monitors", response_model=SuccessResponse, responses={422: {"model": ErrorResponse}})
|
| 823 |
-
#def getMonitors(
|
| 824 |
-
# item: GetMonitorLogs,
|
| 825 |
-
# api_key: None = Depends(validate_api_key)
|
| 826 |
-
#):
|
| 827 |
-
# url = SOURCE_MONITOR_URL
|
| 828 |
-
# token = MONITOR_API_KEYS
|
| 829 |
-
# api_url = f"{url}/getMonitors"
|
| 830 |
-
# try:
|
| 831 |
-
# headers = {
|
| 832 |
-
# "content-type": "application/x-www-form-urlencoded",
|
| 833 |
-
# "cache-control": "no-cache"
|
| 834 |
-
# }
|
| 835 |
-
# payload = {
|
| 836 |
-
# "api_key": token,
|
| 837 |
-
# "format": "json",
|
| 838 |
-
# "logs": item.logs
|
| 839 |
-
# }
|
| 840 |
-
# response = requests.post(api_url, data=payload, headers=headers)
|
| 841 |
-
# response_str = response.json()
|
| 842 |
-
# data = response_str["monitors"]
|
| 843 |
-
# url_list = []
|
| 844 |
-
# for x in data:
|
| 845 |
-
# url = x.get("url")
|
| 846 |
-
# if url:
|
| 847 |
-
# url_list.append(url)
|
| 848 |
-
# return {
|
| 849 |
-
# "status": "true",
|
| 850 |
-
# "randydev":{
|
| 851 |
-
# "url": url_list,
|
| 852 |
-
# }
|
| 853 |
-
# }
|
| 854 |
-
# except:
|
| 855 |
-
# return {"status": "false", "message": "Error response."}
|
| 856 |
-
|
| 857 |
async def get_data(username):
|
| 858 |
base_msg = ""
|
| 859 |
async with AsyncClient() as gpx:
|
|
@@ -882,10 +368,10 @@ async def get_data(username):
|
|
| 882 |
base_msg += f"**An error occured while parsing the data!** \n\n**Traceback:** \n `{e}` \n\n`Make sure that you've sent the command with the correct username!`"
|
| 883 |
return [base_msg, "https://telegra.ph//file/32f69c18190666ea96553.jpg"]
|
| 884 |
|
| 885 |
-
@app.get("/ryuzaki/github"
|
| 886 |
-
async def github(
|
| 887 |
try:
|
| 888 |
-
details = await get_data(
|
| 889 |
return {
|
| 890 |
"status": "true",
|
| 891 |
"randydev":{
|
|
@@ -896,10 +382,16 @@ async def github(item: GithubUsernames):
|
|
| 896 |
except:
|
| 897 |
return {"status": "false", "message": "Error response."}
|
| 898 |
|
| 899 |
-
@app.get("/ryuzaki/webshot"
|
| 900 |
-
def webshot(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 901 |
try:
|
| 902 |
-
required_url = f"https://mini.s-shot.ru/{
|
| 903 |
return {
|
| 904 |
"status": "true",
|
| 905 |
"randydev":{
|
|
@@ -909,14 +401,19 @@ def webshot(item: Webshot):
|
|
| 909 |
except:
|
| 910 |
return {"status": "false", "message": "Error response."}
|
| 911 |
|
| 912 |
-
@app.get("/ryuzaki/chatbot"
|
| 913 |
-
def chatbot(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 914 |
api_url = b64decode("aHR0cHM6Ly9hcGkuc2Fmb25lLmRldi9jaGF0Ym90").decode("utf-8")
|
| 915 |
params = {
|
| 916 |
-
"query":
|
| 917 |
-
"user_id":
|
| 918 |
-
"bot_name":
|
| 919 |
-
"bot_master":
|
| 920 |
}
|
| 921 |
x = requests.get(f"{api_url}", params=params)
|
| 922 |
if x.status_code != 200:
|
|
@@ -933,29 +430,13 @@ def chatbot(item: ChatBots):
|
|
| 933 |
except:
|
| 934 |
return {"status": "false", "message": "Error response."}
|
| 935 |
|
| 936 |
-
@app.get("/ryuzaki/
|
| 937 |
-
def
|
| 938 |
-
|
| 939 |
-
|
| 940 |
-
|
| 941 |
-
|
| 942 |
-
|
| 943 |
-
try:
|
| 944 |
-
y = x.json()
|
| 945 |
-
response = y["answer"]
|
| 946 |
-
return {
|
| 947 |
-
"status": "true",
|
| 948 |
-
"randydev":{
|
| 949 |
-
"message": response
|
| 950 |
-
}
|
| 951 |
-
}
|
| 952 |
-
except:
|
| 953 |
-
return {"status": "false", "message": "Error response."}
|
| 954 |
-
|
| 955 |
-
@app.get("/ryuzaki/waifu", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
| 956 |
-
def waifu_pics(item: WaifuPics):
|
| 957 |
-
waifu_api = f"{SOURCE_WAIFU_URL}/{item.types}"
|
| 958 |
-
waifu_param = f"{waifu_api}/{item.category}"
|
| 959 |
|
| 960 |
response = requests.get(waifu_param)
|
| 961 |
|
|
@@ -967,40 +448,42 @@ def waifu_pics(item: WaifuPics):
|
|
| 967 |
except Exception as e:
|
| 968 |
return f"Error request {e}"
|
| 969 |
if waifu_image_url:
|
| 970 |
-
|
| 971 |
-
try:
|
| 972 |
-
response_two = requests.get(waifu_image_url)
|
| 973 |
-
response_two.raise_for_status()
|
| 974 |
-
except requests.exceptions.RequestException:
|
| 975 |
-
raise HTTPException(status_code=500, detail="Internal server error")
|
| 976 |
-
return StreamingResponse(BytesIO(response_two.content), media_type=item.media_type)
|
| 977 |
-
else:
|
| 978 |
return {
|
| 979 |
"status": "true",
|
| 980 |
"randydev":{
|
| 981 |
"image_url": waifu_image_url
|
| 982 |
}
|
| 983 |
}
|
|
|
|
|
|
|
| 984 |
else:
|
| 985 |
return {"status": "false", "message": "Error response."}
|
| 986 |
|
| 987 |
-
@app.get("/ryuzaki/rayso"
|
| 988 |
-
def make_rayso(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 989 |
trans = SyncTranslator()
|
| 990 |
api_url = b64decode("aHR0cHM6Ly9hcGkuc2Fmb25lLm1lL3JheXNv").decode("utf-8")
|
| 991 |
-
if
|
| 992 |
-
source = trans.detect(
|
| 993 |
-
translation = trans(
|
| 994 |
code = translation.text
|
| 995 |
else:
|
| 996 |
-
code =
|
| 997 |
-
if
|
| 998 |
x = requests.post(
|
| 999 |
f"{api_url}",
|
| 1000 |
json={
|
| 1001 |
"code": code,
|
| 1002 |
-
"title":
|
| 1003 |
-
"theme":
|
| 1004 |
"darkMode": True
|
| 1005 |
}
|
| 1006 |
)
|
|
@@ -1022,8 +505,8 @@ def make_rayso(item: MakeRayso):
|
|
| 1022 |
f"{api_url}",
|
| 1023 |
json={
|
| 1024 |
"code": code,
|
| 1025 |
-
"title":
|
| 1026 |
-
"theme":
|
| 1027 |
"darkMode": False
|
| 1028 |
}
|
| 1029 |
)
|
|
@@ -1088,11 +571,11 @@ def whois_ip_address(ip_address: str=None):
|
|
| 1088 |
else:
|
| 1089 |
return {"status": "false", "message": "Invalid ip address"}
|
| 1090 |
|
| 1091 |
-
@app.get("/ryuzaki/tiktok_douyin"
|
| 1092 |
-
def tiktok_douyin(
|
| 1093 |
-
response = requests.get(f"{SOURCE_TIKTOK_WTF_URL}={
|
| 1094 |
if response.status_code != 200:
|
| 1095 |
-
return "
|
| 1096 |
try:
|
| 1097 |
download_video = response.json()["aweme_list"][0]["video"]["play_addr"]["url_list"][0]
|
| 1098 |
download_audio = response.json()["aweme_list"][0]["music"]["play_url"]["url_list"][0]
|
|
@@ -1112,10 +595,10 @@ def tiktok_douyin(item: TiktokDownloader):
|
|
| 1112 |
except:
|
| 1113 |
return {"status": "false", "message": "Error request"}
|
| 1114 |
|
| 1115 |
-
@app.get("/ryuzaki/tiktok"
|
| 1116 |
-
def tiktok_downloader(
|
| 1117 |
api_devs = SOURCE_TIKTOK_TECH_URL
|
| 1118 |
-
parameter = f"tiktok?url={
|
| 1119 |
api_url = f"{api_devs}/{parameter}"
|
| 1120 |
response = requests.get(api_url)
|
| 1121 |
|
|
@@ -1124,7 +607,7 @@ def tiktok_downloader(item: TiktokBeta):
|
|
| 1124 |
try:
|
| 1125 |
results = response.json()
|
| 1126 |
caption = results.get("result", {}).get("desc", "")
|
| 1127 |
-
if
|
| 1128 |
video_url = results.get("result", {}).get("withoutWaterMarkVideo", "")
|
| 1129 |
if video_url:
|
| 1130 |
return {
|
|
@@ -1143,170 +626,190 @@ def tiktok_downloader(item: TiktokBeta):
|
|
| 1143 |
return {"status": "false", "message": "Invalid Link"}
|
| 1144 |
|
| 1145 |
@app.get("/ryuzaki/mediafire")
|
| 1146 |
-
def mediafire(
|
| 1147 |
-
|
| 1148 |
-
|
| 1149 |
-
|
| 1150 |
-
|
| 1151 |
-
|
| 1152 |
-
|
| 1153 |
-
|
| 1154 |
-
|
| 1155 |
-
|
| 1156 |
-
|
| 1157 |
-
|
| 1158 |
-
|
| 1159 |
-
|
| 1160 |
-
|
| 1161 |
-
|
| 1162 |
-
|
| 1163 |
-
|
| 1164 |
-
|
| 1165 |
-
|
| 1166 |
-
|
| 1167 |
-
|
| 1168 |
-
|
| 1169 |
-
|
| 1170 |
-
|
| 1171 |
-
|
| 1172 |
-
|
| 1173 |
-
|
| 1174 |
-
|
| 1175 |
-
|
| 1176 |
-
|
| 1177 |
-
|
| 1178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1179 |
}
|
| 1180 |
-
|
| 1181 |
-
|
| 1182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1183 |
|
| 1184 |
@app.get("/ryuzaki/gdrive")
|
| 1185 |
-
def gdrive(
|
| 1186 |
-
|
| 1187 |
-
|
| 1188 |
-
|
| 1189 |
-
|
| 1190 |
-
|
| 1191 |
-
|
| 1192 |
-
|
| 1193 |
-
|
| 1194 |
-
|
| 1195 |
-
|
| 1196 |
-
|
| 1197 |
-
|
| 1198 |
-
|
| 1199 |
-
|
| 1200 |
-
|
| 1201 |
-
|
| 1202 |
-
|
| 1203 |
-
|
| 1204 |
-
|
| 1205 |
-
|
| 1206 |
-
|
| 1207 |
-
|
| 1208 |
-
|
| 1209 |
-
|
| 1210 |
-
|
| 1211 |
-
|
| 1212 |
-
|
| 1213 |
-
|
| 1214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1215 |
|
| 1216 |
@app.get("/ryuzaki/anonfiles")
|
| 1217 |
-
def anonfiles(
|
| 1218 |
-
|
| 1219 |
-
|
| 1220 |
-
|
| 1221 |
-
|
| 1222 |
-
|
| 1223 |
-
|
| 1224 |
-
|
| 1225 |
-
|
| 1226 |
-
|
| 1227 |
-
|
| 1228 |
-
|
| 1229 |
-
|
|
|
|
|
|
|
| 1230 |
|
| 1231 |
@app.get("/ryuzaki/filechan")
|
| 1232 |
-
def filechan(
|
| 1233 |
-
|
| 1234 |
-
|
| 1235 |
-
|
| 1236 |
-
|
| 1237 |
-
|
| 1238 |
-
|
| 1239 |
-
|
| 1240 |
-
|
| 1241 |
-
|
| 1242 |
-
|
| 1243 |
-
|
| 1244 |
-
|
|
|
|
|
|
|
| 1245 |
|
| 1246 |
@app.get("/ryuzaki/letsupload")
|
| 1247 |
-
def letsupload(
|
| 1248 |
-
|
| 1249 |
-
|
| 1250 |
-
|
| 1251 |
-
|
| 1252 |
-
|
| 1253 |
-
|
| 1254 |
-
|
| 1255 |
-
|
| 1256 |
-
|
| 1257 |
-
|
| 1258 |
-
|
| 1259 |
-
|
|
|
|
|
|
|
| 1260 |
|
| 1261 |
@app.get("/ryuzaki/megaupload")
|
| 1262 |
-
def megaupload(
|
| 1263 |
-
|
| 1264 |
-
|
| 1265 |
-
|
| 1266 |
-
|
| 1267 |
-
|
| 1268 |
-
|
| 1269 |
-
|
| 1270 |
-
|
| 1271 |
-
|
| 1272 |
-
|
| 1273 |
-
|
| 1274 |
-
|
|
|
|
|
|
|
| 1275 |
|
| 1276 |
@app.get("/ryuzaki/myfile")
|
| 1277 |
-
def myfile(
|
| 1278 |
-
|
| 1279 |
-
|
| 1280 |
-
|
| 1281 |
-
|
| 1282 |
-
|
| 1283 |
-
|
| 1284 |
-
|
| 1285 |
-
|
| 1286 |
-
|
| 1287 |
-
|
| 1288 |
-
|
| 1289 |
-
|
| 1290 |
-
|
| 1291 |
-
|
| 1292 |
-
- Ryuzaki Library: [Library Here](https://github.com/TeamKillerX/RyuzakiLib)
|
| 1293 |
-
|
| 1294 |
-
β’Developed by [@xtdevs](https://t.me/xtdevs)
|
| 1295 |
-
"""
|
| 1296 |
-
def custom_openapi():
|
| 1297 |
-
if app.openapi_schema:
|
| 1298 |
-
return app.openapi_schema
|
| 1299 |
-
openapi_schema = get_openapi(
|
| 1300 |
-
title="RyuzakiLib API",
|
| 1301 |
-
version="2.2.1",
|
| 1302 |
-
summary="Use It Only For Personal Project Else I Need To Delete The Api",
|
| 1303 |
-
description=description,
|
| 1304 |
-
routes=app.routes,
|
| 1305 |
-
)
|
| 1306 |
-
openapi_schema["info"]["x-logo"] = {
|
| 1307 |
-
"url": "https://github-production-user-asset-6210df.s3.amazonaws.com/90479255/289277800-f26513f7-cdf4-44ee-9a08-f6b27e6b99f7.jpg"
|
| 1308 |
-
}
|
| 1309 |
-
app.openapi_schema = openapi_schema
|
| 1310 |
-
return app.openapi_schema
|
| 1311 |
-
|
| 1312 |
-
app.openapi = custom_openapi
|
|
|
|
| 25 |
import os
|
| 26 |
import shutil
|
| 27 |
import random
|
| 28 |
+
import g4f
|
| 29 |
import tempfile
|
| 30 |
import io
|
|
|
|
| 31 |
from io import BytesIO
|
| 32 |
from datetime import datetime as dt
|
| 33 |
from dotenv import load_dotenv
|
| 34 |
from bs4 import BeautifulSoup
|
| 35 |
|
| 36 |
+
from typing import Union
|
| 37 |
from typing_extensions import Annotated
|
| 38 |
from typing import Annotated, Union
|
|
|
|
|
|
|
| 39 |
|
| 40 |
from pydantic import BaseModel
|
| 41 |
from base64 import b64decode as kc
|
|
|
|
| 47 |
from pathlib import Path
|
| 48 |
from serpapi import GoogleSearch
|
| 49 |
|
| 50 |
+
from fastapi import FastAPI, UploadFile, File
|
| 51 |
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
|
| 52 |
from fastapi import Depends, FastAPI, HTTPException, status
|
|
|
|
| 53 |
from fastapi.responses import StreamingResponse
|
| 54 |
from fastapi import HTTPException
|
| 55 |
from fastapi import FastAPI, Request, Header
|
|
|
|
| 58 |
from fastapi.templating import Jinja2Templates
|
| 59 |
from fastapi.responses import FileResponse
|
| 60 |
|
|
|
|
|
|
|
| 61 |
from RyuzakiLib.hackertools.chatgpt import RendyDevChat
|
| 62 |
from RyuzakiLib.hackertools.openai_api import OpenAiToken
|
| 63 |
from RyuzakiLib.mental import BadWordsList
|
| 64 |
+
from RyuzakiLib.spamwatch.clients import SibylBan
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
import logging
|
| 67 |
+
import database as db
|
| 68 |
import functions as code
|
| 69 |
|
| 70 |
logging.basicConfig(level=logging.ERROR)
|
| 71 |
|
| 72 |
+
# I DON'T KNOW LIKE THIS HACKER
|
| 73 |
load_dotenv()
|
| 74 |
+
REVERSE_IMAGE_API = os.environ["REVERSE_IMAGE_API"]
|
| 75 |
+
OCR_API_KEY = os.environ["OCR_API_KEY"]
|
| 76 |
+
ONLY_DEVELOPER_API_KEYS = os.environ["ONLY_DEVELOPER_API_KEYS"]
|
| 77 |
+
HUGGING_TOKEN = os.environ["HUGGING_TOKEN"]
|
|
|
|
| 78 |
SOURCE_UNSPLASH_URL = os.environ["SOURCE_UNSPLASH_URL"]
|
| 79 |
SOURCE_OCR_URL = os.environ["SOURCE_OCR_URL"]
|
| 80 |
SOURCE_ALPHA_URL = os.environ["SOURCE_ALPHA_URL"]
|
| 81 |
+
SOURCE_WAIFU_URL = "https://api.waifu.pics"
|
|
|
|
|
|
|
| 82 |
SOURCE_TIKTOK_WTF_URL = os.environ["SOURCE_TIKTOK_WTF_URL"]
|
| 83 |
SOURCE_TIKTOK_TECH_URL = os.environ["SOURCE_TIKTOK_TECH_URL"]
|
| 84 |
+
DEVELOPER_ID = os.environ["DEVELOPER_ID"]
|
|
|
|
|
|
|
| 85 |
|
| 86 |
+
description = """
|
| 87 |
+
~ Developed written and powered by
|
| 88 |
+
- Ryuzaki Library: [Library Here](https://github.com/TeamKillerX/RyuzakiLib)
|
| 89 |
+
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
|
| 91 |
+
app = FastAPI(
|
| 92 |
+
title="UFoP-API",
|
| 93 |
+
description=description,
|
| 94 |
+
version="0.1.0",
|
| 95 |
+
terms_of_service="Use It Only For Personal Project Else I Need To Delete The Api",
|
| 96 |
+
contact={
|
| 97 |
+
"name": "πΚΚβΦπ",
|
| 98 |
+
"url": "https://t.me/UFoPInfo",
|
| 99 |
+
},
|
| 100 |
+
docs_url="/"
|
| 101 |
+
)
|
| 102 |
|
| 103 |
def validate_api_key(api_key: str = Header(...)):
|
| 104 |
+
USERS_API_KEYS = db.get_all_api_keys()
|
| 105 |
if api_key not in USERS_API_KEYS:
|
| 106 |
raise HTTPException(status_code=401, detail="Invalid API key")
|
| 107 |
|
|
|
|
| 109 |
if api_key not in ONLY_DEVELOPER_API_KEYS:
|
| 110 |
raise HTTPException(status_code=401, detail="Invalid API key")
|
| 111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
|
| 113 |
@app.get("/UFoP/getbanlist")
|
| 114 |
def sibyl_get_all_banlist():
|
| 115 |
+
banned_users = db.get_all_banned()
|
| 116 |
return {
|
| 117 |
"status": "True",
|
| 118 |
"randydev": {
|
|
|
|
| 120 |
}
|
| 121 |
}
|
| 122 |
|
| 123 |
+
@app.get("/UFoP/blacklist-words")
|
| 124 |
def blacklist_words():
|
| 125 |
try:
|
| 126 |
BLACKLIST_WORDS = BadWordsList()
|
|
|
|
| 129 |
except Exception as e:
|
| 130 |
return {"status": "false", "message": f"Internal server error: {str(e)}"}
|
| 131 |
|
| 132 |
+
@app.delete("/UFoP/bandel")
|
| 133 |
def sibyl_system_delete(
|
| 134 |
+
user_id: int = Query(..., description="User ID in query parameter only developer"),
|
| 135 |
api_key: None = Depends(validate_api_key_only_devs)
|
| 136 |
):
|
| 137 |
try:
|
| 138 |
+
_, _, _, _, sibyl_user_id = db.get_sibyl_system_banned(user_id)
|
| 139 |
|
| 140 |
if sibyl_user_id:
|
| 141 |
+
db.remove_sibyl_system_banned(user_id)
|
| 142 |
+
return {"status": "true", "message": f"Successfully removed {user_id} from the Sibyl ban list."}
|
|
|
|
|
|
|
|
|
|
| 143 |
else:
|
| 144 |
+
return {"status": "false", "message": "Not found user"}
|
|
|
|
|
|
|
|
|
|
| 145 |
except Exception as e:
|
| 146 |
+
return {"status": "false", "message": f"Internal server error: {str(e)}"}
|
| 147 |
|
| 148 |
+
@app.post("/UFoP/banner")
|
| 149 |
def sibyl_system_ban(
|
| 150 |
+
user_id: int = Query(..., description="User ID in query parameter"),
|
| 151 |
+
reason: str = Query(..., description="Reason in query parameter"),
|
| 152 |
api_key: None = Depends(validate_api_key_only_devs)
|
| 153 |
):
|
| 154 |
+
if user_id == int(DEVELOPER_ID):
|
| 155 |
return {"status": "false", "message": "Only Developer"}
|
| 156 |
|
| 157 |
try:
|
| 158 |
date_joined = str(dt.now())
|
| 159 |
+
sibyl_ban = random.choice(db.RAMDOM_STATUS)
|
| 160 |
+
ban_data = db.get_sibyl_system_banned(user_id)
|
| 161 |
+
|
| 162 |
+
if ban_data is not None:
|
| 163 |
+
_, _, is_banned, _, sibyl_user_id = ban_data
|
| 164 |
return {"status": "false", "message": "User is already banned"}
|
| 165 |
|
| 166 |
+
db.new_sibyl_system_banned(user_id, sibyl_ban, reason, date_joined)
|
| 167 |
+
|
| 168 |
+
return {
|
| 169 |
+
"status": "true",
|
| 170 |
+
"randydev": {
|
| 171 |
+
"user_id": user_id,
|
| 172 |
"sibyl_name": sibyl_ban,
|
| 173 |
+
"reason": reason,
|
| 174 |
"date_joined": date_joined,
|
| 175 |
+
"message": f"Successfully banned {user_id} from the Sibyl ban list."
|
| 176 |
}
|
| 177 |
+
}
|
| 178 |
except Exception as e:
|
| 179 |
+
logging.error(f"Error in sibyl_system_ban: {e}")
|
| 180 |
+
return {"status": "false", "message": "Internal server error"}
|
| 181 |
|
| 182 |
+
@app.get("/UFoP/bans")
|
| 183 |
def sibyl_system(
|
| 184 |
+
user_id: int = Query(..., description="User ID in query parameter"),
|
| 185 |
+
api_key: None = Depends(validate_api_key) or Depends(validate_api_key_only_devs)
|
| 186 |
):
|
| 187 |
+
result = db.get_sibyl_system_banned(user_id)
|
| 188 |
+
if result is not None:
|
| 189 |
+
sibyl_name, reason, is_banned, date_joined, sibyl_user_id = result
|
| 190 |
+
return {
|
| 191 |
+
"status": "true",
|
| 192 |
+
"randydev": {
|
| 193 |
"sibyl_name": sibyl_name,
|
| 194 |
"reason": reason,
|
| 195 |
"is_banned": is_banned,
|
| 196 |
"date_joined": date_joined,
|
| 197 |
"sibyl_user_id": sibyl_user_id
|
| 198 |
}
|
| 199 |
+
}
|
| 200 |
else:
|
| 201 |
+
return {"status": "false", "message": "Not Found User"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
|
| 203 |
+
@app.get("/ryuzaki/ai")
|
| 204 |
+
def ryuzaki_ai(
|
| 205 |
+
text: str = Query(..., description="text in query parameter"),
|
| 206 |
+
api_key: None = Depends(validate_api_key_only_devs)
|
| 207 |
):
|
| 208 |
try:
|
| 209 |
+
response_data = code.ryuzaki_ai_text(text)
|
| 210 |
+
|
| 211 |
+
if isinstance(response_data, list) and len(response_data) > 0:
|
| 212 |
+
first_result = response_data[0]
|
| 213 |
+
if "generated_text" in first_result:
|
| 214 |
+
message = first_result["generated_text"]
|
| 215 |
+
return {
|
| 216 |
+
"status": "true",
|
| 217 |
+
"randydev": {
|
| 218 |
+
"ryuzaki_text": message
|
| 219 |
+
}
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
return {"status": "false", "message": "Invalid response format"}
|
| 223 |
+
|
| 224 |
+
except Exception as e:
|
| 225 |
+
return {"status": "false", "message": f"error: {e}"}
|
| 226 |
+
|
| 227 |
+
@app.get("/ryuzaki/unsplash")
|
| 228 |
+
async def get_image_unsplash(query: str, size: str="500x500"):
|
| 229 |
+
url = SOURCE_UNSPLASH_URL
|
| 230 |
+
image_url = f"{url}/?{query}/{size}"
|
| 231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
try:
|
| 233 |
+
response = requests.get(image_url)
|
| 234 |
+
response.raise_for_status()
|
| 235 |
+
except requests.exceptions.RequestException as e:
|
| 236 |
+
raise HTTPException(status_code=500, detail=f"Error fetching image: {e}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 237 |
|
| 238 |
+
return StreamingResponse(BytesIO(response.content), media_type="image/jpeg")
|
| 239 |
+
|
| 240 |
+
@app.get("/ryuzaki/reverse")
|
| 241 |
def google_reverse(
|
| 242 |
+
engine: str="google_reverse_image",
|
| 243 |
+
image_url: str=None,
|
| 244 |
+
language: str="en",
|
| 245 |
+
google_lang: str="us",
|
| 246 |
api_key: None = Depends(validate_api_key)
|
| 247 |
):
|
| 248 |
params = {
|
| 249 |
"api_key": REVERSE_IMAGE_API,
|
| 250 |
+
"engine": engine,
|
| 251 |
+
"image_url": image_url,
|
| 252 |
+
"hl": language,
|
| 253 |
+
"gl": google_lang
|
| 254 |
}
|
| 255 |
try:
|
| 256 |
search = GoogleSearch(params)
|
|
|
|
| 259 |
total_time_taken = results["search_metadata"]["total_time_taken"]
|
| 260 |
create_at = results["search_metadata"]["created_at"]
|
| 261 |
processed_at = results["search_metadata"]["processed_at"]
|
| 262 |
+
return {
|
| 263 |
+
"status": "true",
|
| 264 |
+
"randydev": {
|
| 265 |
"link": link,
|
| 266 |
"total_time_taken": total_time_taken,
|
| 267 |
"create_at": create_at,
|
| 268 |
"processed_at": processed_at
|
| 269 |
}
|
| 270 |
+
}
|
| 271 |
+
except Exception as e:
|
| 272 |
+
return {"status": "false", "message": f"Error {e}"}
|
| 273 |
|
| 274 |
+
@app.get("/ryuzaki/ocr")
|
| 275 |
def ocr_space_url(
|
| 276 |
+
url: str = Query(..., description="URL in query parameter"),
|
| 277 |
+
overlay: bool=False,
|
| 278 |
+
language: str = Query("eng", description="Language in query parameter"),
|
| 279 |
api_key: None = Depends(validate_api_key)
|
| 280 |
):
|
| 281 |
payload = {
|
| 282 |
+
"url": url,
|
| 283 |
+
"isOverlayRequired": overlay,
|
| 284 |
"apikey": OCR_API_KEY,
|
| 285 |
+
"language": language
|
| 286 |
}
|
| 287 |
try:
|
| 288 |
response = requests.post(SOURCE_OCR_URL, data=payload)
|
|
|
|
| 293 |
try:
|
| 294 |
parsed_response = json.loads(test_url)
|
| 295 |
if "ParsedResults" in parsed_response and len(parsed_response["ParsedResults"]) > 0:
|
| 296 |
+
return {
|
| 297 |
+
"status": "true",
|
| 298 |
+
"randydev":{
|
| 299 |
"text": parsed_response["ParsedResults"][0]["ParsedText"]
|
| 300 |
}
|
| 301 |
+
}
|
| 302 |
else:
|
| 303 |
return {"status": "false", "message": "Error response."}
|
| 304 |
except (json.JSONDecodeError, KeyError):
|
| 305 |
return "Error parsing the OCR response."
|
| 306 |
|
| 307 |
+
@app.get("/ryuzaki/chatgpt4")
|
| 308 |
+
def chatgpt4_support(
|
| 309 |
+
query: str=None,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 310 |
api_key: None = Depends(validate_api_key)
|
| 311 |
):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
try:
|
| 313 |
+
response = g4f.ChatCompletion.create(
|
| 314 |
+
model=g4f.models.gpt_4,
|
| 315 |
+
messages=[{"role": "user", "content": query}],
|
|
|
|
|
|
|
| 316 |
)
|
| 317 |
+
return {
|
| 318 |
+
"status": "true",
|
| 319 |
+
"randydev":{
|
| 320 |
+
"message": response
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
}
|
| 322 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 323 |
except:
|
| 324 |
return {"status": "false", "message": "Error response."}
|
| 325 |
|
| 326 |
+
@app.post("/ryuzaki/chatgpt-model")
|
| 327 |
+
def chatgpt_model(
|
| 328 |
+
query: str=None,
|
| 329 |
+
model_id: int=1,
|
| 330 |
+
is_models: bool=True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
):
|
|
|
|
|
|
|
|
|
|
| 332 |
try:
|
| 333 |
+
response = RendyDevChat(query).get_response_model(model_id=model_id, is_models=is_models)
|
| 334 |
+
return {
|
| 335 |
+
"status": "true",
|
| 336 |
+
"randydev":{
|
| 337 |
+
"message": response
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 338 |
}
|
| 339 |
+
}
|
| 340 |
except:
|
| 341 |
return {"status": "false", "message": "Error response."}
|
| 342 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 343 |
async def get_data(username):
|
| 344 |
base_msg = ""
|
| 345 |
async with AsyncClient() as gpx:
|
|
|
|
| 368 |
base_msg += f"**An error occured while parsing the data!** \n\n**Traceback:** \n `{e}` \n\n`Make sure that you've sent the command with the correct username!`"
|
| 369 |
return [base_msg, "https://telegra.ph//file/32f69c18190666ea96553.jpg"]
|
| 370 |
|
| 371 |
+
@app.get("/ryuzaki/github")
|
| 372 |
+
async def github(username: str=None):
|
| 373 |
try:
|
| 374 |
+
details = await get_data(username)
|
| 375 |
return {
|
| 376 |
"status": "true",
|
| 377 |
"randydev":{
|
|
|
|
| 382 |
except:
|
| 383 |
return {"status": "false", "message": "Error response."}
|
| 384 |
|
| 385 |
+
@app.get("/ryuzaki/webshot")
|
| 386 |
+
def webshot(
|
| 387 |
+
url: str=None,
|
| 388 |
+
quality: str="1920x1080",
|
| 389 |
+
type_mine: str="JPEG",
|
| 390 |
+
pixels: str="1024",
|
| 391 |
+
cast: str="Z100"
|
| 392 |
+
):
|
| 393 |
try:
|
| 394 |
+
required_url = f"https://mini.s-shot.ru/{quality}/{type_mine}/{pixels}/{cast}/?{url}"
|
| 395 |
return {
|
| 396 |
"status": "true",
|
| 397 |
"randydev":{
|
|
|
|
| 401 |
except:
|
| 402 |
return {"status": "false", "message": "Error response."}
|
| 403 |
|
| 404 |
+
@app.get("/ryuzaki/chatbot")
|
| 405 |
+
def chatbot(
|
| 406 |
+
query: str=None,
|
| 407 |
+
user_id: int=None,
|
| 408 |
+
bot_name: str=None,
|
| 409 |
+
bot_username: str=None
|
| 410 |
+
):
|
| 411 |
api_url = b64decode("aHR0cHM6Ly9hcGkuc2Fmb25lLmRldi9jaGF0Ym90").decode("utf-8")
|
| 412 |
params = {
|
| 413 |
+
"query": query,
|
| 414 |
+
"user_id": user_id,
|
| 415 |
+
"bot_name": bot_name,
|
| 416 |
+
"bot_master": bot_username
|
| 417 |
}
|
| 418 |
x = requests.get(f"{api_url}", params=params)
|
| 419 |
if x.status_code != 200:
|
|
|
|
| 430 |
except:
|
| 431 |
return {"status": "false", "message": "Error response."}
|
| 432 |
|
| 433 |
+
@app.get("/ryuzaki/waifu")
|
| 434 |
+
def waifu_pics(
|
| 435 |
+
types: str="sfw",
|
| 436 |
+
category: str="neko"
|
| 437 |
+
):
|
| 438 |
+
waifu_api = f"{SOURCE_WAIFU_URL}/{types}"
|
| 439 |
+
waifu_param = f"{waifu_api}/{category}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 440 |
|
| 441 |
response = requests.get(waifu_param)
|
| 442 |
|
|
|
|
| 448 |
except Exception as e:
|
| 449 |
return f"Error request {e}"
|
| 450 |
if waifu_image_url:
|
| 451 |
+
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 452 |
return {
|
| 453 |
"status": "true",
|
| 454 |
"randydev":{
|
| 455 |
"image_url": waifu_image_url
|
| 456 |
}
|
| 457 |
}
|
| 458 |
+
except:
|
| 459 |
+
return {"status": "false", "message": "Error response"}
|
| 460 |
else:
|
| 461 |
return {"status": "false", "message": "Error response."}
|
| 462 |
|
| 463 |
+
@app.get("/ryuzaki/rayso")
|
| 464 |
+
def make_rayso(
|
| 465 |
+
code=None,
|
| 466 |
+
title: str="Ryuzaki Dev",
|
| 467 |
+
theme: str=None,
|
| 468 |
+
setlang: str="en",
|
| 469 |
+
auto_translate: bool=None,
|
| 470 |
+
ryuzaki_dark: bool=None
|
| 471 |
+
):
|
| 472 |
trans = SyncTranslator()
|
| 473 |
api_url = b64decode("aHR0cHM6Ly9hcGkuc2Fmb25lLm1lL3JheXNv").decode("utf-8")
|
| 474 |
+
if auto_translate:
|
| 475 |
+
source = trans.detect(code)
|
| 476 |
+
translation = trans(code, sourcelang=source, targetlang=setlang)
|
| 477 |
code = translation.text
|
| 478 |
else:
|
| 479 |
+
code = code
|
| 480 |
+
if ryuzaki_dark:
|
| 481 |
x = requests.post(
|
| 482 |
f"{api_url}",
|
| 483 |
json={
|
| 484 |
"code": code,
|
| 485 |
+
"title": title,
|
| 486 |
+
"theme": theme,
|
| 487 |
"darkMode": True
|
| 488 |
}
|
| 489 |
)
|
|
|
|
| 505 |
f"{api_url}",
|
| 506 |
json={
|
| 507 |
"code": code,
|
| 508 |
+
"title": title,
|
| 509 |
+
"theme": theme,
|
| 510 |
"darkMode": False
|
| 511 |
}
|
| 512 |
)
|
|
|
|
| 571 |
else:
|
| 572 |
return {"status": "false", "message": "Invalid ip address"}
|
| 573 |
|
| 574 |
+
@app.get("/ryuzaki/tiktok_douyin")
|
| 575 |
+
def tiktok_douyin(tiktok_url: str=None):
|
| 576 |
+
response = requests.get(f"{SOURCE_TIKTOK_WTF_URL}={tiktok_url}")
|
| 577 |
if response.status_code != 200:
|
| 578 |
+
return "Error request:"
|
| 579 |
try:
|
| 580 |
download_video = response.json()["aweme_list"][0]["video"]["play_addr"]["url_list"][0]
|
| 581 |
download_audio = response.json()["aweme_list"][0]["music"]["play_url"]["url_list"][0]
|
|
|
|
| 595 |
except:
|
| 596 |
return {"status": "false", "message": "Error request"}
|
| 597 |
|
| 598 |
+
@app.get("/ryuzaki/tiktok")
|
| 599 |
+
def tiktok_downloader(tiktok_url: Union[str, None] = None, only_video: bool=None):
|
| 600 |
api_devs = SOURCE_TIKTOK_TECH_URL
|
| 601 |
+
parameter = f"tiktok?url={tiktok_url}"
|
| 602 |
api_url = f"{api_devs}/{parameter}"
|
| 603 |
response = requests.get(api_url)
|
| 604 |
|
|
|
|
| 607 |
try:
|
| 608 |
results = response.json()
|
| 609 |
caption = results.get("result", {}).get("desc", "")
|
| 610 |
+
if only_video:
|
| 611 |
video_url = results.get("result", {}).get("withoutWaterMarkVideo", "")
|
| 612 |
if video_url:
|
| 613 |
return {
|
|
|
|
| 626 |
return {"status": "false", "message": "Invalid Link"}
|
| 627 |
|
| 628 |
@app.get("/ryuzaki/mediafire")
|
| 629 |
+
def mediafire(link: Union[str, None] = None):
|
| 630 |
+
try:
|
| 631 |
+
down_link = str(link)
|
| 632 |
+
mid = down_link.split('/', 5)
|
| 633 |
+
if mid[3] == "view":
|
| 634 |
+
mid[3] = "file"
|
| 635 |
+
down_link = '/'.join(mid)
|
| 636 |
+
print(down_link)
|
| 637 |
+
r = requests.get(down_link)
|
| 638 |
+
soup = BeautifulSoup(r.content, "html.parser")
|
| 639 |
+
a_href = soup.find("a", {"class": "input popsok"}).get("href")
|
| 640 |
+
a = str(a_href)
|
| 641 |
+
id = link.split('/', 5)[4]
|
| 642 |
+
a_byte = soup.find("a", {"class": "input popsok"}).get_text()
|
| 643 |
+
a_name = soup.find("div", {"class": "dl-btn-label"}).get_text()
|
| 644 |
+
details = soup.find("ul", {"class": "details"})
|
| 645 |
+
li_items = details.find_all('li')[1]
|
| 646 |
+
some = li_items.find_all("span")[0].get_text().split()
|
| 647 |
+
dat = list(some)
|
| 648 |
+
down = a_byte.replace(" ", "").strip()
|
| 649 |
+
time = dat[1]
|
| 650 |
+
date = dat[0]
|
| 651 |
+
byte = down.split("(", 1)[1].split(")", 1)[0]
|
| 652 |
+
name = a_name.replace(" ", "").strip()
|
| 653 |
+
return {
|
| 654 |
+
"status": "true",
|
| 655 |
+
"data": {
|
| 656 |
+
"file": {
|
| 657 |
+
"url": {
|
| 658 |
+
'directDownload': a,
|
| 659 |
+
"original": link,
|
| 660 |
+
},
|
| 661 |
+
"metadata": {
|
| 662 |
+
"id": id,
|
| 663 |
+
"name": name,
|
| 664 |
+
"size": {
|
| 665 |
+
"readable": byte
|
| 666 |
+
},
|
| 667 |
+
"DateAndTime": {
|
| 668 |
+
"time": time,
|
| 669 |
+
"date": date
|
| 670 |
}
|
| 671 |
+
}
|
| 672 |
+
}
|
| 673 |
+
}
|
| 674 |
+
}
|
| 675 |
+
|
| 676 |
+
except:
|
| 677 |
+
return "{'status': 'false', 'message': 'Invalid Link'}"
|
| 678 |
+
|
| 679 |
|
| 680 |
@app.get("/ryuzaki/gdrive")
|
| 681 |
+
def gdrive(link: Union[str, None] = None):
|
| 682 |
+
try:
|
| 683 |
+
down = link.split('/', 6)
|
| 684 |
+
url = f'https://drive.google.com/uc?export=download&id={down[5]}'
|
| 685 |
+
session = requests.Session()
|
| 686 |
+
|
| 687 |
+
response = session.get(url, stream=True)
|
| 688 |
+
headers = response.headers
|
| 689 |
+
content_disp = headers.get('content-disposition')
|
| 690 |
+
filename = None
|
| 691 |
+
if content_disp:
|
| 692 |
+
match = re.search(r'filename="(.+)"', content_disp)
|
| 693 |
+
if match:
|
| 694 |
+
filename = match.group(1)
|
| 695 |
+
|
| 696 |
+
content_length = headers.get('content-length')
|
| 697 |
+
last_modified = headers.get('last-modified')
|
| 698 |
+
content_type = headers.get('content-type')
|
| 699 |
+
|
| 700 |
+
return {
|
| 701 |
+
"status": "true",
|
| 702 |
+
"data": {
|
| 703 |
+
"file": {
|
| 704 |
+
"url": {
|
| 705 |
+
'directDownload': url,
|
| 706 |
+
"original": link,
|
| 707 |
+
},
|
| 708 |
+
"metadata": {
|
| 709 |
+
"id":
|
| 710 |
+
down[5],
|
| 711 |
+
"name":
|
| 712 |
+
filename if filename else 'No filename provided by the server.',
|
| 713 |
+
"size": {
|
| 714 |
+
"readable":
|
| 715 |
+
f'{round(int(content_length) / (1024 * 1024), 2)} MB' if
|
| 716 |
+
content_length else 'No content length provided by the server.',
|
| 717 |
+
"type":
|
| 718 |
+
content_type
|
| 719 |
+
if content_type else 'No content type provided by the server.'
|
| 720 |
+
},
|
| 721 |
+
"DateAndTime":
|
| 722 |
+
last_modified if last_modified else
|
| 723 |
+
'No last modified date provided by the server.',
|
| 724 |
+
}
|
| 725 |
+
}
|
| 726 |
+
}
|
| 727 |
+
}
|
| 728 |
+
|
| 729 |
+
except:
|
| 730 |
+
return "{'status': 'false', 'message': 'Invalid Link'}"
|
| 731 |
|
| 732 |
@app.get("/ryuzaki/anonfiles")
|
| 733 |
+
def anonfiles(link: Union[str, None] = None):
|
| 734 |
+
try:
|
| 735 |
+
r = requests.get(link)
|
| 736 |
+
soup = BeautifulSoup(r.content, "html.parser")
|
| 737 |
+
a_href = soup.find("a", {"id": "download-url"}).get("href")
|
| 738 |
+
a = str(a_href)
|
| 739 |
+
id = link.split('/', 4)[3]
|
| 740 |
+
jsondata = requests.get(
|
| 741 |
+
f'https://api.anonfiles.com/v2/file/{id}/info').json()
|
| 742 |
+
jsondata['data']['file']['url']['directDownload'] = a
|
| 743 |
+
del jsondata['data']['file']['url']['full']
|
| 744 |
+
|
| 745 |
+
return jsondata
|
| 746 |
+
except:
|
| 747 |
+
return "{'status': 'false', 'message': 'Invalid Link'}"
|
| 748 |
|
| 749 |
@app.get("/ryuzaki/filechan")
|
| 750 |
+
def filechan(link: Union[str, None] = None):
|
| 751 |
+
try:
|
| 752 |
+
r = requests.get(link)
|
| 753 |
+
soup = BeautifulSoup(r.content, "html.parser")
|
| 754 |
+
a_href = soup.find("a", {"id": "download-url"}).get("href")
|
| 755 |
+
a = str(a_href)
|
| 756 |
+
id = link.split('/', 4)[3]
|
| 757 |
+
jsondata = requests.get(
|
| 758 |
+
f'https://api.filechan.org/v2/file/{id}/info').json()
|
| 759 |
+
jsondata['data']['file']['url']['directDownload'] = a
|
| 760 |
+
del jsondata['data']['file']['url']['full']
|
| 761 |
+
|
| 762 |
+
return jsondata
|
| 763 |
+
except:
|
| 764 |
+
return "{'status': 'false', 'message': 'Invalid Link'}"
|
| 765 |
|
| 766 |
@app.get("/ryuzaki/letsupload")
|
| 767 |
+
def letsupload(link: Union[str, None] = None):
|
| 768 |
+
try:
|
| 769 |
+
r = requests.get(link)
|
| 770 |
+
soup = BeautifulSoup(r.content, "html.parser")
|
| 771 |
+
a_href = soup.find("a", {"id": "download-url"}).get("href")
|
| 772 |
+
a = str(a_href)
|
| 773 |
+
id = link.split('/', 4)[3]
|
| 774 |
+
jsondata = requests.get(
|
| 775 |
+
f'https://api.letsupload.cc/v2/file/{id}/info').json()
|
| 776 |
+
jsondata['data']['file']['url']['directDownload'] = a
|
| 777 |
+
del jsondata['data']['file']['url']['full']
|
| 778 |
+
|
| 779 |
+
return jsondata
|
| 780 |
+
except:
|
| 781 |
+
return "{'status': 'false', 'message': 'Invalid Link'}"
|
| 782 |
|
| 783 |
@app.get("/ryuzaki/megaupload")
|
| 784 |
+
def megaupload(link: Union[str, None] = None):
|
| 785 |
+
try:
|
| 786 |
+
r = requests.get(link)
|
| 787 |
+
soup = BeautifulSoup(r.content, "html.parser")
|
| 788 |
+
a_href = soup.find("a", {"id": "download-url"}).get("href")
|
| 789 |
+
a = str(a_href)
|
| 790 |
+
id = link.split('/', 4)[3]
|
| 791 |
+
jsondata = requests.get(
|
| 792 |
+
f'https://api.megaupload.nz/v2/file/{id}/info').json()
|
| 793 |
+
jsondata['data']['file']['url']['directDownload'] = a
|
| 794 |
+
del jsondata['data']['file']['url']['full']
|
| 795 |
+
|
| 796 |
+
return jsondata
|
| 797 |
+
except:
|
| 798 |
+
return "{'status': 'false', 'message': 'Invalid Link'}"
|
| 799 |
|
| 800 |
@app.get("/ryuzaki/myfile")
|
| 801 |
+
def myfile(link: Union[str, None] = None):
|
| 802 |
+
try:
|
| 803 |
+
r = requests.get(link)
|
| 804 |
+
soup = BeautifulSoup(r.content, "html.parser")
|
| 805 |
+
a_href = soup.find("a", {"id": "download-url"}).get("href")
|
| 806 |
+
a = str(a_href)
|
| 807 |
+
id = link.split('/', 4)[3]
|
| 808 |
+
jsondata = requests.get(
|
| 809 |
+
f'https://api.myfile.is/v2/file/{id}/info').json()
|
| 810 |
+
jsondata['data']['file']['url']['directDownload'] = a
|
| 811 |
+
del jsondata['data']['file']['url']['full']
|
| 812 |
+
|
| 813 |
+
return jsondata
|
| 814 |
+
except:
|
| 815 |
+
return "{'status': 'false', 'message': 'Invalid Link'}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
requests
|
| 2 |
pymongo
|
| 3 |
bs4
|
| 4 |
-
|
| 5 |
-
|
| 6 |
uvicorn
|
| 7 |
gpytranslate
|
| 8 |
google-search-results
|
|
@@ -24,4 +24,3 @@ typing-extensions
|
|
| 24 |
uvicorn[standard]
|
| 25 |
uvloop
|
| 26 |
stripe
|
| 27 |
-
bardapi
|
|
|
|
| 1 |
requests
|
| 2 |
pymongo
|
| 3 |
bs4
|
| 4 |
+
g4f
|
| 5 |
+
RyuzakiLib
|
| 6 |
uvicorn
|
| 7 |
gpytranslate
|
| 8 |
google-search-results
|
|
|
|
| 24 |
uvicorn[standard]
|
| 25 |
uvloop
|
| 26 |
stripe
|
|
|