-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4880911
commit 4d7b2ee
Showing
9 changed files
with
243 additions
and
121 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 |
---|---|---|
@@ -0,0 +1,111 @@ | ||
[tool.poetry] | ||
name = "open-interpreter" | ||
packages = [ | ||
{include = "interpreter"}, | ||
{include = "scripts"}, | ||
{include = "interpreter_1"}, | ||
] | ||
version = "0.4.4" # Use "-rc1", "-rc2", etc. for pre-release versions | ||
description = "Let language models run code" | ||
authors = ["Killian Lucas <[email protected]>"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
|
||
# Optional [os] dependencies | ||
opencv-python = { version = "^4.8.1.78", optional = true } | ||
plyer = { version = "^2.1.0", optional = true } | ||
pywinctl = { version = "^0.3", optional = true } | ||
pytesseract = { version = "^0.3.10", optional = true } | ||
sentence-transformers = { version = "^2.5.1", optional = true } | ||
nltk = { version = "^3.8.1", optional = true } | ||
ipywidgets = { version = "^8.1.2", optional = true } | ||
torch = { version = "^2.2.1", optional = true } | ||
timm = { version = "^0.9.16", optional = true } | ||
|
||
# Optional [safe] dependencies | ||
semgrep = { version = "^1.52.0", optional = true } | ||
|
||
# Optional [local] dependencies | ||
transformers = { version = "4.41.2", optional = true } | ||
einops = { version = "^0.8.0", optional = true } | ||
torchvision = { version = "^0.18.0", optional = true } | ||
easyocr = { version = "^1.7.1", optional = true } | ||
|
||
# Optional [server] dependencies | ||
janus = { version = "^1.0.0", optional = true } | ||
|
||
# Required dependencies | ||
python = ">=3.9,<4" | ||
setuptools = "*" | ||
astor = "^0.8.1" | ||
git-python = "^1.0.3" | ||
inquirer = "^3.1.3" | ||
pyyaml = "^6.0.1" | ||
rich = "^13.4.2" | ||
six = "^1.16.0" | ||
tokentrim = "^0.1.13" | ||
wget = "^3.2" | ||
psutil = "^5.9.6" | ||
pyreadline3 = {version = "^3.4.1", markers = "sys_platform == 'win32'"} | ||
html2image = "^2.0.4.3" | ||
send2trash = "^1.8.2" | ||
ipykernel = "^6.26.0" | ||
jupyter-client = "^8.6.0" | ||
matplotlib = "^3.8.2" | ||
toml = "^0.10.2" | ||
tiktoken = "^0.7.0" | ||
platformdirs = "^4.2.0" | ||
pydantic = "^2.6.4" | ||
google-generativeai = "^0.7.1" | ||
pyperclip = "^1.9.0" | ||
yaspin = "^3.0.2" | ||
shortuuid = "^1.0.13" | ||
litellm = "^1.41.26" | ||
starlette = ">=0.37.2,<0.42.0" | ||
html2text = "^2024.2.26" | ||
selenium = "^4.24.0" | ||
webdriver-manager = "^4.0.2" | ||
anthropic = "^0.37.1" | ||
pyautogui = "^0.9.54" | ||
typer = "^0.12.5" | ||
fastapi = "^0.111.0" | ||
uvicorn = "^0.30.1" | ||
screeninfo = "^0.8.1" | ||
pyte = "^0.8.2" | ||
pygments = "^2.18.0" | ||
tabulate = "^0.9.0" | ||
|
||
[tool.poetry.extras] | ||
os = ["opencv-python", "pyautogui", "plyer", "pywinctl", "pytesseract", "sentence-transformers", "ipywidgets", "timm"] | ||
safe = ["semgrep"] | ||
local = ["opencv-python", "pytesseract", "torch", "transformers", "einops", "torchvision", "easyocr"] | ||
server = ["fastapi", "janus", "uvicorn"] | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
black = "^23.10.1" | ||
isort = "^5.12.0" | ||
pre-commit = "^3.5.0" | ||
pytest = "^7.4.0" | ||
sniffio = "^1.3.0" | ||
websockets = "^13.1" | ||
pytest-asyncio = "<0.24.0" | ||
pdoc = "^15.0.0" | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry.scripts] | ||
interpreter = "interpreter.terminal_interface.start_terminal_interface:main" | ||
wtf = "scripts.wtf:main" | ||
interpreter-classic = "interpreter.terminal_interface.start_terminal_interface:main" | ||
i = "interpreter_1.cli:main" | ||
|
||
[tool.black] | ||
target-version = ['py311'] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
multi_line_output = 3 | ||
include_trailing_comma = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import sys | ||
import threading | ||
import time | ||
|
||
|
||
class SimpleSpinner: | ||
"""A simple text-based spinner for command line interfaces.""" | ||
|
||
def __init__(self, text=""): | ||
self.spinner_cycle = [" ", ". ", ".. ", "..."] | ||
self.text = text | ||
self.keep_running = False | ||
self.spinner_thread = None | ||
|
||
def _spin(self): | ||
while self.keep_running: | ||
for frame in self.spinner_cycle: | ||
if not self.keep_running: | ||
break | ||
# Clear the line and write the new frame | ||
sys.stdout.write("\r" + self.text + frame) | ||
sys.stdout.flush() | ||
time.sleep(0.2) # Control animation speed | ||
|
||
def start(self): | ||
"""Start the spinner animation in a separate thread.""" | ||
if not self.spinner_thread: | ||
self.keep_running = True | ||
self.spinner_thread = threading.Thread(target=self._spin) | ||
self.spinner_thread.daemon = True | ||
self.spinner_thread.start() | ||
|
||
def stop(self): | ||
"""Stop the spinner animation and clear the line.""" | ||
self.keep_running = False | ||
if self.spinner_thread: | ||
self.spinner_thread.join() | ||
self.spinner_thread = None | ||
# Clear the spinner from the line | ||
sys.stdout.write("\r" + " " * (len(self.text) + 3) + "\r") | ||
sys.stdout.flush() |
Oops, something went wrong.