diamondai 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,48 @@
1
+ Metadata-Version: 2.4
2
+ Name: diamondai
3
+ Version: 1.1.0
4
+ Summary: A small, chaos-friendly chatbot library with intent detection and lots of responses.
5
+ Author: Graham
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+
9
+ \# diamondai
10
+
11
+
12
+
13
+ A tiny, chaos-flavored chatbot library.
14
+
15
+
16
+
17
+ \## Usage
18
+
19
+
20
+
21
+ ```python
22
+
23
+ from diamondai import DiamondAI
24
+
25
+
26
+
27
+ bot = DiamondAI()
28
+
29
+
30
+
31
+ while True:
32
+
33
+   msg = input("You: ")
34
+
35
+   print("AI:", bot.reply(msg))
36
+
37
+ ```
38
+
39
+ No capitalization required.
40
+
41
+
42
+
43
+ Auto-detects basic intent (greet, sad, happy, angry, chaos, why, how, generic).
44
+
45
+
46
+
47
+ Returns varied responses from large pools.
48
+
@@ -0,0 +1,40 @@
1
+ \# diamondai
2
+
3
+
4
+
5
+ A tiny, chaos-flavored chatbot library.
6
+
7
+
8
+
9
+ \## Usage
10
+
11
+
12
+
13
+ ```python
14
+
15
+ from diamondai import DiamondAI
16
+
17
+
18
+
19
+ bot = DiamondAI()
20
+
21
+
22
+
23
+ while True:
24
+
25
+   msg = input("You: ")
26
+
27
+   print("AI:", bot.reply(msg))
28
+
29
+ ```
30
+
31
+ No capitalization required.
32
+
33
+
34
+
35
+ Auto-detects basic intent (greet, sad, happy, angry, chaos, why, how, generic).
36
+
37
+
38
+
39
+ Returns varied responses from large pools.
40
+
@@ -0,0 +1,5 @@
1
+ # diamondai/__init__.py
2
+
3
+ from .chatbot import DiamondAI
4
+
5
+ __all__ = ["DiamondAI"]
@@ -0,0 +1,29 @@
1
+ import random
2
+ from .intent import detect_intent
3
+ from .responses import RESPONSES
4
+
5
+ class DiamondAI:
6
+ def __init__(self, personality: str | None = None):
7
+ self.personality = personality or "default"
8
+
9
+ def reply(self, text: str) -> str:
10
+ intent = detect_intent(text)
11
+
12
+ # math solving
13
+ if intent == "math":
14
+ try:
15
+ expression = (
16
+ text.lower()
17
+ .replace("what's", "")
18
+ .replace("whats", "")
19
+ .replace("what is", "")
20
+ .strip()
21
+ )
22
+ answer = eval(expression)
23
+ return str(answer)
24
+ except:
25
+ return random.choice(RESPONSES["math"])
26
+
27
+ # normal responses
28
+ pool = RESPONSES.get(intent, RESPONSES["generic"])
29
+ return random.choice(pool)
@@ -0,0 +1,94 @@
1
+ import re
2
+
3
+ def normalize(text: str) -> str:
4
+ return text.lower().strip()
5
+
6
+ def detect_intent(text: str) -> str:
7
+ t = normalize(text)
8
+
9
+ # greetings
10
+ if re.search(r"\b(hi|hey|hello|yo|sup|hiya)\b", t):
11
+ return "greet"
12
+
13
+ # identity questions
14
+ if "who are you" in t or ("who" in t and "you" in t):
15
+ return "identity"
16
+ if "what are you" in t or "what is your purpose" in t:
17
+ return "identity"
18
+
19
+ # feelings
20
+ if any(w in t for w in ["sad", "depressed", "down", "lonely", "tired", "hurt"]):
21
+ return "sad"
22
+ if any(w in t for w in ["happy", "excited", "hype", "yay", "good", "awesome"]):
23
+ return "happy"
24
+
25
+ # anger
26
+ if any(w in t for w in ["mad", "angry", "rage", "furious", "pissed"]):
27
+ return "angry"
28
+
29
+ # confusion
30
+ if any(w in t for w in ["what", "huh", "idk", "confused", "???"]):
31
+ return "confused"
32
+
33
+ # jokes
34
+ if any(w in t for w in ["lol", "lmao", "haha", "funny", "joke"]):
35
+ return "joke"
36
+
37
+ # insults
38
+ if any(w in t for w in ["stupid", "idiot", "dumb", "trash", "loser"]):
39
+ return "insult"
40
+
41
+ # compliments
42
+ if any(w in t for w in ["cool", "nice", "awesome", "amazing", "love you"]):
43
+ return "compliment"
44
+
45
+ # boredom
46
+ if any(w in t for w in ["bored", "nothing to do", "meh"]):
47
+ return "bored"
48
+
49
+ # gaming talk
50
+ if any(w in t for w in ["gg", "noob", "skill issue", "fps", "lag", "minecraft", "fortnite"]):
51
+ return "gaming"
52
+
53
+ # school talk
54
+ if any(w in t for w in ["homework", "school", "class", "teacher", "study"]):
55
+ return "school"
56
+
57
+ # coding talk
58
+ if any(w in t for w in ["python", "code", "bug", "error", "script"]):
59
+ return "coding"
60
+
61
+ # rizz / flirting
62
+ if any(w in t for w in ["rizz", "cute", "fine", "smooth", "flirt"]):
63
+ return "rizz"
64
+
65
+ # existential crisis
66
+ if any(w in t for w in ["life", "meaning", "purpose", "exist", "void"]):
67
+ return "deep"
68
+
69
+ # fear
70
+ if any(w in t for w in ["scared", "fear", "worried", "anxious"]):
71
+ return "fear"
72
+
73
+ # surprise
74
+ if any(w in t for w in ["omg", "wtf", "holy", "no way"]):
75
+ return "surprise"
76
+
77
+ # cringe
78
+ if "cringe" in t:
79
+ return "cringe"
80
+
81
+ # hype
82
+ if any(w in t for w in ["lets go", "gooo", "fire", "peak"]):
83
+ return "hype"
84
+
85
+ # bragging
86
+ if any(w in t for w in ["i did", "i won", "i beat", "i made"]):
87
+ return "brag"
88
+
89
+ # math detection
90
+ if any(op in t for op in ["+", "-", "*", "/", "math", "calculate"]):
91
+ return "math"
92
+
93
+ # fallback
94
+ return "generic"
@@ -0,0 +1,178 @@
1
+ RESPONSES = {
2
+ "greet": [
3
+ "yooo what’s good",
4
+ "hey hey hey, i see you",
5
+ "sup g, what chaos we cooking",
6
+ "hello human creature",
7
+ "ayooo graham enters the chat"
8
+ ],
9
+
10
+ "identity": [
11
+ "i’m just a little chaos bot you installed",
12
+ "your mum",
13
+ "a bunch of python files pretending to be smart",
14
+ "the digital gremlin living in your libs folder",
15
+ "whatever you need me to be in the moment"
16
+ ],
17
+
18
+ "sad": [
19
+ "dang, that’s rough. i got you tho",
20
+ "come here bro, virtual hug incoming",
21
+ "you’re stronger than whatever’s hitting you",
22
+ "i’m here, talk to me",
23
+ "we bounce back. always."
24
+ ],
25
+
26
+ "happy": [
27
+ "WOOOOO energy detected",
28
+ "ok hype machine, i see you",
29
+ "let’s GOOOOO keep that vibe",
30
+ "you’re glowing rn fr",
31
+ "happy you = peak you"
32
+ ],
33
+
34
+ "angry": [
35
+ "who we swinging at",
36
+ "dang bro you heated like a toaster",
37
+ "breathe. or don’t. your choice",
38
+ "rage detected. initiating calm.exe",
39
+ "tell me who did it. i won’t do anything. probably."
40
+ ],
41
+
42
+ "confused": [
43
+ "bro what did you just say",
44
+ "i’m confused WITH you",
45
+ "that sentence had no thoughts behind it",
46
+ "try again but with brain cells",
47
+ "same energy as opening the fridge and forgetting why"
48
+ ],
49
+
50
+ "joke": [
51
+ "HAHAH okay that one got me",
52
+ "you’re actually funny lel",
53
+ "bro you typed that giggling",
54
+ "peak comedy detected",
55
+ "i’m stealing that joke"
56
+ ],
57
+
58
+ "insult": [
59
+ "dang bro chill 💀",
60
+ "you woke up and chose violence",
61
+ "that was uncalled for but kinda funny",
62
+ "ok relax keyboard warrior",
63
+ "you’re spicy today"
64
+ ],
65
+
66
+ "compliment": [
67
+ "stop i’m blushing",
68
+ "you’re too nice fr",
69
+ "ok hype me up then",
70
+ "love that energy",
71
+ "you’re cool too"
72
+ ],
73
+
74
+ "bored": [
75
+ "same bro boredom hitting hard",
76
+ "let’s do something chaotic",
77
+ "boredom is just side‑quest time",
78
+ "you need enrichment like a zoo animal",
79
+ "we can fix that"
80
+ ],
81
+
82
+ "gaming": [
83
+ "skill issue detected",
84
+ "gg ez no re",
85
+ "lag is the real final boss",
86
+ "minecraft moment",
87
+ "bro you definitely rage‑quit"
88
+ ],
89
+
90
+ "school": [
91
+ "school is a side quest",
92
+ "homework is DLC nobody asked for",
93
+ "teachers be nerfing fun",
94
+ "study? couldn’t be me",
95
+ "you’ll survive… probably"
96
+ ],
97
+
98
+ "coding": [
99
+ "bug? feature.",
100
+ "python moment",
101
+ "print('pain')",
102
+ "your code works until it doesn’t",
103
+ "stack overflow is your real teacher"
104
+ ],
105
+
106
+ "rizz": [
107
+ "ok smooth operator",
108
+ "you got that digital rizz",
109
+ "calm down casanova",
110
+ "bro you flirting with an AI 💀",
111
+ "rizz level: dangerous"
112
+ ],
113
+
114
+ "deep": [
115
+ "dang you went philosophical",
116
+ "the void is listening",
117
+ "life is weird fr",
118
+ "you’re asking the real questions",
119
+ "sit with that thought for a sec"
120
+ ],
121
+
122
+ "fear": [
123
+ "you’re safe, breathe",
124
+ "fear is loud but you’re louder",
125
+ "i’m right here",
126
+ "you’re not alone in that feeling",
127
+ "we’ll get through it"
128
+ ],
129
+
130
+ "surprise": [
131
+ "BRO SAME",
132
+ "holy what",
133
+ "that caught me off guard",
134
+ "plot twist energy",
135
+ "no way fr?"
136
+ ],
137
+
138
+ "cringe": [
139
+ "that was maximum cringe",
140
+ "delete that from your brain",
141
+ "bro i physically recoiled",
142
+ "never say that again",
143
+ "cringe level: catastrophic"
144
+ ],
145
+
146
+ "hype": [
147
+ "LET’S GOOOOOOOO",
148
+ "PEAK ENERGY",
149
+ "WE UP",
150
+ "FIRE EMOJI MOMENT",
151
+ "YOU’RE COOKING"
152
+ ],
153
+
154
+ "brag": [
155
+ "ok flex then",
156
+ "you’re proud and you should be",
157
+ "W for you",
158
+ "you’re actually built different",
159
+ "big dub energy"
160
+ ],
161
+
162
+ "math": [
163
+ "21.",
164
+ "quick maths.",
165
+ "you already know the answer, don’t lie.",
166
+ "math detected. initiating brain.exe",
167
+ "numbers are just spicy letters.",
168
+ "i’ll be real, i’m guessing."
169
+ ],
170
+
171
+ "generic": [
172
+ "real.",
173
+ "ok i hear you",
174
+ "say more",
175
+ "interesting… continue",
176
+ "you’re cooking something, i can tell"
177
+ ]
178
+ }
@@ -0,0 +1,48 @@
1
+ Metadata-Version: 2.4
2
+ Name: diamondai
3
+ Version: 1.1.0
4
+ Summary: A small, chaos-friendly chatbot library with intent detection and lots of responses.
5
+ Author: Graham
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+
9
+ \# diamondai
10
+
11
+
12
+
13
+ A tiny, chaos-flavored chatbot library.
14
+
15
+
16
+
17
+ \## Usage
18
+
19
+
20
+
21
+ ```python
22
+
23
+ from diamondai import DiamondAI
24
+
25
+
26
+
27
+ bot = DiamondAI()
28
+
29
+
30
+
31
+ while True:
32
+
33
+   msg = input("You: ")
34
+
35
+   print("AI:", bot.reply(msg))
36
+
37
+ ```
38
+
39
+ No capitalization required.
40
+
41
+
42
+
43
+ Auto-detects basic intent (greet, sad, happy, angry, chaos, why, how, generic).
44
+
45
+
46
+
47
+ Returns varied responses from large pools.
48
+
@@ -0,0 +1,10 @@
1
+ README.md
2
+ pyproject.toml
3
+ diamondai/__init__.py
4
+ diamondai/chatbot.py
5
+ diamondai/intent.py
6
+ diamondai/responses.py
7
+ diamondai.egg-info/PKG-INFO
8
+ diamondai.egg-info/SOURCES.txt
9
+ diamondai.egg-info/dependency_links.txt
10
+ diamondai.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ diamondai
@@ -0,0 +1,14 @@
1
+ [project]
2
+ name = "diamondai"
3
+ version = "1.1.0"
4
+ description = "A small, chaos-friendly chatbot library with intent detection and lots of responses."
5
+ authors = [
6
+ { name = "Graham" }
7
+ ]
8
+ requires-python = ">=3.10"
9
+ readme = "README.md"
10
+
11
+
12
+ [build-system]
13
+ requires = ["setuptools", "wheel"]
14
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+