Skip to content

Commit

Permalink
_
Browse files Browse the repository at this point in the history
  • Loading branch information
xtsea authored Aug 31, 2024
1 parent 69207c1 commit 923e2f0
Showing 1 changed file with 11 additions and 75 deletions.
86 changes: 11 additions & 75 deletions RyuzakiLib/hackertools/chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,15 @@ async def chat_hacked(
else:
url = "https://randydev-ryuzaki-api.hf.space/ryuzaki/chatgpt-old"
params = {"query": args}
check_response = await AsyicXSearcher.search(
url,
post=True,
re_json=True,
json=params
)
check_response = requests.post(url, json=params).json()
return check_response["randydev"]["message"]
elif latest_model == "blackbox":
if is_working_dev:
url = f"{base_api_dev}/ryuzaki/blackbox"
else:
url = f"https://randydev-ryuzaki-api.hf.space/ryuzaki/blackbox"
params = {"query": args}
check_response = await AsyicXSearcher.search(
url,
post=True,
re_json=True,
json=params
)
check_response = requests.post(url, json=params).json()
return check_response["randydev"]["message"]
elif latest_model == "list-model":
if list_model_all:
Expand All @@ -107,13 +97,7 @@ async def chat_hacked(
"is_multi_chat": True
}
headers = {"accept": "application/json", "api-key": API_KEYS}
check_response = await AsyicXSearcher.search(
url,
post=True,
re_json=True,
headers=headers,
json=payload
)
check_response = requests.post(url, headers=headers, json=payload).json()
return check_response["randydev"]["message"]
elif latest_model == "microsoft":
if is_working_dev:
Expand All @@ -125,13 +109,7 @@ async def chat_hacked(
"clients_name": "microsoft/Phi-3-mini-4k-instruct",
}
headers = {"accept": "application/json"}
check_response = await AsyicXSearcher.search(
url,
post=True,
re_json=True,
headers=headers,
json=payload
)
check_response = requests.post(url, headers=headers, json=payload).json()
return check_response["randydev"]["message"]
elif latest_model == "gemma":
if is_working_dev:
Expand All @@ -143,13 +121,7 @@ async def chat_hacked(
"clients_name": "google/gemma-1.1-7b-it",
}
headers = {"accept": "application/json"}
check_response = await AsyicXSearcher.search(
url,
post=True,
re_json=True,
headers=headers,
json=payload
)
check_response = requests.post(url, headers=headers, json=payload).json()
return check_response["randydev"]["message"]
elif latest_model == "mistralai":
if is_working_dev:
Expand All @@ -161,13 +133,7 @@ async def chat_hacked(
"clients_name": "mistralai/Mixtral-8x7B-Instruct-v0.1",
}
headers = {"accept": "application/json"}
check_response = await AsyicXSearcher.search(
url,
post=True,
re_json=True,
headers=headers,
json=payload
)
check_response = requests.post(url, headers=headers, json=payload).json()
return check_response["randydev"]["message"]
elif latest_model == "faceh4":
if is_working_dev:
Expand All @@ -179,13 +145,7 @@ async def chat_hacked(
"clients_name": "HuggingFaceH4/zephyr-7b-beta",
}
headers = {"accept": "application/json"}
check_response = await AsyicXSearcher.search(
url,
post=True,
re_json=True,
headers=headers,
json=payload
)
check_response = requests.post(url, headers=headers, json=payload).json()
return check_response["randydev"]["message"]
elif latest_model == "google-ai":
if is_working_dev:
Expand All @@ -194,13 +154,7 @@ async def chat_hacked(
url = f"https://randydev-ryuzaki-api.hf.space/ryuzaki/google-ai"
headers = {"accept": "application/json", "api-key": API_KEYS}
params = {"query": args}
check_response = await AsyicXSearcher.search(
url,
post=True,
re_json=True,
headers=headers,
json=params
)
check_response = requests.post(url, headers=headers, json=params).json()
return check_response["randydev"]["message"]
elif latest_model == "betagoogle-ai":
if is_working_dev:
Expand All @@ -209,13 +163,7 @@ async def chat_hacked(
url = "https://randydev-ryuzaki-api.hf.space/ryuzaki/v1beta2-google-ai"
headers = {"accept": "application/json", "api-key": API_KEYS}
params = {"query": args}
check_response = await AsyicXSearcher.search(
url,
post=True,
re_json=True,
headers=headers,
json=params
)
check_response = requests.post(url, headers=headers, json=params).json()
return check_response["randydev"]["message"]
elif latest_model == "gpt-4-turbo":
if is_working_dev:
Expand All @@ -224,13 +172,7 @@ async def chat_hacked(
url = f"https://randydev-ryuzaki-api.hf.space/ryuzaki/chatgpt-custom"
headers = {"accept": "application/json", "api-key": API_KEYS}
params = {"query": args, "model": "gpt-4-turbo"}
check_response = await AsyicXSearcher.search(
url,
post=True,
re_json=True,
headers=headers,
json=params
)
check_response = requests.post(url, headers=headers, json=params).json()
return check_response["randydev"]["message"]
elif latest_model == "gpt-4o":
clients_x = Clients_g4f()
Expand Down Expand Up @@ -260,11 +202,5 @@ async def image_generator(args, base_api_dev="https://akeno.randydev.my.id", is_
url = f"https://randydev-ryuzaki-api.hf.space/ryuzaki/dalle3xl"
headers = {"accept": "application/json", "api-key": API_KEYS}
payload = {"query": args}
check_response = await AsyicXSearcher.search(
url,
post=True,
re_json=True,
headers=headers,
json=payload
)
check_response = requests.post(url, headers=headers, json=payload).json()
return check_response

0 comments on commit 923e2f0

Please sign in to comment.