-
Notifications
You must be signed in to change notification settings - Fork 7
/
main.py
72 lines (56 loc) · 4.27 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import time
import think.think as think
import think.memory as memory
# this is a test for using history from sophie_chat instead of the message history.
# feedback: It kindda works. But for some reason the llm starts repeating my input
# maybe having it structured like "plan:..." "context: summarized history" and "last few messages: ..." makes more sense?
def log(message):
# print with white color
print("\033[0m" + str(message) + "\033[0m")
def write_start_message():
pic = """
░▓█▓░░
▒▒▒ ██░ ░░░░░░░░░░ ░░██░ ▒░
▒▒▒░ ░█░░▒░░░░░░░░░ ░░░▒ ░█ ░▒░░
▒░ ░█ ▒▒░░░░░░░░░░░░░░░░░░░░▒▒▒ █ ░▒
░▒▒░ ▒░▒▒▒░███░░░░░░░░░░░░░░░███░▒▒░▓░ ▒▒▒░▒▒
░ ▒░▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒░ ░▒
█▒▒░░██░░░▒░░░░░░░░░░░░░░░░░██░░▒▒█
▒░░▒ █░▒▒░█░█▓░ █░░░░░░░░░█ █▒█░█░▒▒░░
█░▒▒█░████ ██░░░░░░░██ ░████░█▒▒░█ ▒░░▒
█░▒▒█ █▓░░█▒░▓█░█░░▓▓░█▓░██░█▓█ ▒▒▒░░ ░
░█▒▒▒░ ▓░░░░░█░░░▒▒▒░░░█░░░░▓░ ░▒▒░█
░█░█░ ░█▒▒▒▓▒░▒░░░░░░░░░░░░░░░░░▒▓▓▒▒▒░█ ▒░░█░
█░░░█ █░▒▒▒▒▒▒▒▒▒░░░░░░░░░░▒▒▒▒▒▒▒▒░█ ░█░░░█
█▓▒░░ ████▓██▒▒▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▒▒██▓████░░░▒▓█
█▒▒▓▒░▒▒▒▒▓█▓▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▓█▒▒▒▒▒░▒▓▓▒▓
▓▒██░░ ░░░░░░▓▓▒░░░░▓▓▓░░░░▒▓▓░░░░░░ ░██▒░
█░░░░░░░░░░░░▒▓█░▒░░░░▒▓▒░░░░▒░█▓░░░░░░░░░░░░░█
█▓░░▓▓▒▒▒█░░░░░█░░░░░▒▓▓▓▒░░░░░█░░░░░█▒▒▒▒▓░░▒█
███░░▓▓█▒▓▒▒▒░░░░░▒▒▓▒█▓▓▒░░░░░░▒▒▓▓▒▓▓▓░░▓██
░░░█████▓▒░▒▒░▒▒▒▒▒▒▒█░█▓▒▒▒▒▒▒▒▒▓▒░██████░░░
░░░░░░░░██░░█▓░▒▒░█░░░░░█░█░░█▒░▒██░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
"""
message = """Hello my friend!
I am Mini-Autogpt, a small version of Autogpt for smaller llms.
I am here to help you and will try to contact you as soon as possible!
Note: I am still in development, so please be patient with me! <3
"""
# write the pic in print line by line with a tiny delay between each line, then add the message below as if someone was typing it.
for line in pic.split("\n"):
print(line)
time.sleep(0.1)
for char in message:
print(char, end="", flush=True)
time.sleep(0.05)
def start_mini_autogpt():
write_start_message()
# delete thoughts from memory
memory.forget_everything()
# run the main loop, nothing more to do in main.py
while True:
think.run_think()
if __name__ == "__main__":
fail_counter = 0
start_mini_autogpt()()