Skip to content

Commit

Permalink
further integration to chatgpt
Browse files Browse the repository at this point in the history
  • Loading branch information
tutor-temple committed Feb 11, 2023
1 parent aafdabe commit 5e366a3
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 41 deletions.
68 changes: 32 additions & 36 deletions alpha_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,51 +30,47 @@ def alpha_main():
res=re.findall(r'\".*?\"', test)
input = res[1]
input =input.strip('\"')
if input.startswith("alpha"):
print(input)
if input.startswith("hello"):
input = input.replace("hello","")
if input=="alpha":
speak("How can I help you?")

else:
if input == "":
continue
else:
print("USER INPUTL: "+ input)
if mute == 1:
if "unmute" in input:
mute = 0
continue
print("Output: ") #comment this line
#### continue all your shit below
if input.startswith("mute"):
mute =1
continue
if "weather" in input:
if "in " in input:
input_city= re.search("^in: (\w+)",input)
target=input_city.groups()
weathermain(target)
else:
continue
elif mute ==0:
print("Output: ") #comment this line
#### continue all your shit below
if input.startswith("mute"):
mute =1
continue
if "weather" in input:
if "in " in input:
input_city= re.search("^in: (\w+)",input)
target=input_city.groups()
weathermain(target)
else:
weathermain(checkuserdata()[1])
elif "check" and "memory" in input:
checkram()
elif "check" and "cpu" in input:
checkcpu()
elif "check" and "battery" in input:
checkbattery()
elif "check" and "system" in input:
systemstats()
elif "flush" and "dns" in input:
flushdns()
elif input.startswith("shutdown"):
speak("Shutdown protocol has been executed")
shutdown_s()
elif "kill program" in input:
kill()
weathermain(checkuserdata()[1])
elif "check" and "memory" in input:
checkram()
elif "check" and "cpu" in input:
checkcpu()
elif "check" and "battery" in input:
checkbattery()
elif "check" and "system" in input:
systemstats()
elif "flush" and "dns" in input:
flushdns()
elif input.startswith("shut down"):
speak("Shutdown protocol has been executed")
shutdown_s()
elif "kill program" in input:
kill()

else:
chatgpt(input)
else:
chatgpt(input)
else:
continue

Expand Down
Binary file modified modules/__pycache__/chatgpt.cpython-37.pyc
Binary file not shown.
Binary file added modules/__pycache__/mainsystem.cpython-37.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion modules/chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def chatgpt(prompt):
)
response = completion.choices[0].text
speak(response)
print(response)
print(response)
2 changes: 1 addition & 1 deletion modules/mainsystem.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#this file is code for any functions related to the windows operating system
from pyautogui import screenshot
import psutil
from sense import speak
from modules.sense import speak
import requests
import os
#this program defines all possible ways to access computer statistic
Expand Down
3 changes: 0 additions & 3 deletions test.py

This file was deleted.

0 comments on commit 5e366a3

Please sign in to comment.