-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/KillianLucas/open-interpreter
- Loading branch information
Showing
9 changed files
with
128 additions
and
83 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,57 +8,57 @@ The following functions are designed for language models to use in Open Interpre | |
|
||
Takes a screenshot of the primary display. | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
interpreter.computer.display.view() | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Display - Center | ||
|
||
Gets the x, y value of the center of the screen. | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
x, y = interpreter.computer.display.center() | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Keyboard - Hotkey | ||
|
||
Performs a hotkey on the computer | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
interpreter.computer.keboard.hotkey(" ", "command") | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Keyboard - Write | ||
|
||
Writes the text into the currently focused window. | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
interpreter.computer.keyboard.write("hello") | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Mouse - Click | ||
|
||
Clicks on the specified coordinates, or an icon, or text. If text is specified, OCR will be run on the screenshot to find the text coordinates and click on it. | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
# Click on coordinates | ||
interpreter.computer.mouse.click(x=100, y=100) | ||
|
||
|
@@ -69,15 +69,15 @@ interpreter.computer.mouse.click("Onscreen Text") | |
interpreter.computer.mouse.click(icon="gear icon") | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Mouse - Move | ||
|
||
Moves to the specified coordinates, or an icon, or text. If text is specified, OCR will be run on the screenshot to find the text coordinates and move to it. | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
# Click on coordinates | ||
interpreter.computer.mouse.move(x=100, y=100) | ||
|
||
|
@@ -88,152 +88,153 @@ interpreter.computer.mouse.move("Onscreen Text") | |
interpreter.computer.mouse.move(icon="gear icon") | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Mouse - Scroll | ||
|
||
Scrolls the mouse a specified number of pixels. | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
# Scroll Down | ||
interpreter.computer.mouse.scroll(-10) | ||
|
||
# Scroll Up | ||
interpreter.computer.mouse.scroll(10) | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Clipboard - View | ||
|
||
Returns the contents of the clipboard. | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
interpreter.computer.clipboard.view() | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### OS - Get Selected Text | ||
|
||
Get the selected text on the screen. | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
interpreter.computer.os.get_selected_text() | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Mail - Get | ||
|
||
Retrieves the last {number} emails from the inbox, optionally filtering for only unread emails. (Mac only) | ||
Retrieves the last `number` emails from the inbox, optionally filtering for only unread emails. (Mac only) | ||
|
||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
```python | ||
interpreter.computer.mail.get(number=10, unread=True) | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Mail - Send | ||
|
||
Sends an email with the given parameters using the default mail app. (Mac only) | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
interpreter.computer.mail.send("[email protected]", "Subject", "Body", ["path/to/attachment.pdf", "path/to/attachment2.pdf"]) | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Mail - Unread Count | ||
|
||
Retrieves the count of unread emails in the inbox. (Mac only) | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
interpreter.computer.mail.unread_count() | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### SMS - Send | ||
|
||
Send a text message using the default SMS app. (Mac only) | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
interpreter.computer.sms.send("2068675309", "Hello from Open Interpreter!") | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Contacts - Get Phone Number | ||
|
||
Returns the phone number of a contact name. (Mac only) | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
interpreter.computer.contacts.get_phone_number("John Doe") | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Contacts - Get Email Address | ||
|
||
Returns the email of a contact name. (Mac only) | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
interpreter.computer.contacts.get_phone_number("John Doe") | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Calendar - Get Events | ||
|
||
Fetches calendar events for the given date or date range from all calendars. (Mac only) | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
interpreter.computer.calendar.get_events(datetime, datetime) | ||
|
||
```python | ||
interpreter.computer.calendar.get_events(start_date=datetime, end_date=datetime) | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Calendar - Create Event | ||
|
||
Creates a new calendar event. Uses first calendar if none is specified (Mac only) | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
interpreter.computer.calendar.create_event(title="Title", start_date=datetime, end_date=datetime, location="Location", notes="Notes", calendar="Work") | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
||
### Calendar - Delete Event | ||
|
||
Delete a specific calendar event. (Mac only) | ||
|
||
<CodeGroup> | ||
|
||
```python Python | ||
|
||
```python | ||
interpreter.computer.calendar.delete_event(event_title="Title", start_date=datetime, calendar="Work") | ||
``` | ||
|
||
</CodeGroup> | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.