From c0b84f6f76d1c3a001f280641d49f5e2e9cc5e7a Mon Sep 17 00:00:00 2001 From: Esteban Herrera Date: Tue, 5 Mar 2024 00:08:38 -0600 Subject: [PATCH 01/11] Remove comments from the github action --- .github/workflows/python-package-conda.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 0d33e3b8..36dad58e 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -20,10 +20,7 @@ jobs: echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies run: | - # Conda doesn't currently offer a built-in way to specifically skip a - # single package during environment creation, like: conda env create --file commbase_env.yaml --name commbase_env - #conda env update --file commbase_env.yaml --name commbase_env - name: Lint with flake8 run: | From a2dd3e98a94140442471b6fa0f55a5cc6e3fc5d2 Mon Sep 17 00:00:00 2001 From: Esteban Herrera Date: Tue, 5 Mar 2024 13:47:34 -0600 Subject: [PATCH 02/11] Update control patterns --- bundles/libcommbase/README.md | 23 ++++++++++++++++++- .../control_patterns.json | 1 + 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/bundles/libcommbase/README.md b/bundles/libcommbase/README.md index 6b85978e..cd55e353 100644 --- a/bundles/libcommbase/README.md +++ b/bundles/libcommbase/README.md @@ -11,21 +11,38 @@ libcommbase is a collection of libraries to centralize common functions that can libcommbase comes with 26 reliable and mutually exclusive control messages that can be recorded and sent forward together with the parsed messages and be used by skill applications to parameterize any skill option or be bypassed for message management/handling in any application subsequently. These control messages can also be changed or customized in its respective patterns file, and ultimately, increase or decrease in number preferably during your app designing phase. These out-of-the-box controls are: +### Cancel previous actions + * stop_previous_command -* reproduce_previuos_discourse + +### Repetitions + * rerun_previous_command +* reproduce_previuos_discourse + +### Start Reminder Countdowns + * start_five_mins_question_reminder_countdown * start_ten_mins_question_reminder_countdown * start_twenty_mins_question_reminder_countdown * start_thirty_mins_question_reminder_countdown * remind_a_queued_question_put_on_hold + +### Take decisions + * accept_changes * deny_changes * confirm_a_confirmation_request + +### Select Options + * select_option_number_one * select_option_number_two * select_option_number_three * select_option_number_four + +### Use Modes + * request_the_current_mode * enter_the_computer_mode * enter_the_robot_mode @@ -33,7 +50,11 @@ libcommbase comes with 26 reliable and mutually exclusive control messages that * enter_the_boat_mode * enter_the_plane_mode * enter_the_starship_mode +* enter_the_iron_man_mode * enter_the_refrigerator_mode + +### Use Submodes + * enter_the_automatic_submode * enter_the_automated_submode * enter_the_autonomous_submode diff --git a/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json b/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json index 079fd9ba..338c84bf 100644 --- a/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json +++ b/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json @@ -21,6 +21,7 @@ "enter_the_boat_mode": ["Okay enter the boat mode.", "Ok enter the boat mode."], "enter_the_plane_mode": ["Okay enter the plane mode.", "Ok enter the plane mode."], "enter_the_starship_mode": ["Okay enter the starship mode.", "Ok enter the starship mode."], + "enter_the_Iron_Man_mode": ["Okay enter the iron man mode.", "Ok enter the iron man mode."], "enter_the_refrigerator_mode": ["Okay enter the refrigerator mode.", "Ok enter the refrigerator mode."], "enter_the_automatic_submode": ["Okay enter the automatic mode.", "Ok enter the automatic mode."], "enter_the_automated_submode": ["Okay enter the automated mode.", "Ok enter the automated mode."], From 8d136011427697024caf9ef03612da7eea94430f Mon Sep 17 00:00:00 2001 From: Esteban Herrera Date: Tue, 5 Mar 2024 13:53:40 -0600 Subject: [PATCH 03/11] Center Title --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6d716384..a72db3e0 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,12 @@ [![json-lint](https://github.com/mydroidandi/commbase/actions/workflows/jq-json-lint.yml/badge.svg)](https://github.com/mydroidandi/commbase/actions/workflows/jq-json-lint.yml) [![Shell Linter](https://github.com/mydroidandi/commbase/actions/workflows/shell-lint.yml/badge.svg)](https://github.com/mydroidandi/commbase/actions/workflows/shell-lint.yml) +
+ # Commbase Commbase +
+ Commbase Commbase is a module and library bundler, and a flexible ✨ development framework ✨ designed to empower computers and other devices with advanced conversational AI capabilities. It incorporates third-party LLMs to enable features such as "distributed AIs" or "multi-agent systems" (MAS). Commbase extends its reach to applications and diverse devices, including droids, smart appliances, and various types of vehicles. It runs on a single machine or a set of two machines in a client-server architecture. From eeeb9cc199888259d1c924eb8f132d84f7ff03f2 Mon Sep 17 00:00:00 2001 From: Esteban Herrera Date: Tue, 5 Mar 2024 13:54:38 -0600 Subject: [PATCH 04/11] Center screenshot --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a72db3e0..e274017b 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ # Commbase Commbase - - Commbase + + Commbase is a module and library bundler, and a flexible ✨ development framework ✨ designed to empower computers and other devices with advanced conversational AI capabilities. It incorporates third-party LLMs to enable features such as "distributed AIs" or "multi-agent systems" (MAS). Commbase extends its reach to applications and diverse devices, including droids, smart appliances, and various types of vehicles. It runs on a single machine or a set of two machines in a client-server architecture. ## Usage From c30cafec6cfe22c6dc1827336430c41f5af7bfcd Mon Sep 17 00:00:00 2001 From: Esteban Herrera Date: Tue, 5 Mar 2024 13:54:38 -0600 Subject: [PATCH 05/11] Center screenshot --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a72db3e0..04852025 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,12 @@ +
+ Commbase +
+ Commbase is a module and library bundler, and a flexible ✨ development framework ✨ designed to empower computers and other devices with advanced conversational AI capabilities. It incorporates third-party LLMs to enable features such as "distributed AIs" or "multi-agent systems" (MAS). Commbase extends its reach to applications and diverse devices, including droids, smart appliances, and various types of vehicles. It runs on a single machine or a set of two machines in a client-server architecture. ## Usage From d521b7373c7619e7ca6da78fb0f93899b59dcd49 Mon Sep 17 00:00:00 2001 From: Esteban Herrera Date: Tue, 5 Mar 2024 14:05:34 -0600 Subject: [PATCH 06/11] Add a br tag --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 04852025..409341d2 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ +
+ Commbase is a module and library bundler, and a flexible ✨ development framework ✨ designed to empower computers and other devices with advanced conversational AI capabilities. It incorporates third-party LLMs to enable features such as "distributed AIs" or "multi-agent systems" (MAS). Commbase extends its reach to applications and diverse devices, including droids, smart appliances, and various types of vehicles. It runs on a single machine or a set of two machines in a client-server architecture. ## Usage From 465befdf53763a6a16b2dcbc49276457b28ac90b Mon Sep 17 00:00:00 2001 From: Esteban Herrera Date: Tue, 5 Mar 2024 14:07:24 -0600 Subject: [PATCH 07/11] Center text --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 409341d2..75f6eff0 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,12 @@ Commbase - -
Commbase is a module and library bundler, and a flexible ✨ development framework ✨ designed to empower computers and other devices with advanced conversational AI capabilities. It incorporates third-party LLMs to enable features such as "distributed AIs" or "multi-agent systems" (MAS). Commbase extends its reach to applications and diverse devices, including droids, smart appliances, and various types of vehicles. It runs on a single machine or a set of two machines in a client-server architecture. + + ## Usage [`INSTALL`](./INSTALL) Commbase and then run the next command in a terminal to start the program: From 0343243f5c0bd314b836b0a886da7bf3de6de629 Mon Sep 17 00:00:00 2001 From: Esteban Herrera Date: Tue, 5 Mar 2024 14:09:33 -0600 Subject: [PATCH 08/11] Center text --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 75f6eff0..03d190b6 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ +
+ [![Python Package using Conda](https://github.com/mydroidandi/commbase/actions/workflows/python-package-conda.yml/badge.svg)](https://github.com/mydroidandi/commbase/actions/workflows/python-package-conda.yml) [![Python Version](https://img.shields.io/badge/Python-3.10%20%7C%203.11%20%7C%203.12-blue)](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue) [![flake8 Lint](https://github.com/mydroidandi/commbase/actions/workflows/python-flake8-lint.yml/badge.svg)](https://github.com/mydroidandi/commbase/actions/workflows/python-flake8-lint.yml) [![json-lint](https://github.com/mydroidandi/commbase/actions/workflows/jq-json-lint.yml/badge.svg)](https://github.com/mydroidandi/commbase/actions/workflows/jq-json-lint.yml) [![Shell Linter](https://github.com/mydroidandi/commbase/actions/workflows/shell-lint.yml/badge.svg)](https://github.com/mydroidandi/commbase/actions/workflows/shell-lint.yml) +
+
# Commbase Commbase @@ -14,8 +18,12 @@ Commbase +
+
+
+ Commbase is a module and library bundler, and a flexible ✨ development framework ✨ designed to empower computers and other devices with advanced conversational AI capabilities. It incorporates third-party LLMs to enable features such as "distributed AIs" or "multi-agent systems" (MAS). Commbase extends its reach to applications and diverse devices, including droids, smart appliances, and various types of vehicles. It runs on a single machine or a set of two machines in a client-server architecture.
From 9ebbac6869815d0c665052a21d21cfb33a3ea631 Mon Sep 17 00:00:00 2001 From: Esteban Herrera Date: Tue, 5 Mar 2024 14:22:44 -0600 Subject: [PATCH 09/11] Change text --- bundles/libcommbase/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/libcommbase/README.md b/bundles/libcommbase/README.md index cd55e353..2034dcec 100644 --- a/bundles/libcommbase/README.md +++ b/bundles/libcommbase/README.md @@ -9,7 +9,7 @@ libcommbase is a collection of libraries to centralize common functions that can ## controller -libcommbase comes with 26 reliable and mutually exclusive control messages that can be recorded and sent forward together with the parsed messages and be used by skill applications to parameterize any skill option or be bypassed for message management/handling in any application subsequently. These control messages can also be changed or customized in its respective patterns file, and ultimately, increase or decrease in number preferably during your app designing phase. These out-of-the-box controls are: +libcommbase comes with a number of possible reliable and mutually exclusive control messages that can be recorded and sent forward to get processed by skill applications. These control messages can also be changed or customized in its respective patterns file, and ultimately, increase or decrease in number preferably during your app designing phase. These out-of-the-box controls are: ### Cancel previous actions @@ -28,7 +28,7 @@ libcommbase comes with 26 reliable and mutually exclusive control messages that * start_thirty_mins_question_reminder_countdown * remind_a_queued_question_put_on_hold -### Take decisions +### Decision-Making * accept_changes * deny_changes From 86c1d05f9e0598e5f4a4b8f585be581d5bb3d01f Mon Sep 17 00:00:00 2001 From: Esteban Herrera Date: Tue, 5 Mar 2024 16:16:33 -0600 Subject: [PATCH 10/11] Fix controller and control patterns --- bundles/libcommbase/libcommbase/routines/controller.sh | 4 ++-- .../en_us/openai_whisper_model_base/control_patterns.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bundles/libcommbase/libcommbase/routines/controller.sh b/bundles/libcommbase/libcommbase/routines/controller.sh index bdf37603..78c41b2b 100644 --- a/bundles/libcommbase/libcommbase/routines/controller.sh +++ b/bundles/libcommbase/libcommbase/routines/controller.sh @@ -38,7 +38,7 @@ # through the commbase-data-exchange client. controller() { # Imports - source "$COMMBASE_APP_DIR/config/commbase.conf" + source "$COMMBASE_APP_DIR"/config/commbase.conf # Imports from libcommbase update_control_in_messages_json=$COMMBASE_APP_DIR/bundles/libcommbase/libcommbase/routines/update_control_in_messages_json.sh @@ -51,7 +51,7 @@ controller() { current_request=$(jq -r '.messages[1].current_request' <<< "$messages_json") # Extract the JSON object control patterns from file and process them - patterns_file=$(<"$COMMBASE_APP_DIR""$CONTROL_PATTERNS_FILE") + patterns_file=$(<"$COMMBASE_APP_DIR"/"$CONTROL_PATTERNS_FILE") #cat $COMMBASE_APP_DIR$CONTROL_PATTERNS_FILE | jq 'to_entries[] | .key, .value[]' matching_property="" diff --git a/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json b/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json index 338c84bf..8a5a9a5d 100644 --- a/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json +++ b/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json @@ -21,7 +21,7 @@ "enter_the_boat_mode": ["Okay enter the boat mode.", "Ok enter the boat mode."], "enter_the_plane_mode": ["Okay enter the plane mode.", "Ok enter the plane mode."], "enter_the_starship_mode": ["Okay enter the starship mode.", "Ok enter the starship mode."], - "enter_the_Iron_Man_mode": ["Okay enter the iron man mode.", "Ok enter the iron man mode."], + "enter_the_iron_man_mode": ["Okay enter the iron man mode.", "Ok enter the iron man mode."], "enter_the_refrigerator_mode": ["Okay enter the refrigerator mode.", "Ok enter the refrigerator mode."], "enter_the_automatic_submode": ["Okay enter the automatic mode.", "Ok enter the automatic mode."], "enter_the_automated_submode": ["Okay enter the automated mode.", "Ok enter the automated mode."], From 88b16148d0605f151d41a68f70a27cd235a3ab4a Mon Sep 17 00:00:00 2001 From: Esteban Herrera Date: Tue, 5 Mar 2024 17:49:03 -0600 Subject: [PATCH 11/11] Create new user mode and submode variables --- assets/docs/User's Guide.md | 21 ++++++++++++++++++- .../control_patterns.json | 2 +- config/commbase.conf | 2 ++ data/.chat_log.txt | 8 +++++++ .../reset_commbase.conf/commbase.conf.default | 4 +++- src/app.sh | 2 +- 6 files changed, 35 insertions(+), 4 deletions(-) diff --git a/assets/docs/User's Guide.md b/assets/docs/User's Guide.md index e59604c7..1746040d 100644 --- a/assets/docs/User's Guide.md +++ b/assets/docs/User's Guide.md @@ -123,7 +123,7 @@ The window 1, "Commbase", contains 7 panes, where every pane runs a component: - Pane 2. It is the client component. - Pane 3. It is the server component. - Pane 4. It is the speech recognizer component. -- Pane 5. It is the animation component. +- Pane 5. It is the use mode component. - Pane 6. It is the audio mixer component. - Pane 7. It is the user terminal component. It is almost always focused, except when is used by Commbase for launching skill scripts. @@ -681,6 +681,25 @@ The default version of the file **commbase.conf** contains the next values: - Example values: - `en_us` (Default): This setting designates the default locale as English (United States). Users with this locale will encounter the application in English, experiencing the predetermined language and formatting preferences specified by this setting. +- **CURRENT_MODE**: + - Description: The current use mode your app is running on. Modes are defined in the control patterns file. The default location for this file is **bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json**. You can change from any mode to another by changing the value of this variable. The action will update the mode component status on screen. + - Example values: + - `COMPUTER` (Default): The computer mode. It is the only mode packaged with Commbase. + - `ROBOT`: The robot mode. If in your case, you are free to program this mode to meet your requirements. + - `CAR`: The car mode. If in your use case, you are free to program this mode to meet your requirements. + - `BOAT`: The boat mode. If in your use case, you are free to program this mode to meet your requirements. + - `PLANE`: The plane mode. If in your use case, you are free to program this mode to meet your requirements. + - `STARSHIP`: The starship mode. If in your use case, you are free to program this mode to meet your requirements. + - `IRON MAN`: The iron man mode. If in your use case, you are free to program this mode to meet your requirements. + - `REFRIGERATOR`: The refrigerator mode. If in your use case, you are free to program this mode to meet your requirements. + +- **CURRENT_SUB_MODE**: + - Description: The current use mode your app is running on. Modes are defined in the control patterns file. The default location for this file is **bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json**. You can trigger from any submode to another by changing the value of this variable. Every submode relies on its mode to work. + - Possible values: + - `AUTOMATIC` (Default): The automatic submode. It is the only mode packaged with Commbase. + - `AUTOMATED` (Default): The automated submode. If in your use case, you are free to program this mode to meet your requirements. + - `AUTONOMOUS` (Default): The autonomous submode. If in your use case, you are free to program this mode to meet your requirements. + - **COMMBASE_DATA_EXCHANGE_SERVER_HOST_ADDRESS**: - Description: The host address for the Commbase Data Exchange Server. - Example value: diff --git a/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json b/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json index 8a5a9a5d..0cea2d30 100644 --- a/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json +++ b/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json @@ -25,5 +25,5 @@ "enter_the_refrigerator_mode": ["Okay enter the refrigerator mode.", "Ok enter the refrigerator mode."], "enter_the_automatic_submode": ["Okay enter the automatic mode.", "Ok enter the automatic mode."], "enter_the_automated_submode": ["Okay enter the automated mode.", "Ok enter the automated mode."], - "enter_the_autonomouns_submode": ["Okay enter the autonomous mode.", "Ok enter the automomous mode."] + "enter_the_autonomous_submode": ["Okay enter the autonomous mode.", "Ok enter the autonomous mode."] } diff --git a/config/commbase.conf b/config/commbase.conf index a70140ea..e17adace 100644 --- a/config/commbase.conf +++ b/config/commbase.conf @@ -2,6 +2,8 @@ PYTHON_ENV_VERSION="python" STT_PROCESS_CPU_LIMIT_PERCENTAGE="90" CONDA_ENV_NAME_IF_EXISTS="commbase_env" COMMBASE_LOCALE="en_us" +CURRENT_MODE="COMPUTER" +CURRENT_SUB_MODE="AUTOMATIC" COMMBASE_DATA_EXCHANGE_SERVER_HOST_ADDRESS="127.0.0.1" COMMBASE_DATA_EXCHANGE_SERVER_PORT="5000" COMMBASE_DATA_EXCHANGE_SERVER_CONNECTION_FILE_PATH="$COMMBASE_APP_DIR/bundles/commbase-data-exchange/server/server_http_websocket.py" diff --git a/data/.chat_log.txt b/data/.chat_log.txt index 8d282e85..13d1b12d 100644 --- a/data/.chat_log.txt +++ b/data/.chat_log.txt @@ -35,3 +35,11 @@ 🧑 END USER: 🧑 END USER: 🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: diff --git a/scripts/utilities/reset_commbase.conf/commbase.conf.default b/scripts/utilities/reset_commbase.conf/commbase.conf.default index 0b8ccca6..e17adace 100644 --- a/scripts/utilities/reset_commbase.conf/commbase.conf.default +++ b/scripts/utilities/reset_commbase.conf/commbase.conf.default @@ -2,6 +2,8 @@ PYTHON_ENV_VERSION="python" STT_PROCESS_CPU_LIMIT_PERCENTAGE="90" CONDA_ENV_NAME_IF_EXISTS="commbase_env" COMMBASE_LOCALE="en_us" +CURRENT_MODE="COMPUTER" +CURRENT_SUB_MODE="AUTOMATIC" COMMBASE_DATA_EXCHANGE_SERVER_HOST_ADDRESS="127.0.0.1" COMMBASE_DATA_EXCHANGE_SERVER_PORT="5000" COMMBASE_DATA_EXCHANGE_SERVER_CONNECTION_FILE_PATH="$COMMBASE_APP_DIR/bundles/commbase-data-exchange/server/server_http_websocket.py" @@ -58,7 +60,7 @@ ASCII_ART_FILE_PATH="/assets/ascii/avatar.asc" ASSISTANT_MICROPHONE_INSTRUCTION_FILE="/bundles/libcommbase/resources/discourses/mute_the_microphone_to_pause_the_recording_instruction" MESSAGING_FILE="/data/.messages.json" MESSAGING_HISTORY_FILE="/history/.messaging_history" -CONTROL_PATTERNS_FILE="/bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json" +CONTROL_PATTERNS_FILE="bundles/libcommbase/resources/control_patterns/en_us/openai_whisper_model_base/control_patterns.json" ANSWER_UNKNOWN_COMMANDS_USING_AI_CHATBOT_ON="False" AI_CHATBOT_STRING="$COMMBASE_APP_DIR/bundles/commbase-llm-google-gemini-p/commbase_llm_google_gemini_p.py" UNKNOWN_COMMAND_AI_CHATBOT_WORDS_LIMIT="35" diff --git a/src/app.sh b/src/app.sh index 4d811b42..cbf446eb 100644 --- a/src/app.sh +++ b/src/app.sh @@ -111,7 +111,7 @@ app() { # send the enter key, and sleep. (tmux select-pane -t 5 && tmux send-keys " conda activate $CONDA_ENV_NAME_IF_EXISTS" C-m && sleep $time); # Run text_animation and then press enter - (tmux select-pane -t 5 && tmux send-keys " clear; bash $text_animation 'Commbase' 0.5" C-m && sleep $time); + (tmux select-pane -t 5 && tmux send-keys " clear; bash $text_animation '$CURRENT_MODE ($CURRENT_SUB_MODE)' 0.3" C-m && sleep $time); # Pane 6 # On window 0, select pane 6, activate the conda environment if it exists,