updated win func
This commit is contained in:
parent
b89051a37f
commit
d9a9eba4c7
@ -86,9 +86,11 @@ def wait(duration: float) -> None:
|
||||
"""Waits for the specified duration in seconds."""
|
||||
time.sleep(duration)
|
||||
|
||||
def windows_key() -> None:
|
||||
def search_pc(query: str) -> None:
|
||||
"""Presses the Windows key."""
|
||||
pyautogui.hotkey('win')
|
||||
wait(2)
|
||||
press_keyboard(KeyboardInput(text=query))
|
||||
|
||||
def reprompt(nextsteps: str, processor) -> None:
|
||||
"""Re-execute GPT and take a new screenshot."""
|
||||
@ -102,7 +104,7 @@ def _execute(name, args=[], processor=None):
|
||||
press_keyboard(KeyboardInput(**args))
|
||||
elif name == "wait":
|
||||
wait(**args)
|
||||
elif name == "windows_key":
|
||||
windows_key()
|
||||
elif name == "search_pc":
|
||||
search_pc(**args)
|
||||
elif name == "reprompt":
|
||||
reprompt(**args, processor=processor)
|
||||
|
@ -114,12 +114,16 @@ FUNCTIONS = [
|
||||
{
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "windows_key",
|
||||
"description": "Open the Start menu. Best to perform web searches, search apps, search settings, run Windows internal softwares, etc.",
|
||||
"name": "search_pc",
|
||||
"description": "Open the start menu, then searches for content. Use to open apps, open files/folders, or search the web.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"required": [],
|
||||
"properties": {
|
||||
"query": {
|
||||
"type": "string",
|
||||
"description": "The search query to perform."
|
||||
},
|
||||
"required": ["query"],
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user