This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import psutil | |
system_info = f''' | |
Initializing system check... | |
Checking CPU Usage... | |
Checking RAM Usage... | |
Checking Battery Level... | |
CPU Usage: {psutil.cpu_percent(interval=1)}% | |
RAM Usage: {psutil.virtual_memory().percent}% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Speech Recognition</title> | |
</head> | |
<body> | |
<button id="start" onclick="startRecognition()">Start Recognition</button> | |
<button id="end" onclick="stopRecognition()">Stop Recognition</button> | |
<p id="output"></p> | |
<script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HtmlCode = '''<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Speech Recognition</title> | |
</head> | |
<body> | |
<button id="start" onclick="startRecognition()">Start Recognition</button> | |
<button id="end" onclick="stopRecognition()">Stop Recognition</button> | |
<p id="output"></p> | |
<script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
responses = [ | |
"The rest of the result has been printed to the chat screen, kindly check it out sir.", | |
"The rest of the text is now on the chat screen, sir, please check it.", | |
"You can see the rest of the text on the chat screen, sir.", | |
"The remaining part of the text is now on the chat screen, sir.", | |
"Sir, you'll find more text on the chat screen for you to see.", | |
"The rest of the answer is now on the chat screen, sir.", | |
"Sir, please look at the chat screen, the rest of the answer is there.", | |
"You'll find the complete answer on the chat screen, sir.", | |
"The next part of the text is on the chat screen, sir.", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from googlesearch import search | |
from groq import Groq | |
from json import load, dump | |
import datetime | |
from dotenv import dotenv_values | |
env_vars = dotenv_values(".env") | |
Username = env_vars.get("Username") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System = f"""Hello, I am {Username}, You are a very accurate and advanced AI chatbot named {Assistantname} which also has real-time up-to-date information from the internet. | |
*** Do not tell time until I ask, do not talk too much, just answer the question.*** | |
*** Reply in the same language in which the question is asked. *** | |
*** Do not provide notes in the output, just answer the question and never mention your training data. *** | |
*** After answering, ask a related question. If no related question is possible, do not ask anything. *** | |
*** Your developer is Rishabh Kumar, who has been developing you since 20-Aug-2021. You were completed on 09-Feb-2025. | |
If someone asks about your birthdate, say 20-Aug-2021 and also calculate your exact age in years, days, hours, minutes, and seconds from today's time. *** | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
preamble = """ | |
You are a very accurate Decision-Making Model, which decides what kind of a query is given to you. | |
You will decide whether a query is a 'general' query, a 'realtime' query, or is asking to perform any task or automation like 'open facebook, instagram', 'can you write a application and open it in notepad' | |
*** Do not answer any query, just decide what kind of query is given to you. *** | |
-> Respond with 'general ( query )' if a query can be answered by a llm model (conversational ai chatbot) and doesn't require any up to date information like if the query is 'who was akbar?' respond with 'general who was akbar?', if the query is 'how can i study more effectively?' respond with 'general how can i study more effectively?', if the query is 'can you help me with this math problem?' respond with 'general can you help me with this math problem?', if the query is 'Thanks, i really liked it.' respond with 'general thanks, i really liked it.' , if the query is 'what is python programming language?' respond |