Skip to content

Commit

Permalink
Merge branch 'TeamKillerX:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
xtsea authored Aug 31, 2024
2 parents 041e294 + 923e2f0 commit 3b9660c
Show file tree
Hide file tree
Showing 148 changed files with 727 additions and 5,212 deletions.
283 changes: 1 addition & 282 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,287 +21,6 @@
pip3 install git+https://github.com/TeamKillerX/RyuzakiLib
```

### Import Here
```python
from RyuzakiLib.hackertools.chatgpt import RendyDevChat
from RyuzakiLib.hackertools.github import GithubUsername
from RyuzakiLib.hackertools.rmbg import RemoveBg
from RyuzakiLib.hackertools.reverse import GoogleReverseImage
from RyuzakiLib.hackertools.ipinfo import WhoisIpHacker
from RyuzakiLib.hackertools.ocrapi import OcrApiUrl
from RyuzakiLib.hackertools.prefixes import CustomPrefixes

# or

from RyuzakiLib import *
```

### Learn Python
```python
import asyncio

class example_python:
@staticmethod
def hello_world():
asyncio.sleep(5)

# examples usage
example_python.hello_world()
```

### Spamwatch
• Example usage
```python
from RyuzakiLib import SibylBan

x = SiblyBan.ban(user_id)
xb = SiblyBan.banlist(user_id)
xub = SiblyBan.unban(user_id)
results = SiblyBan.banlist_all()
```

### Profile Clone
• Example usage
```python
from RyuzakiLib import Clone

message = Clone.clone() # need parameter

showing = Clone.sclone() # need parameter
print(showing)
```

### Learn Telegram Bot API
```python

from RyuzakiLib.bot import API

api = API(bot_token="your_token")

# supported here
api.send_message()
api.send_photo()
api.send_sticker()
api.send_audio()
api.send_document()
api.forward_message()

# you can pass
sent_message = api.send_message(chat_id=chat_id, text=text)

sent_sticker = api.send_sticker(chat_id=chat_id, sticker=sticker)

# your own developer
urls = api.telegram("SendMessage")
payload = {}
headers = {}
response = requests.post(urls, json=payload, headers=headers)
print(response.text)
```

### Chatgpt New?
* Chatgpt's new features are available here
- parameter

```python
from RyuzakiLib import RendyDevChat

results = await RendyDevChat.chat_hacked(latest_model="list-model", list_model_all=True)
print(results)

response = await RendyDevChat.chat_hacked("hello world")
print(response)
```

### AI image Generator New?
* AI image Generator new features are available here
- parameter
```python
from RyuzakiLib import RendyDevChat

query = "Cat in a Hat"
response = await RendyDevChat.image_generator(query)
print(response)
```

### Continue Conversation
```python
from RyuzakiLib import OpenAI

api_base = "https://api.example.com/v1"
api_key = ""
query = "hello world"
response = await OpenAI(api_key=api_key, api_base=api_base).chat_message_turbo(
query=query,
model="gpt-4",
is_stream=False
)

print(response[0])
```

### Example Google Reverse Image
```python
from pyrogram import Client, filters
from pyrogram.types import Message

from RyuzakiLib import GoogleReverseImage

url = "https://example/jpg"
apikey = "api key token"
response = GoogleReverseImage(url, apikey)
results = response.get_reverse()
print(results)
```
### New Features
```python
# Create by @xtdevs
# Prefixes Custom

from pyrogram import Client, filters
from pyrogram.types import Message

from RyuzakiLib.hackertools.prefixes import CustomPrefixes
from pymongo import MongoClient

client = MongoClient("mongodb://localhost:27017/")
db = client["your_database_name"]
collection = db["your_collection_name"]

db_name = "custom_prefixes"
user_id = message.from_user.id
prefix = [".", "+", "-"]
set_handler = CustomPrefixes(db_name, user_id, prefix, collection, True) # parameter upsert using set True or False
set_handler.add_prefixes()
now_show_prefix = set_handler.get_prefix()
print(now_show_prefix)
```

### Gemini AI New (Free)
- No authorization needed
- Gemini Pro and Gemini Flash (Without RyuzakiLib API keys)
- Multi-Turn Conversation

```python
from RyuzakiLib import GeminiLatest

mongo_url = "....."
api_key = "....."
user_id = 0
geni = GeminiLatest(api_keys=api_key, mongo_url=mongo_url, user_id=user_id)

# Get response (private in python)
answer, gemini_chat = geni._GeminiLatest__get_response_gemini(query)
print(answer)

# Get response image to text
from RyuzakiLib import GeminiLatest

caption = message.reply_to_message.caption
file_path = await message.reply_to_message.download()

x = GeminiLatest(api_keys="api key here")
response = x.get_response_image(caption, file_path)
print(response)
```

- Gemini AI New: Get [API key Here](https://makersuite.google.com/app/apikey) from Google Dev

### Blackbox New AI
```python
from RyuzakiLib import Blackbox
import os

varname = "DATABASE_URL"

value = os.environ.get(varname.upper(), None)

mongo_uri = value
db_name = "tiktokbot"

blackbox = Blackbox(mongo_uri, db_name)

user_id = "user666"
query = "What is todays date?"

results = await blackbox.chat(query, user_id=user_id)
print(results)
```

### BetaRag New (AI)
```python
from RyuzakiLib import BetaRag

