Change port number to 10001
This commit is contained in:
parent
3a07d59391
commit
310052d71d
|
@ -255,9 +255,9 @@ class Device:
|
||||||
try:
|
try:
|
||||||
async with websockets.connect(WS_URL) as websocket:
|
async with websockets.connect(WS_URL) as websocket:
|
||||||
if CAMERA_ENABLED:
|
if CAMERA_ENABLED:
|
||||||
print("Press the spacebar to start/stop recording. Press 'c' to capture an image from the camera. Press CTRL-C to exit.")
|
print("\nPress the spacebar to start/stop recording. Press 'c' to capture an image from the camera. Press CTRL-C to exit.")
|
||||||
else:
|
else:
|
||||||
print("Press the spacebar to start/stop recording. Press CTRL-C to exit.")
|
print("\nPress the spacebar to start/stop recording. Press CTRL-C to exit.")
|
||||||
|
|
||||||
asyncio.create_task(self.message_sender(websocket))
|
asyncio.create_task(self.message_sender(websocket))
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <WebSocketsClient.h>
|
#include <WebSocketsClient.h>
|
||||||
|
|
||||||
String server_domain = "";
|
String server_domain = "";
|
||||||
int server_port = 8000;
|
int server_port = 10001;
|
||||||
|
|
||||||
// ----------------------- START OF WIFI CAPTIVE PORTAL -------------------
|
// ----------------------- START OF WIFI CAPTIVE PORTAL -------------------
|
||||||
|
|
||||||
|
|
|
@ -325,10 +325,7 @@ def configure_interpreter(interpreter: OpenInterpreter):
|
||||||
with open(file, "r") as f:
|
with open(file, "r") as f:
|
||||||
code_to_run += f.read() + "\n"
|
code_to_run += f.read() + "\n"
|
||||||
|
|
||||||
print("IMPORTING SKILLS:\n", code_to_run)
|
interpreter.computer.run("python", code_to_run)
|
||||||
|
|
||||||
for line in interpreter.computer.run("python", code_to_run, stream=True):
|
|
||||||
print(line)
|
|
||||||
|
|
||||||
interpreter.computer.save_skills = True
|
interpreter.computer.save_skills = True
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ app = FastAPI()
|
||||||
app_dir = user_data_dir('01')
|
app_dir = user_data_dir('01')
|
||||||
conversation_history_path = os.path.join(app_dir, 'conversations', 'user.json')
|
conversation_history_path = os.path.join(app_dir, 'conversations', 'user.json')
|
||||||
|
|
||||||
SERVER_LOCAL_PORT = int(os.getenv('SERVER_LOCAL_PORT', 8000))
|
SERVER_LOCAL_PORT = int(os.getenv('SERVER_LOCAL_PORT', 10001))
|
||||||
|
|
||||||
|
|
||||||
# This is so we only say() full sentences
|
# This is so we only say() full sentences
|
||||||
|
|
|
@ -29,7 +29,7 @@ def schedule(message="", start=None, interval=None) -> None:
|
||||||
escaped_question = prefixed_message.replace('"', '\\"')
|
escaped_question = prefixed_message.replace('"', '\\"')
|
||||||
json_data = f"{{\\\"text\\\": \\\"{escaped_question}\\\"}}"
|
json_data = f"{{\\\"text\\\": \\\"{escaped_question}\\\"}}"
|
||||||
|
|
||||||
command = f'''bash -c 'if [ "$(cat "{session_file_path}")" == "{file_session_value}" ]; then /usr/bin/curl -X POST -H "Content-Type: application/json" -d "{json_data}" http://localhost:8000/; fi' '''
|
command = f'''bash -c 'if [ "$(cat "{session_file_path}")" == "{file_session_value}" ]; then /usr/bin/curl -X POST -H "Content-Type: application/json" -d "{json_data}" http://localhost:10001/; fi' '''
|
||||||
|
|
||||||
cron = CronTab(user=True)
|
cron = CronTab(user=True)
|
||||||
job = cron.new(command=command)
|
job = cron.new(command=command)
|
||||||
|
|
|
@ -5,7 +5,7 @@ import shutil
|
||||||
import time
|
import time
|
||||||
from ..utils.print_markdown import print_markdown
|
from ..utils.print_markdown import print_markdown
|
||||||
|
|
||||||
def create_tunnel(tunnel_method='ngrok', server_host='localhost', server_port=8000):
|
def create_tunnel(tunnel_method='ngrok', server_host='localhost', server_port=10001):
|
||||||
print_markdown(f"Exposing server to the internet...")
|
print_markdown(f"Exposing server to the internet...")
|
||||||
|
|
||||||
if tunnel_method == "bore":
|
if tunnel_method == "bore":
|
||||||
|
|
|
@ -13,7 +13,7 @@ app = typer.Typer()
|
||||||
def run(
|
def run(
|
||||||
server: bool = typer.Option(False, "--server", help="Run server"),
|
server: bool = typer.Option(False, "--server", help="Run server"),
|
||||||
server_host: str = typer.Option("0.0.0.0", "--server-host", help="Specify the server host where the server will deploy"),
|
server_host: str = typer.Option("0.0.0.0", "--server-host", help="Specify the server host where the server will deploy"),
|
||||||
server_port: int = typer.Option(8000, "--server-port", help="Specify the server port where the server will deploy"),
|
server_port: int = typer.Option(10001, "--server-port", help="Specify the server port where the server will deploy"),
|
||||||
|
|
||||||
tunnel_service: str = typer.Option("ngrok", "--tunnel-service", help="Specify the tunnel service"),
|
tunnel_service: str = typer.Option("ngrok", "--tunnel-service", help="Specify the tunnel service"),
|
||||||
expose: bool = typer.Option(False, "--expose", help="Expose server to internet"),
|
expose: bool = typer.Option(False, "--expose", help="Expose server to internet"),
|
||||||
|
@ -62,7 +62,7 @@ def run(
|
||||||
def _run(
|
def _run(
|
||||||
server: bool = False,
|
server: bool = False,
|
||||||
server_host: str = "0.0.0.0",
|
server_host: str = "0.0.0.0",
|
||||||
server_port: int = 8000,
|
server_port: int = 10001,
|
||||||
|
|
||||||
tunnel_service: str = "bore",
|
tunnel_service: str = "bore",
|
||||||
expose: bool = False,
|
expose: bool = False,
|
||||||
|
|
|
@ -18,13 +18,13 @@ PIPER_VOICE_NAME="en_US-lessac-medium.onnx"
|
||||||
|
|
||||||
# If SERVER_START, this is where we'll serve the server.
|
# If SERVER_START, this is where we'll serve the server.
|
||||||
# If CLIENT_START, this is where the client expects the server to be.
|
# If CLIENT_START, this is where the client expects the server to be.
|
||||||
# SERVER_URL=ws://localhost:8000/
|
# SERVER_URL=ws://localhost:10001/
|
||||||
SERVER_URL=ws://0.0.0.0:8000/
|
SERVER_URL=ws://0.0.0.0:10001/
|
||||||
SERVER_START=True
|
SERVER_START=True
|
||||||
CLIENT_START=True
|
CLIENT_START=True
|
||||||
|
|
||||||
# The port to start the local server on
|
# The port to start the local server on
|
||||||
SERVER_LOCAL_PORT=8000
|
SERVER_LOCAL_PORT=10001
|
||||||
|
|
||||||
# Explicitly set the client type (macos, rpi)
|
# Explicitly set the client type (macos, rpi)
|
||||||
CLIENT_TYPE=auto
|
CLIENT_TYPE=auto
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
# - ngrok
|
# - ngrok
|
||||||
TUNNEL_METHOD=${TUNNEL_METHOD:-bore}
|
TUNNEL_METHOD=${TUNNEL_METHOD:-bore}
|
||||||
|
|
||||||
# Get the SERVER_PORT environment variable, but default to 8000
|
# Get the SERVER_PORT environment variable, but default to 10001
|
||||||
SERVER_LOCAL_PORT=${SERVER_LOCAL_PORT:-8000}
|
SERVER_LOCAL_PORT=${SERVER_LOCAL_PORT:-10001}
|
||||||
|
|
||||||
echo "Using $TUNNEL_METHOD to expose port $SERVER_LOCAL_PORT on localhost..."
|
echo "Using $TUNNEL_METHOD to expose port $SERVER_LOCAL_PORT on localhost..."
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ For more information, please read about <a href="/services/speech-to-text">speec
|
||||||
|
|
||||||
- `--server-port INTEGER`
|
- `--server-port INTEGER`
|
||||||
Specify the server port where the server will deploy.
|
Specify the server port where the server will deploy.
|
||||||
Default: `8000`.
|
Default: `10001`.
|
||||||
|
|
||||||
- `--tunnel-service TEXT`
|
- `--tunnel-service TEXT`
|
||||||
Specify the tunnel service.
|
Specify the tunnel service.
|
||||||
|
|
Loading…
Reference in New Issue