Refactor message.Answer class in a way, that it can be constructed dynamically step by step, in preparation of using streaming API.

This commit is contained in:
Oleksandr Kozachuk
2023-10-20 13:43:31 +02:00
committed by juk0de
parent 5774278fb7
commit ee363d9894
3 changed files with 89 additions and 17 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ def create_message(chat: ChatDB, args: argparse.Namespace) -> Message:
if code_file is not None and len(code_file) > 0:
add_file_as_code(question_parts, code_file)
full_question = '\n\n'.join(question_parts)
full_question = '\n\n'.join([str(s) for s in question_parts])
message = Message(question=Question(full_question),
tags=args.output_tags,