refactor code
This commit is contained in:
parent
23c9f95fce
commit
0fcae7a20f
@ -17,6 +17,7 @@ if __name__ == '__main__':
|
||||
# Join the room
|
||||
sock.emit('join', json.dumps({'uuid': 'clientpc'}))
|
||||
|
||||
|
||||
# Listen for messages from the server
|
||||
@sock.on('message_from_assistant')
|
||||
def on_message_from_jarvis(data):
|
||||
|
2
run.py
2
run.py
@ -1,8 +1,8 @@
|
||||
import logging
|
||||
|
||||
from src.audio import audio_utils
|
||||
from src.database import db_utils
|
||||
from src.constants import TTSEngine, STTEngine
|
||||
from src.database import db_utils
|
||||
from src.network import api
|
||||
|
||||
# import lingua_franca
|
||||
|
3
setup.py
3
setup.py
@ -1,7 +1,8 @@
|
||||
# Always prefer setuptools over distutils
|
||||
from setuptools import setup, find_packages
|
||||
import pathlib
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
here = pathlib.Path(__file__).parent.resolve()
|
||||
|
||||
# Get the long description from the README file
|
||||
|
@ -1,7 +1,6 @@
|
||||
import logging
|
||||
import os.path
|
||||
import sqlite3
|
||||
from pathlib import Path
|
||||
|
||||
from src.get_path_file import project_path
|
||||
|
||||
|
@ -5,8 +5,8 @@ import openai
|
||||
from flask import Flask, request
|
||||
from flask_socketio import SocketIO
|
||||
|
||||
from src.network import endpoint_handler, socket_handler
|
||||
from src.constants import Endpoints, Sockets
|
||||
from src.network import endpoint_handler, socket_handler
|
||||
|
||||
# Set this variable to "threading", "eventlet" or "gevent" to test the
|
||||
# different async modes, or leave it set to None for the application to choose
|
||||
|
@ -1,6 +1,7 @@
|
||||
--- Create a commands table that contains all the already executed commandes and the simplified version by ChatGPT
|
||||
DROP TABLE IF EXISTS commands;
|
||||
CREATE TABLE commands (
|
||||
CREATE TABLE commands
|
||||
(
|
||||
id INTEGER PRIMARY KEY,
|
||||
original_command VARCHAR NOT NULL,
|
||||
simplified_command VARCHAR NOT NULL,
|
||||
@ -8,7 +9,8 @@ CREATE TABLE commands (
|
||||
);
|
||||
|
||||
DROP TABLE IF EXISTS responses;
|
||||
CREATE TABLE responses (
|
||||
CREATE TABLE responses
|
||||
(
|
||||
id INTEGER PRIMARY KEY,
|
||||
response VARCHAR NOT NULL
|
||||
);
|
Loading…
Reference in New Issue
Block a user