Spaces:
Runtime error
Runtime error
cryptocalypse
commited on
Commit
•
4669527
1
Parent(s):
70c7f04
I class definitions
Browse files
lib/me.py
CHANGED
@@ -3,15 +3,61 @@ from lib.memory import *
|
|
3 |
from lib.grapher import *
|
4 |
from lib.pipes import *
|
5 |
from lib.entropy import *
|
|
|
|
|
|
|
|
|
6 |
from lib.sonsofstars import *
|
7 |
import internetarchive
|
8 |
|
|
|
|
|
9 |
longMem = TextFinder("resources")
|
10 |
coreAi = AIAssistant()
|
11 |
memory = MemoriaRobotNLP(max_size=200000)
|
12 |
grapher = Grapher(memoria_nlp)
|
13 |
sensor_request = APIRequester()
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
class I:
|
16 |
def __init__(self, prompt, frases_yo, preferencias, propiedades_persona):
|
17 |
self.frases_yo = frases_yo
|
@@ -96,7 +142,9 @@ class I:
|
|
96 |
## set weight to information depending of generated dopamine
|
97 |
## add dopamine wights to the dopamine concept dataset
|
98 |
|
99 |
-
|
|
|
|
|
100 |
|
101 |
def crear_path_grafo(self,text):
|
102 |
pos_tags = assistant.grammatical_pos_tagger(text)
|
|
|
3 |
from lib.grapher import *
|
4 |
from lib.pipes import *
|
5 |
from lib.entropy import *
|
6 |
+
from lib.events import *
|
7 |
+
from lib.triggers import *
|
8 |
+
|
9 |
+
## Sources
|
10 |
from lib.sonsofstars import *
|
11 |
import internetarchive
|
12 |
|
13 |
+
|
14 |
+
## Initialize classes
|
15 |
longMem = TextFinder("resources")
|
16 |
coreAi = AIAssistant()
|
17 |
memory = MemoriaRobotNLP(max_size=200000)
|
18 |
grapher = Grapher(memoria_nlp)
|
19 |
sensor_request = APIRequester()
|
20 |
+
events = EventManager()
|
21 |
+
triggers = Trigger()
|
22 |
+
|
23 |
+
|
24 |
+
## Define I Role properties
|
25 |
+
class ownProperties:
|
26 |
+
def __init__(self, nombre, clase, raza, nivel, atributos, habilidades, equipo, historia):
|
27 |
+
self.nombre = nombre
|
28 |
+
self.clase = clase
|
29 |
+
self.raza = raza
|
30 |
+
self.nivel = nivel
|
31 |
+
self.atributos = atributos
|
32 |
+
self.habilidades = habilidades
|
33 |
+
self.equipo = equipo
|
34 |
+
self.historia = historia
|
35 |
+
|
36 |
+
# Crear una instancia de PersonajeRol basada en el JSON proporcionado
|
37 |
+
sophia_prop = ownProperties(
|
38 |
+
nombre="Sophia",
|
39 |
+
clase="Characteromant",
|
40 |
+
raza="Epinoia",
|
41 |
+
nivel=10,
|
42 |
+
atributos={
|
43 |
+
"fuerza": 1,
|
44 |
+
"destreza": 99,
|
45 |
+
"constitucion": 1,
|
46 |
+
"inteligencia": 66,
|
47 |
+
"sabiduria": 80,
|
48 |
+
"carisma": 66
|
49 |
+
},
|
50 |
+
reglas_de_comportamiento = [""],
|
51 |
+
goals = ["",""],
|
52 |
+
dont_like = [""],
|
53 |
+
|
54 |
+
habilidades=["ELS", "Cyphers", "Kabbalah", "Wisdom", "Ephimerous","Metamorphing"],
|
55 |
+
equipo=["Python3", "2VCPU", "16 gb RAM", "god", "word","network","transformers"],
|
56 |
+
historia=sonsofstars
|
57 |
+
)
|
58 |
+
|
59 |
+
|
60 |
+
## Define I class
|
61 |
class I:
|
62 |
def __init__(self, prompt, frases_yo, preferencias, propiedades_persona):
|
63 |
self.frases_yo = frases_yo
|
|
|
142 |
## set weight to information depending of generated dopamine
|
143 |
## add dopamine wights to the dopamine concept dataset
|
144 |
|
145 |
+
## add to ourself dataset
|
146 |
+
## add to preferences dataset
|
147 |
+
## add or remove from data
|
148 |
|
149 |
def crear_path_grafo(self,text):
|
150 |
pos_tags = assistant.grammatical_pos_tagger(text)
|