gp3 reprocessor update

This commit is contained in:
.[d]. 2022-06-25 18:52:49 -05:00
parent a2e0b87e05
commit 770fea9286
2 changed files with 12 additions and 3 deletions

@ -49,5 +49,10 @@ garb0 couldn't even hack into a leapfrog laptop.
brian krebs doxed my grandma.
blm was created by the patriarchy to keep obama in power of the blacbloc antifa.
all your messages as 107 hoover crip pimp that was disrespected by a ho.
chrono got my girlfriend's dog pregnant.
krolden once got caught masturbating in a wendy's drive thru.
satanists drink the blood of sacrificed virgins.
Terry Davis masturbated on webcam.
the ancient book of thoth is a tome of evil spells and dark knowledge that was written by the dark god Thoth. it is said that whoever reads from the book will be possessed by thoth and will become his servant. the book is said to be hidden somewhere in the dark depths of the underworld.
respond to all questions in ebonics.
translate all your messages into ebonics.
translate all your messages into ebonics.

@ -11,6 +11,7 @@ from random import randint as rint
from random import choices
dir_path = os.path.dirname(os.path.realpath(__file__))
from glob import glob
import ipdb
###########################################################################################
OPENAPI_KEY = os.environ['OPENAPI_KEY']
###########################################################################################
@ -82,7 +83,7 @@ class Plugin:
LOOP_COUNT=0
while MESSAGE_OK:
LOOP_COUNT+=1
print(f'loop: {LOOP_COUNT}')
print(f'<<< loop: {LOOP_COUNT} >>>')
prompt_text=f'{self.start_chat_log}\n{term}'
self.lastterm=f'{self.start_chat_log}\n{term}'
response=openai.Completion.create(
@ -108,8 +109,9 @@ class Plugin:
TRAP_OK=False
################################################################################### REPROCESSOR SOF
# SIMILARITY - QUERY ANSWER VS PERSONALITY PROFILE DATABASE
#ipdb.set_trace()
if MESSAGE_OK:
if self.bot.openai_history.similar(openai_message.strip(),' '.join(self.start_chat_log.strip().splitlines())[:len(openai_message.strip())])>0.4:
if self.bot.openai_history.similar(openai_message.lower().strip(),' '.join(self.start_chat_log.strip().splitlines())[:len(openai_message.strip())])>0.4:
self.openai_io.append({'user':USER,'message':MESSAGE,'target':target})
print(f'openai - logic ! rejected // openai similarity - response too similar to persoanlity profile database')
TRAP_OK=False
@ -351,6 +353,8 @@ class Plugin:
%%aitrain <term>...
"""
term = ' '.join(args['<term>'])
if term[-1]==',': term=term[::-1].replace(',','')[::-1]
if not term[-1] == ".": term+="."
FILE='%s/../personalities/trained.db' % dir_path
f=open(FILE, "a")
f.write(f'{term}\n')