Added option '-W' to print chat history with filenames
This commit is contained in:
@@ -35,13 +35,16 @@ def append_message(chat: List[Dict[str, str]],
|
||||
|
||||
def message_to_chat(message: Dict[str, str],
|
||||
chat: List[Dict[str, str]],
|
||||
with_tags: bool = False
|
||||
with_tags: bool = False,
|
||||
with_file: bool = False
|
||||
) -> None:
|
||||
append_message(chat, 'user', message['question'])
|
||||
append_message(chat, 'assistant', message['answer'])
|
||||
if with_tags:
|
||||
tags = ", ".join(message['tags'])
|
||||
append_message(chat, 'tags', tags)
|
||||
if with_file:
|
||||
append_message(chat, 'file', message['file'])
|
||||
|
||||
|
||||
def display_source_code(content: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user