randydev commited on
Commit
aaa8cb2
1 Parent(s): 08b5cce

Upload 2 files

Browse files
Files changed (2) hide show
  1. main.py +11 -126
  2. models.py +123 -0
main.py CHANGED
@@ -68,6 +68,8 @@ from RyuzakiLib.mental import BadWordsList
68
 
69
  from bardapi import Bard
70
 
 
 
71
  import logging
72
  import functions as code
73
 
@@ -202,127 +204,6 @@ def get_profile_clone(user_id):
202
  else:
203
  return None
204
 
205
- class CustomErrorResponseModel(BaseModel):
206
- detail: List[Dict[str, Any]]
207
-
208
- class SuccessResponse(BaseModel):
209
- status: str
210
- randydev: Dict[str, Any]
211
-
212
- class ErrorResponse(BaseModel):
213
- status: str
214
- detail: str
215
-
216
- class ErrorStatus(BaseModel):
217
- status: str
218
- message: str
219
-
220
- class ProfileClone(BaseModel):
221
- user_id: int
222
- first_name: Optional[str] = None
223
- last_name: Optional[str] = None
224
- profile_id: Optional[str] = None
225
- bio: Optional[str] = None
226
-
227
- class GetProfileClone(BaseModel):
228
- user_id: int
229
-
230
- class SibylSystemDel(BaseModel):
231
- user_id: int
232
-
233
- class SibylSystemBan(BaseModel):
234
- user_id: int
235
- reason: str
236
-
237
- class RyuzakiAi(BaseModel):
238
- text: str
239
-
240
- class SibylSystem(BaseModel):
241
- user_id: int
242
-
243
- class SibylSystemResponse(BaseModel):
244
- sibyl_name: str
245
- reason: str
246
- is_banned: bool
247
- date_joined: str
248
- sibyl_user_id: int
249
-
250
- class GoogleReverse(BaseModel):
251
- engine: str="google_reverse_image"
252
- image_url: str
253
- language: str="en"
254
- google_lang: str="us"
255
-
256
- class GetImageUnsplash(BaseModel):
257
- query: str
258
- size: str="500x500"
259
-
260
- class OrcSpaceUrl(BaseModel):
261
- url: str
262
- overlay: bool=False
263
- language: str="eng"
264
-
265
- class ChatgptModel(BaseModel):
266
- query: str
267
- model_id: Optional[int] = None
268
- is_models: bool=False
269
-
270
- class ChatgptCustom(BaseModel):
271
- query: str
272
-
273
- class GeminiPro(BaseModel):
274
- query: str
275
- bard_api_key: Optional[str] = None
276
- is_login: bool=False
277
-
278
- class WaifuPics(BaseModel):
279
- types: str="sfw"
280
- category: str="neko"
281
- media_type: Optional[str] = None
282
- is_bytes: bool=False
283
-
284
- class MakeRayso(BaseModel):
285
- code: str
286
- title: str="Ryuzaki Dev"
287
- theme: str
288
- setlang: str="en"
289
- auto_translate: Optional[bool] = None
290
- ryuzaki_dark: bool=True
291
-
292
- class Webshot(BaseModel):
293
- url: str
294
- quality: str="1920x1080"
295
- type_mine: str="JPEG"
296
- pixels: str="1024"
297
- cast: str="Z100"
298
-
299
- class GithubUsernames(BaseModel):
300
- username: str
301
-
302
- class ChatBots(BaseModel):
303
- query: str
304
- user_id: Optional[int] = None
305
- bot_name: Optional[str] = None
306
- bot_username: Optional[str] = None
307
-
308
- class NewMonitor(BaseModel):
309
- type: int=1
310
- url: str
311
- friendly_name: str
312
-
313
- class TiktokBeta(BaseModel):
314
- tiktok_url: str
315
- only_video: Optional[bool] = None
316
-
317
- class TiktokDownloader(BaseModel):
318
- tiktok_url: str
319
-
320
- class GetMonitorLogs(BaseModel):
321
- logs: int
322
-
323
- class DownloadLink(BaseModel):
324
- link: str
325
-
326
  @app.post("/ryuzaki/profile-clone", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
327
  def profile_clone(
328
  item: ProfileClone,
@@ -379,7 +260,10 @@ def get_profile_(
379
  }
380
  )
381
  else:
382
- return ErrorStatus(status="false", message="Not found user")
 
 
 
383
  except Exception as e:
384
  return ErrorStatus(status="false", message=f"Internal server error: {str(e)}")
385
 
@@ -414,12 +298,13 @@ def sibyl_system_delete(
414
  remove_sibyl_system_banned(item.user_id)
415
  return SuccessResponse(
416
  status="True",
417
- randydev={
418
- "message": f"Successfully removed {item.user_id} from the Sibyl ban list"
419
- }
420
  )
421
  else:
422
- return ErrorStatus(status="false", message="Not found user")
 
 
 
423
  except Exception as e:
424
  return ErrorStatus(status="false", message=f"Internal server error: {str(e)}")
425
 
 
68
 
69
  from bardapi import Bard
70
 
71
+ from models import *
72
+
73
  import logging
74
  import functions as code
75
 
 
204
  else:
205
  return None
206
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  @app.post("/ryuzaki/profile-clone", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
208
  def profile_clone(
209
  item: ProfileClone,
 
260
  }
261
  )
262
  else:
263
+ return SuccessResponse(
264
+ status="False",
265
+ randydev={"message": "Not found user"}
266
+ )
267
  except Exception as e:
268
  return ErrorStatus(status="false", message=f"Internal server error: {str(e)}")
269
 
 
298
  remove_sibyl_system_banned(item.user_id)
299
  return SuccessResponse(
300
  status="True",
301
+ randydev={"message": f"Successfully removed {item.user_id} from the Sibyl ban list"}
 
 
302
  )
303
  else:
304
+ return SuccessResponse(
305
+ status="False",
306
+ randydev={"message": "Not Found UserID"}
307
+ )
308
  except Exception as e:
309
  return ErrorStatus(status="false", message=f"Internal server error: {str(e)}")
310
 
models.py ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import Optional, List, Dict, Any
2
+ from pydantic import BaseModel
3
+
4
+ class CustomErrorResponseModel(BaseModel):
5
+ detail: List[Dict[str, Any]]
6
+
7
+ class SuccessResponse(BaseModel):
8
+ status: str
9
+ randydev: Dict[str, Any]
10
+
11
+ class ErrorResponse(BaseModel):
12
+ status: str
13
+ detail: str
14
+
15
+ class ErrorStatus(BaseModel):
16
+ status: str
17
+ message: str
18
+
19
+ class ProfileClone(BaseModel):
20
+ user_id: int
21
+ first_name: Optional[str] = None
22
+ last_name: Optional[str] = None
23
+ profile_id: Optional[str] = None
24
+ bio: Optional[str] = None
25
+
26
+ class GetProfileClone(BaseModel):
27
+ user_id: int
28
+
29
+ class SibylSystemDel(BaseModel):
30
+ user_id: int
31
+
32
+ class SibylSystemBan(BaseModel):
33
+ user_id: int
34
+ reason: str
35
+
36
+ class RyuzakiAi(BaseModel):
37
+ text: str
38
+
39
+ class SibylSystem(BaseModel):
40
+ user_id: int
41
+
42
+ class SibylSystemResponse(BaseModel):
43
+ sibyl_name: str
44
+ reason: str
45
+ is_banned: bool
46
+ date_joined: str
47
+ sibyl_user_id: int
48
+
49
+ class GoogleReverse(BaseModel):
50
+ engine: str="google_reverse_image"
51
+ image_url: str
52
+ language: str="en"
53
+ google_lang: str="us"
54
+
55
+ class GetImageUnsplash(BaseModel):
56
+ query: str
57
+ size: str="500x500"
58
+
59
+ class OrcSpaceUrl(BaseModel):
60
+ url: str
61
+ overlay: bool=False
62
+ language: str="eng"
63
+
64
+ class ChatgptModel(BaseModel):
65
+ query: str
66
+ model_id: Optional[int] = None
67
+ is_models: bool=False
68
+
69
+ class ChatgptCustom(BaseModel):
70
+ query: str
71
+
72
+ class GeminiPro(BaseModel):
73
+ query: str
74
+ bard_api_key: Optional[str] = None
75
+ is_login: bool=False
76
+
77
+ class WaifuPics(BaseModel):
78
+ types: str="sfw"
79
+ category: str="neko"
80
+ media_type: Optional[str] = None
81
+ is_bytes: bool=False
82
+
83
+ class MakeRayso(BaseModel):
84
+ code: str
85
+ title: str="Ryuzaki Dev"
86
+ theme: str
87
+ setlang: str="en"
88
+ auto_translate: Optional[bool] = None
89
+ ryuzaki_dark: bool=True
90
+
91
+ class Webshot(BaseModel):
92
+ url: str
93
+ quality: str="1920x1080"
94
+ type_mine: str="JPEG"
95
+ pixels: str="1024"
96
+ cast: str="Z100"
97
+
98
+ class GithubUsernames(BaseModel):
99
+ username: str
100
+
101
+ class ChatBots(BaseModel):
102
+ query: str
103
+ user_id: Optional[int] = None
104
+ bot_name: Optional[str] = None
105
+ bot_username: Optional[str] = None
106
+
107
+ class NewMonitor(BaseModel):
108
+ type: int=1
109
+ url: str
110
+ friendly_name: str
111
+
112
+ class TiktokBeta(BaseModel):
113
+ tiktok_url: str
114
+ only_video: Optional[bool] = None
115
+
116
+ class TiktokDownloader(BaseModel):
117
+ tiktok_url: str
118
+
119
+ class GetMonitorLogs(BaseModel):
120
+ logs: int
121
+
122
+ class DownloadLink(BaseModel):
123
+ link: str