Skip to content

Commit

Permalink
~
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-chs committed Oct 19, 2023
1 parent f779f06 commit 9bf9e25
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 38 deletions.
2 changes: 1 addition & 1 deletion controllers/file_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def save_conversation_to_file(conversation: Conversation, filepath: Path) -> Non
)

with open(file=filepath, mode="w", encoding="utf-8") as file:
file.write(conversation.to_markdown())
file.write(conversation.markdown_text())
utime(path=filepath, times=(conversation.update_time, conversation.update_time))


Expand Down
2 changes: 1 addition & 1 deletion models/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def yaml_header(self) -> str:

return yaml

def to_markdown(self) -> str:
def markdown_text(self) -> str:
"""Returns the full markdown text content of the conversation."""
markdown_config = self.configuration.get("markdown", {})
latex_delimiters = markdown_config.get("latex_delimiters", "default")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_to_markdown() -> None:
data: dict[str, Any] = sample_conversation_data()
conversation = Conversation(conversation=data)

markdown: str = conversation.to_markdown()
markdown: str = conversation.markdown_text()
assert "---" in markdown
assert "# User" in markdown
assert "Hello!" in markdown
Expand Down
35 changes: 0 additions & 35 deletions utils/dev_helpers.py

This file was deleted.

0 comments on commit 9bf9e25

Please sign in to comment.