Merge pull request #290 from OpenInterpreter/update-documentation

Global interpreter
pull/266/merge
killian 6 months ago committed by GitHub
commit 6c3bcd214b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

3267
software/poetry.lock generated

File diff suppressed because it is too large Load Diff

@ -40,15 +40,16 @@ ctranslate2 = "4.1.0"
py3-tts = "^3.5"
elevenlabs = "1.2.2"
groq = "^0.5.0"
open-interpreter = {extras = ["os"], version = "^0.2.6"}
litellm = "1.35.35"
openai = "1.30.5"
open-interpreter = {extras = ["os"], version = "*"}
litellm = "*"
openai = "*"
pywebview = "*"
pyobjc = "*"
sentry-sdk = "^2.4.0"
plyer = "^2.1.0"
pywinctl = "^0.3"
certifi = "^2024.7.4"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

@ -10,10 +10,11 @@ from typing import List, Dict, Any
import os
import importlib.util
os.environ["STT_RUNNER"] = "server"
os.environ["TTS_RUNNER"] = "server"
app = FastAPI()
app.add_middleware(
@ -40,6 +41,9 @@ async def websocket_endpoint(
):
await websocket.accept()
global global_interpreter
interpreter = global_interpreter
# Send the tts_service value to the client
await websocket.send_text(
json.dumps({"type": "config", "tts_service": interpreter.interpreter.tts})
@ -104,6 +108,9 @@ async def main(server_host, server_port, profile, debug):
# Make it async
interpreter = AsyncInterpreter(interpreter, debug)
global global_interpreter
global_interpreter = interpreter
print(f"Starting server on {server_host}:{server_port}")
config = Config(app, host=server_host, port=server_port, lifespan="on")
server = Server(config)

Loading…
Cancel
Save