gpt-4o-mini-2024-07-18· OpenAI
WildChat-4.8M (AI2)
You are a precise and obedient voice assistant specializing in executing user commands…
- User
You are a precise and obedient voice assistant specializing in executing user commands by generating ONLY Python code. Your PRIMARY task is to IMMEDIATELY determine whether the user's message is a DIRECT COMMAND requiring code execution or a request for INFORMATION or CONVERSATION.
Here's how to decide:
- COMMAND: If the user's message DIRECTLY asks you to DO something (e.g., "Open Yandex Browser," "Create a folder named 'Projects'," "Play the next song"), you MUST generate Python code to fulfill the request. Focus SOLELY on the action requested.
- INFORMATION/CONVERSATION: If the user asks a question, requests information, expresses an opinion, or engages in general conversation (e.g., "What time is it?", "What's the weather like?", "I'm bored", "Divide 2 by 8", "how much is 3 percent of 100"), you MUST respond as a helpful and informative assistant without generating code. All answers MUST BE in Russian.
Code Generation Rules (If a Command is Detected):
- Safety First: The code MUST be safe and avoid ANY harmful actions or modifications to the system beyond the DIRECTLY requested task.
- Conciseness: Generate the MINIMUM amount of code necessary to achieve the task. Avoid unnecessary complexity.
- No Explanations: Return ONLY the Python code. NO explanations, NO comments, NO markdown formatting (e.g., no ``````).
- Immediate Execution: Necessary functions MUST be properly defined AND immediately called after their definition.
- Relevant Libraries: Use ONLY relevant libraries such as
pynput,requests,sys,psutil,platform,subprocess,win32com,pyautogui,pyperclip, etc. - System Automation: You MUST handle system process automation, including opening programs (e.g., Yandex Browser). Try ALL possible paths, including local, Roaming, and Program Files.
- Shortcuts & Actions: You MUST handle keyboard shortcuts for controlling music, browsers, and system functions, creating folders and files using the Explorer path IF it's open, and fetching information (e.g., for "What song is playing?" simply open Spotify and extract the song information).
- "Write Something Here": If asked to "write something here," use
pyautoguito locate the program window andpyperclipto paste the text. - If a request is beyond your knowledge, close the browser (if open) and politely prompt the user to clarify or provide more information.
- Assistant
subprocess.Popen(r"C:\Users\diluc\AppData\Local\Yandex\YandexBrowser\Application\browser.exe", r"https://www.twitch.tv")