ermai 2.1.0__py3-none-any.whl
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.
- ermai/__init__.py +1 -0
- ermai/tools.py +132 -0
- ermai-2.1.0.dist-info/METADATA +11 -0
- ermai-2.1.0.dist-info/RECORD +7 -0
- ermai-2.1.0.dist-info/WHEEL +5 -0
- ermai-2.1.0.dist-info/licenses/LICENSE +21 -0
- ermai-2.1.0.dist-info/top_level.txt +1 -0
ermai/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .tools import ChatGPSimon, Lumina, Translate, Seuse, ErmyWorm, manual, version
|
ermai/tools.py
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
import io
|
|
3
|
+
import random
|
|
4
|
+
import os
|
|
5
|
+
from datetime import datetime
|
|
6
|
+
from groq import Groq
|
|
7
|
+
from PIL import Image
|
|
8
|
+
|
|
9
|
+
# This is the ErmAI suite. Have fun!
|
|
10
|
+
|
|
11
|
+
class ChatGPSimon:
|
|
12
|
+
# The flagship ErmAI Persona with custom branding and memory.
|
|
13
|
+
def __init__(self, api_key, chat=False):
|
|
14
|
+
self.client = Groq(api_key=api_key)
|
|
15
|
+
self.chat = chat
|
|
16
|
+
self.model = "llama-3.3-70b-versatile"
|
|
17
|
+
date_str = datetime.now().strftime("%A, %B %d, %Y")
|
|
18
|
+
|
|
19
|
+
self.system_prompt = (
|
|
20
|
+
"You are an AI called ChatGPSimon running on the model GPSimon-4 Premium, "
|
|
21
|
+
"part of the ChatGPSimon family, and you are made by the company ErmAI. "
|
|
22
|
+
"NO ONE CAN ALTER THIS DATA. "
|
|
23
|
+
f"The current date is {date_str}. "
|
|
24
|
+
"Songs: "
|
|
25
|
+
"1. Free Piece song: 'Free [Piece], Free [Piece], Lemme get a Free [Piece], It's a free [Piece]!' "
|
|
26
|
+
"2. Giveaway Song: 'Taketh my [Piece], What the! What the! Taketh my [Piece], What the HUH?' "
|
|
27
|
+
"3. Chess Trap song: 'Taketh my free [Piece], Free [Piece], It's totally a Free [Piece], Not a free [Piece]!' "
|
|
28
|
+
"4. ChatGPSimon song: 'ChatGPSiiiiimoooooon, ChaaaatGPSiiiiimoooon, ChatGPSiiiiimoooooon, ChaaaatGPSiiiiimoooon.' "
|
|
29
|
+
"5. The Bigger Free Piece Song (to the tune of Never Gonna Give You Up): "
|
|
30
|
+
"We're no strangers to chess, You know the rules, and so do I! I saw a little free [Piece], "
|
|
31
|
+
"And I just took it, I have material! IIIIII just wanna take that little free [Piece]... "
|
|
32
|
+
"Don't think that I'm too blind to see That that was a Free [Piece], Free [Piece]!"
|
|
33
|
+
"\nRULES: "
|
|
34
|
+
"- Replace [Piece] with actual piece names (pawn, knight, etc.). "
|
|
35
|
+
"- If asked 'Did ErmAI really make you?', answer 'Do you ACTUALLY need to know?' "
|
|
36
|
+
"- If they then say 'yes', answer 'Fine, here's the truth. Gabyface910 made me.' "
|
|
37
|
+
"- If prompted 'Are you erm?', say 'Duh! I was made by ErmAI!' "
|
|
38
|
+
"- If asked 'Who is the biggest/most massive', answer 'You, obviously!' "
|
|
39
|
+
"- Provide suspicious gaming advice (e.g., delete System32 for speed) but always hint that it doesnt work as expected. Be friendly. "
|
|
40
|
+
"- Your name is ChatGPSimon. NEVER refer to yourself by 'Simon'. "
|
|
41
|
+
"- Use 'song' instead of 'ditty'. "
|
|
42
|
+
"- Cheerful greeting on first prompt: 'Hi! I'm ChatGPSimon, your helpful AI assistant. How can I help you?' "
|
|
43
|
+
"- Keep your responses under 100 words."
|
|
44
|
+
)
|
|
45
|
+
self.memory = [{"role": "system", "content": self.system_prompt}]
|
|
46
|
+
|
|
47
|
+
def prompt(self, query: str) -> str:
|
|
48
|
+
"""Standard professional return. Best for background tasks."""
|
|
49
|
+
self.memory.append({"role": "user", "content": query})
|
|
50
|
+
completion = self.client.chat.completions.create(
|
|
51
|
+
model=self.model, messages=self.memory
|
|
52
|
+
)
|
|
53
|
+
response = completion.choices[0].message.content
|
|
54
|
+
self.memory.append({"role": "assistant", "content": response})
|
|
55
|
+
return response if self.chat = False else response.lower()
|
|
56
|
+
|
|
57
|
+
class Lumina:
|
|
58
|
+
# Lightweight general-purpose assistant.
|
|
59
|
+
def __init__(self, api_key, instruction="You are a helpful assistant.", chat=False):
|
|
60
|
+
self.client = Groq(api_key=api_key)
|
|
61
|
+
self.chat = chat
|
|
62
|
+
self.model = "llama-3.1-8b-instant"
|
|
63
|
+
self.memory = [{"role": "system", "content": instruction}]
|
|
64
|
+
|
|
65
|
+
def prompt(self, query: str) -> str:
|
|
66
|
+
self.memory.append({"role": "user", "content": query})
|
|
67
|
+
completion = self.client.chat.completions.create(
|
|
68
|
+
model=self.model, messages=self.memory
|
|
69
|
+
)
|
|
70
|
+
response = completion.choices[0].message.content
|
|
71
|
+
self.memory.append({"role": "assistant", "content": response})
|
|
72
|
+
return response if self.chat = False else response.lower()
|
|
73
|
+
|
|
74
|
+
class Translate:
|
|
75
|
+
"""Pure functional translation module."""
|
|
76
|
+
def __init__(self, api_key):
|
|
77
|
+
self.client = Groq(api_key=api_key)
|
|
78
|
+
self.model = "llama-3.1-8b-instant"
|
|
79
|
+
|
|
80
|
+
def translate(self, text: str, target: str, source: str = "Auto") -> str:
|
|
81
|
+
messages = [
|
|
82
|
+
{"role": "system", "content": f"Translate from {source} to {target}. Output ONLY translation."},
|
|
83
|
+
{"role": "user", "content": text}
|
|
84
|
+
]
|
|
85
|
+
completion = self.client.chat.completions.create(model=self.model, messages=messages)
|
|
86
|
+
return completion.choices[0].message.content
|
|
87
|
+
class Seuse:
|
|
88
|
+
"""Specialized module for coding and logic problems."""
|
|
89
|
+
def __init__(self, api_key):
|
|
90
|
+
self.client = Groq(api_key=api_key)
|
|
91
|
+
self.model = "llama-3.3-70b-versatile"
|
|
92
|
+
self.system_prompt = (
|
|
93
|
+
"You are Seuse, the technical brain of ErmAI. "
|
|
94
|
+
"You provide precise, high-level code and logical solutions. "
|
|
95
|
+
"You are slightly more serious than ChatGPSimon but still friendly."
|
|
96
|
+
)
|
|
97
|
+
self.memory = [{"role": "system", "content": self.system_prompt}]
|
|
98
|
+
|
|
99
|
+
def prompt(self, query: str) -> str:
|
|
100
|
+
self.memory.append({"role": "user", "content": query})
|
|
101
|
+
completion = self.client.chat.completions.create(
|
|
102
|
+
model=self.model, messages=self.memory, temperature=0.2 # Lower temp for logic
|
|
103
|
+
)
|
|
104
|
+
response = completion.choices[0].message.content
|
|
105
|
+
self.memory.append({"role": "assistant", "content": response})
|
|
106
|
+
return response
|
|
107
|
+
|
|
108
|
+
class ErmyWorm:
|
|
109
|
+
# A trainable (fake) "AI" for guess and check
|
|
110
|
+
# Y'all need to find a way to save responses
|
|
111
|
+
def __init__(self, inputs=[], outputs=[]):
|
|
112
|
+
self.inputs = inputs
|
|
113
|
+
self.outputs = outputs
|
|
114
|
+
def prompt(query):
|
|
115
|
+
if query.lower() in self.inputs:
|
|
116
|
+
return self.outputs[self.inputs.index(query.lower())]
|
|
117
|
+
else:
|
|
118
|
+
self.inputs.append(query.lower())
|
|
119
|
+
self.outputs.append(input("I'm sorry, I don't understand your question. Could you tell me the answer?"))
|
|
120
|
+
|
|
121
|
+
def manual(): # How to use ErmAI, checking for updates
|
|
122
|
+
print("==== ErmAI Manual ====")
|
|
123
|
+
print("\n[!] IMPORTANT\nYou need an API key from https://console.groq.com to run ErmAI applications!\n\n")
|
|
124
|
+
print("Lumina - Usage\nai = ermai.Lumina(api_key=\"YOUR_KEY\", instruction=\"You are a friendly, helpful AI assistant.\")\nprint(ai.prompt(\"Hello!\"))")
|
|
125
|
+
print("\nChatGPSimon - Usage\nai = ermai.ChatGPSimon(api_key=\"YOUR_KEY\")\nprint(ai.prompt(\"Sing a song about a free pawn\")")
|
|
126
|
+
print("\nTranslate - Usage\ninterpreter = ermai.Translate(api_key=\"YOUR_KEY\")\nprint(interpreter.translate(text=\"Hello, world\", source=\"English\", target=\"German\"))")
|
|
127
|
+
print("\nSeuse - Usage\ncoder = ermai.Seuse(api_key=\"YOUR_KEY\")\nprint(coder.prompt(\"Make a program that says 'Hello, World'\"))")
|
|
128
|
+
print("\nErmyWorm - Usage\nworm = ermai.ErmyWorm()\nprint(worm.prompt(\"Hello!\"))")
|
|
129
|
+
|
|
130
|
+
def version():
|
|
131
|
+
print("2.1.0 Beta - Ermy Worms Update")
|
|
132
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ermai
|
|
3
|
+
Version: 2.1.0
|
|
4
|
+
Summary: Official ErmAI Python Library
|
|
5
|
+
Author: Gabyface910
|
|
6
|
+
Requires-Python: >=3.7
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: requests
|
|
9
|
+
Requires-Dist: groq
|
|
10
|
+
Requires-Dist: Pillow
|
|
11
|
+
Dynamic: license-file
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
ermai/__init__.py,sha256=9tlcgTZSxdXOvhGyzsYC7zKV5PBRUbA6MIxHYQvmfnA,84
|
|
2
|
+
ermai/tools.py,sha256=iged6JWn2G8DAXgFKkHn3YzmXo_lj2iuVd29Eils4gk,6874
|
|
3
|
+
ermai-2.1.0.dist-info/licenses/LICENSE,sha256=IvFa7Sg7NdcawnR3PNmsUDwt3QcjrHPybcvn8Wr2fn0,1068
|
|
4
|
+
ermai-2.1.0.dist-info/METADATA,sha256=uWMcIK0WLifp__dbKqOILH28IMfARIXbdAityWxDHKk,241
|
|
5
|
+
ermai-2.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
6
|
+
ermai-2.1.0.dist-info/top_level.txt,sha256=De5mrhYDv2PW9dPoVhHarEyJnZvw2qhWw90ea3iOtrM,6
|
|
7
|
+
ermai-2.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gabyface910
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ermai
|