From ad58858a965896a27967d086315d5d20c1d8b30e Mon Sep 17 00:00:00 2001 From: bertybuttface <110790513+bertybuttface@users.noreply.github.com> Date: Thu, 26 Jan 2023 15:09:24 +0000 Subject: [PATCH 1/3] Upgrade matrix-chatgpt (1.2.3 -> 1.3.2) Add support for OPENAI_PRO for ChatGPT pro subscriptions. --- roles/custom/matrix-bot-chatgpt/defaults/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/custom/matrix-bot-chatgpt/defaults/main.yml b/roles/custom/matrix-bot-chatgpt/defaults/main.yml index d6119ca6b..86d185b76 100644 --- a/roles/custom/matrix-bot-chatgpt/defaults/main.yml +++ b/roles/custom/matrix-bot-chatgpt/defaults/main.yml @@ -9,7 +9,7 @@ matrix_bot_chatgpt_docker_repo: "https://github.com/matrixgpt/matrix-chatgpt-bot matrix_bot_chatgpt_docker_repo_version: "{{ 'latest' if matrix_bot_chatgpt_version == 'latest' else matrix_bot_chatgpt_version }}" matrix_bot_chatgpt_docker_src_files_path: "{{ matrix_base_data_path }}/chatgpt/docker-src" -matrix_bot_chatgpt_version: 1.2.3 +matrix_bot_chatgpt_version: 1.3.2 matrix_bot_chatgpt_docker_image: "{{ matrix_bot_chatgpt_docker_image_name_prefix }}matrixgpt/matrix-chatgpt-bot:{{ matrix_bot_chatgpt_version }}" matrix_bot_chatgpt_docker_image_name_prefix: "{{ 'localhost/' if matrix_bot_chatgpt_container_image_self_build else 'ghcr.io/' }}" matrix_bot_chatgpt_docker_image_force_pull: "{{ matrix_bot_chatgpt_docker_image.endswith(':latest') }}" @@ -31,6 +31,7 @@ matrix_bot_chatgpt_systemd_wanted_services_list: [] matrix_bot_chatgpt_openai_email: '' # OPENAI_EMAIL= matrix_bot_chatgpt_openai_password: '' # OPENAI_PASSWORD= matrix_bot_chatgpt_openai_login_type: 'google' # OPENAI_LOGIN_TYPE="google" +matrix_bot_chatgpt_openai_pro: false # OPENAI_PRO # Matrix Static Settings (required, see notes) # Defaults to "https://matrix.org" From 18c3903defbf28a753d4bfebbbe94725a2510f21 Mon Sep 17 00:00:00 2001 From: bertybuttface <110790513+bertybuttface@users.noreply.github.com> Date: Thu, 26 Jan 2023 15:12:36 +0000 Subject: [PATCH 2/3] Update env.j2 Set OPEN_AI to matrix_bot_chatgpt_openai_pro --- roles/custom/matrix-bot-chatgpt/templates/env.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/custom/matrix-bot-chatgpt/templates/env.j2 b/roles/custom/matrix-bot-chatgpt/templates/env.j2 index 8837fe3ef..bf2dafbff 100644 --- a/roles/custom/matrix-bot-chatgpt/templates/env.j2 +++ b/roles/custom/matrix-bot-chatgpt/templates/env.j2 @@ -4,6 +4,7 @@ MATRIX_ACCESS_TOKEN={{ matrix_bot_chatgpt_matrix_access_token }} OPENAI_EMAIL={{ matrix_bot_chatgpt_openai_email }} OPENAI_PASSWORD={{ matrix_bot_chatgpt_openai_password }} OPENAI_LOGIN_TYPE={{ matrix_bot_chatgpt_openai_login_type }} +OPENAI_PRO={{ matrix_bot_chatgpt_openai_pro }} # With the @ and :DOMAIN, ie @SOMETHING:DOMAIN MATRIX_BOT_USERNAME={{ matrix_bot_chatgpt_matrix_bot_username }} From 784043cc5dd0f6fef50004d40236ece31c7a4fa2 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Fri, 27 Jan 2023 08:55:38 +0200 Subject: [PATCH 3/3] Ensure OPENAI_PRO is true/false (not True/False) --- roles/custom/matrix-bot-chatgpt/templates/env.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/custom/matrix-bot-chatgpt/templates/env.j2 b/roles/custom/matrix-bot-chatgpt/templates/env.j2 index bf2dafbff..1315ddf55 100644 --- a/roles/custom/matrix-bot-chatgpt/templates/env.j2 +++ b/roles/custom/matrix-bot-chatgpt/templates/env.j2 @@ -4,7 +4,7 @@ MATRIX_ACCESS_TOKEN={{ matrix_bot_chatgpt_matrix_access_token }} OPENAI_EMAIL={{ matrix_bot_chatgpt_openai_email }} OPENAI_PASSWORD={{ matrix_bot_chatgpt_openai_password }} OPENAI_LOGIN_TYPE={{ matrix_bot_chatgpt_openai_login_type }} -OPENAI_PRO={{ matrix_bot_chatgpt_openai_pro }} +OPENAI_PRO={{ matrix_bot_chatgpt_openai_pro | to_json }} # With the @ and :DOMAIN, ie @SOMETHING:DOMAIN MATRIX_BOT_USERNAME={{ matrix_bot_chatgpt_matrix_bot_username }}