x = BetaRag(token="api key", user_id=0, mongo_url="your mongo")

response = await x.rag_chat("how to javascript code?")
print(response)
```

- You can ask support [@KillerXSupport](https://t.me/KillerXSupport)

### Test your bots
```bash
- git clone https://github.com/TeamKillerX/RyuzakiLib
- cd RyuzakiLib
- pip3 install -r ryuzaki.txt
- nano buildbot/secrets/env.py
- ctrl s + x to save
- bash start.sh
```

### RyuzakiLib API

![IMG_20231209_213430_940](https://github.com/TeamKillerX/RyuzakiLib-API/assets/90479255/f26513f7-cdf4-44ee-9a08-f6b27e6b99f7)

## Authentication
> **Warning** Do not expose the `__Secure-1PSID`
```python
from RyuzakiLib.api.reqs import AsyicXSearcher

url ="https://randydev-ryuzaki-api.hf.space/ryuzaki/gemini-ai-pro"

payload = {
"query": "hello world",
"bard_api_key": "cookie token here",
"is_login": True
}

headers = {
"accept": "application/json",
}

response = await AsyicXSearcher.search(url, post=True, re_json=True, headers=headers, json=payload)
print(response)
```

* `bard_api_key` : (optional)
* `is_login` : default `False` (optional)

1. Visit https://bard.google.com/
2. F12 for console
3. Session: Application → Cookies → Copy the value of `__Secure-1PSID` cookie.

Note that while I referred to `__Secure-1PSID` value as an API key for convenience, it is not an officially provided API key. Cookie value subject to frequent changes. Verify the value again if an error occurs. Most errors occur when an invalid cookie value is entered.

`bard_api_key={__Secure-1PSID}`


### Tutorial Requests in Python
>Request body schema
* `json=payload`
```python
response = requests.post(url, headers=headers, json=payload).json()
```

> Query Parameters
* `params=params`
```python
response = requests.post(url, headers=headers, params=params).json()
```

You can find the [`Ryuzaki API`](https://private.randydev.my.id)

* Only Developed by
- [@xtdevs](https://t.me/xtdevs)
- [@TrueSaiyan](https://t.me/TrueSaiyan)
Expand All @@ -311,7 +30,7 @@ You can find the [`Ryuzaki API`](https://private.randydev.my.id)
* Contact Support: [@xtdevs](https://t.me/xtdevs)

### Troubleshoot
Sometimes errors occur, but we are here to help! This guide covers some of the most common issues we’ve seen and how you can resolve them. However, this guide isn’t meant to be a comprehensive collection of every 🤗 FastAPI issue. For more help with troubleshooting your issue, try:
Sometimes errors occur, but we are here to help! This guide covers some of the most common issues we’ve seen and how you can resolve them. However, this guide isn’t meant to be a comprehensive collection of every 🤗 RyuzakiLib issue. For more help with troubleshooting your issue, try:
* [Contact Support](https://t.me/xtdevs)

# License
Expand Down
23 changes: 15 additions & 8 deletions RyuzakiLib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,25 @@

from . import *
from .__version__ import __version__
from .akenoai import *
from .api.fullstack import FullStackDev
from .api.jiosaavn import Jiosaavn
from .api.private import PrivateApiUrl
from .api.reqs import AsyicXSearcher
from .api.reqs import AsyicXSearcher, async_search
from .api.yohasakura import SearchAPI
from .bot import *
from .channels import *
from .custom_api import CustomApi
from .decorator import *
from .extreme.carbon import Carbon
from .extreme.quotestk import QouteSticker
from .extreme.userinfo import TelegramUserInfo
from .extreme.webshot import WebShotUrl
from .fastapi import FastAPISuper
from .hackertools.blackbox import Blackbox
from .hackertools.chatgpt import RendyDevChat
from .hackertools.cloudflare import CloudFlare
from .hackertools.farfalle import FarFalle
from .hackertools.flux import FluxAi
from .hackertools.gemini import GeminiLatest
from .hackertools.github import Github
from .hackertools.huggingface import FaceAI
Expand All @@ -51,16 +54,15 @@
from .hackertools.reverse import GoogleReverseImage
from .hackertools.rmbg import Background
from .hackertools.tiktok import Tiktok
from .hackertools.xnxx import PornoHub
from .mental import *
from .profile.user import Clone
from .pushdb import *
from .py_tgcalls import PyTgCalls
from .pyrogramMod import PyrogramMod
from .quote import *
from .reminder import *
from .spamwatch.clients import SibylBan
from .story import *
from .stream_type import StreamType
from .sync import idle
from .system.read import System
from .tr import *

Expand All @@ -81,9 +83,7 @@ class AwesomeCoding(BaseModel):


__all__ = [
"__version__" "CustomApi",
"PyTgCalls",
"StreamType",
"__version__"
"RendyDevChat",
"GeminiLatest",
"Github",
Expand Down Expand Up @@ -113,4 +113,11 @@ class AwesomeCoding(BaseModel):
"AsyicXSearcher",
"SearchAPI",
"Jiosaavn",
"FluxAi",
"CloudFlare",
"PyrogramMod",
"async_search",
"PornoHub",
"AkenoAI",
"FastAPISuper",
]
2 changes: 1 addition & 1 deletion RyuzakiLib/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.4"
__version__ = "1.3.3"
Loading

0 comments on commit 3b9660c

Please sign in to comment.