From 1d60480227cada171970d86304e504f15a0171f5 Mon Sep 17 00:00:00 2001 From: Kye Date: Thu, 21 Dec 2023 19:02:52 -0500 Subject: [PATCH] [V] --- pyproject.toml | 4 +++- swarms/structs/conversation.py | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 95e9ec29..06d02159 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "2.9.8" +version = "2.9.9" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] @@ -93,3 +93,5 @@ target-version = ['py38'] preview = true +[tool.poetry.scripts] +swarms = 'swarms.cli._cli:run_file' \ No newline at end of file diff --git a/swarms/structs/conversation.py b/swarms/structs/conversation.py index dcf807ab..e20aace9 100644 --- a/swarms/structs/conversation.py +++ b/swarms/structs/conversation.py @@ -7,6 +7,24 @@ from swarms.structs.base import BaseStructure class Conversation(BaseStructure): + """ + Conversation class + + + Attributes: + time_enabled (bool): whether to enable time + conversation_history (list): list of messages in the conversation + + + Examples: + >>> conv = Conversation() + >>> conv.add("user", "Hello, world!") + >>> conv.add("assistant", "Hello, user!") + >>> conv.display_conversation() + user: Hello, world! + + + """ def __init__(self, time_enabled: bool = False, *args, **kwargs): super().__init__() self.time_enabled = time_enabled