pull/334/head
Kye 1 year ago
parent 300f26880e
commit 1d60480227

@ -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 <kye@apac.ai>"]
@ -93,3 +93,5 @@ target-version = ['py38']
preview = true
[tool.poetry.scripts]
swarms = 'swarms.cli._cli:run_file'

@ -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

Loading…
Cancel
Save