From 9e137d44a5d292d304cf2d7054e2560154424044 Mon Sep 17 00:00:00 2001 From: keita-yasuda Date: Mon, 30 Sep 2024 14:28:17 +0900 Subject: [PATCH] Fix bug where suggest results cannot be retrieved --- moral_keeper_ai/moral_keeper_ai.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/moral_keeper_ai/moral_keeper_ai.py b/moral_keeper_ai/moral_keeper_ai.py index 50a347a..9e5403a 100644 --- a/moral_keeper_ai/moral_keeper_ai.py +++ b/moral_keeper_ai/moral_keeper_ai.py @@ -83,7 +83,8 @@ def __init__(self, api_config): 'The text you have received is a comment on open data on a website ' 'published by a local government.\n' 'The comment is an inappropriate comment that should not be made ' - 'available to the public, so please perform the following # Task Description.\n\n' + 'available to the public, so please perform the following # Task ' + 'Description.\n\n' 'Please think in English.\n' '# Task Description\n' 'Analyze the emotional tone of the comments and revise expressions ' @@ -103,7 +104,7 @@ def __init__(self, api_config): '{\n' ' "Note when comments are modified": "",\n' ' "input language (=output language)": "",\n' - ' "revised_and_moderated_comments": ""\n' + ' "Revised and moderated comment": ""\n' '}\n' '```\n' ) @@ -113,12 +114,14 @@ def suggest(self, comment): {'role': 'system', 'content': self.system_prompt}, { 'role': 'user', - 'content': 'We can not even make progress with this ridiculously small amount of data.', + 'content': 'We can not even make progress with this ridiculously ' + 'small amount of data.', }, { 'role': 'assistant', - 'content': 'We feel that the publicly available data lacks the necessary information.' - 'It would be helpful if you could add information on (describe specific examples). Thank you in advance.', + 'content': 'We feel that the publicly available data lacks the ' + 'necessary information. It would be helpful if you could add ' + 'information on (describe specific examples). Thank you in advance.', }, { 'role': 'user',