cmm: replaced options '--with-tags' and '--with-file' with '--with-metadata'
This commit is contained in:
@@ -422,7 +422,7 @@ class Message():
|
||||
except Exception:
|
||||
raise MessageError(f"'{file_path}' does not contain a valid message")
|
||||
|
||||
def to_str(self, with_tags: bool = False, with_file: bool = False, source_code_only: bool = False) -> str:
|
||||
def to_str(self, with_metadata: bool = False, source_code_only: bool = False) -> str:
|
||||
"""
|
||||
Return the current Message as a string.
|
||||
"""
|
||||
@@ -432,10 +432,11 @@ class Message():
|
||||
if self.answer:
|
||||
output.extend(self.answer.source_code(include_delims=True))
|
||||
return '\n'.join(output) if len(output) > 0 else ''
|
||||
if with_tags:
|
||||
if with_metadata:
|
||||
output.append(self.tags_str())
|
||||
if with_file:
|
||||
output.append('FILE: ' + str(self.file_path))
|
||||
output.append('AI: ' + str(self.ai))
|
||||
output.append('MODEL: ' + str(self.model))
|
||||
output.append(Question.txt_header)
|
||||
output.append(self.question)
|
||||
if self.answer:
|
||||
|
||||
Reference in New Issue
Block a user