From 754f07ccb53a9259b0de9bde977592211854a21c Mon Sep 17 00:00:00 2001 From: trbKnl Date: Fri, 8 Nov 2024 09:59:56 +0100 Subject: [PATCH] fixed bug in props, chatgpt standard script works again --- src/framework/processing/py/port/api/props.py | 3 +-- src/framework/processing/py/port/platforms/chatgpt.py | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/framework/processing/py/port/api/props.py b/src/framework/processing/py/port/api/props.py index fca1e1f1..1addf84d 100644 --- a/src/framework/processing/py/port/api/props.py +++ b/src/framework/processing/py/port/api/props.py @@ -4,8 +4,7 @@ import pandas as pd -@dataclass -class Translations: +class Translations(TypedDict): """ Typed dict containing text that is displayed in a specific language. """ diff --git a/src/framework/processing/py/port/platforms/chatgpt.py b/src/framework/processing/py/port/platforms/chatgpt.py index 3984dcfd..23058fe0 100644 --- a/src/framework/processing/py/port/platforms/chatgpt.py +++ b/src/framework/processing/py/port/platforms/chatgpt.py @@ -164,10 +164,8 @@ def process(session_id: int): if table_list is not None: logger.info("Prompt consent; %s", platform_name) - review_data_prompt = ph.generate_review_data_prompt(REVIEW_DATA_DESCRIPTION, table_list) - review_data_result = yield ph.render_page(REVIEW_DATA_HEADER, review_data_prompt) - if review_data_result.__type__ == "PayloadJSON": - yield ph.donate(f"{session_id}-questionnaire-donation", review_data_result.value) + review_data_prompt = ph.generate_review_data_prompt(f"{session_id}-chatpt", REVIEW_DATA_DESCRIPTION, table_list) + yield ph.render_page(REVIEW_DATA_HEADER, review_data_prompt) yield ph.exit(0, "Success") yield ph.render_end_page()