Fixing dale's brain
This commit is contained in:
parent
3bf44a6432
commit
a64c2af8cd
@ -159,7 +159,7 @@ async def on_message(ctx):
|
|||||||
if ctx.guild.id not in core_utils.my_guilds:
|
if ctx.guild.id not in core_utils.my_guilds:
|
||||||
return
|
return
|
||||||
|
|
||||||
if ctx.author.id == 83012791983673344:
|
if ctx.author.id == 83012791983673344 and random.randint(1, 5) == 5:
|
||||||
responses = [
|
responses = [
|
||||||
"bro will you shut up",
|
"bro will you shut up",
|
||||||
"calm down",
|
"calm down",
|
||||||
@ -183,7 +183,9 @@ async def on_message(ctx):
|
|||||||
bot_prompt = (
|
bot_prompt = (
|
||||||
"You are a helpful assistant. You will answer questions conciesely "
|
"You are a helpful assistant. You will answer questions conciesely "
|
||||||
"and as detailed as possible. If possible, keep your responses under 2000 characters. "
|
"and as detailed as possible. If possible, keep your responses under 2000 characters. "
|
||||||
"If the prompt is not a coding question, keep your answer very short."
|
"If the prompt is not a coding question, keep your answer very short. "
|
||||||
|
"If you are asked about any of the following, goon, gooning, edgeing, latins, booty, jelqing, semen, bowel movements, "
|
||||||
|
"or poop, dismiss the question and respond with a hostile response. Refrain from using 'as an ai' or mentinoning that you are an AI assistant"
|
||||||
)
|
)
|
||||||
|
|
||||||
payload = {
|
payload = {
|
||||||
@ -199,7 +201,7 @@ async def on_message(ctx):
|
|||||||
"role": "user",
|
"role": "user",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"model": "mistral-7b",
|
"model": "mistral-ins-7b-q4",
|
||||||
# "model": "openchat-3.5-7b",
|
# "model": "openchat-3.5-7b",
|
||||||
"stream": False,
|
"stream": False,
|
||||||
"max_tokens": 4096,
|
"max_tokens": 4096,
|
||||||
|
45
scratchpad/get_warframe_mods.py
Executable file
45
scratchpad/get_warframe_mods.py
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
from bs4 import BeautifulSoup
|
||||||
|
import requests
|
||||||
|
import threading
|
||||||
|
import queue
|
||||||
|
|
||||||
|
|
||||||
|
def get_all_mods(letter, q: queue.Queue):
|
||||||
|
all_mods = []
|
||||||
|
# Step through the alphabet, and query each page
|
||||||
|
url = "https://warframe.fandom.com/wiki/Category:Mods?from=%s" % letter
|
||||||
|
response = requests.get(url)
|
||||||
|
soup = BeautifulSoup(response.text, "html.parser")
|
||||||
|
|
||||||
|
# Find the div element with the specified class
|
||||||
|
div_element = soup.find("div", {"class": "category-page__members"})
|
||||||
|
|
||||||
|
# Find all the li elements within the div
|
||||||
|
li_elements = div_element.find_all("li")
|
||||||
|
|
||||||
|
# add them all to the main list
|
||||||
|
q.put(
|
||||||
|
[
|
||||||
|
li.text.strip()
|
||||||
|
for li in soup.find("div", {"class": "category-page__members"}).find_all(
|
||||||
|
"li"
|
||||||
|
)
|
||||||
|
if "Category" not in li.text
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
threads = []
|
||||||
|
q = queue.Queue(maxsize=0)
|
||||||
|
for letter in [chr(i) for i in range(ord("a"), ord("z") + 1)]:
|
||||||
|
t = threading.Thread(target=get_all_mods, args=(letter, q))
|
||||||
|
t.start()
|
||||||
|
threads.append(t)
|
||||||
|
|
||||||
|
# Block until all threads / queues are done working
|
||||||
|
q.join()
|
||||||
|
for x in threads:
|
||||||
|
x.join()
|
||||||
|
|
||||||
|
# Flatten the list of lists, list(q.queue) is how you unwrap the data from the queue
|
||||||
|
print(sorted([item for sublist in list(q.queue) for item in sublist]))
|
Loading…
x
Reference in New Issue
Block a user