mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-04-07 19:04:18 +00:00
upgraded and fixed timing
This commit is contained in:
parent
f97746ca6a
commit
4bce136f2a
10
api/db.py
10
api/db.py
@ -314,7 +314,7 @@ class Discussion:
|
||||
self.current_message_created_at = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
self.current_message_finished_generating_at=datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
|
||||
def add_message(self, sender, content, message_type=0, rank=0, parent=0, binding="", model ="", personality="", created_at=datetime.now().strftime('%Y-%m-%d %H:%M:%S'), finished_generating_at=datetime.now().strftime('%Y-%m-%d %H:%M:%S')):
|
||||
def add_message(self, sender, content, message_type=0, rank=0, parent=0, binding="", model ="", personality="", created_at=None, finished_generating_at=None):
|
||||
"""Adds a new message to the discussion
|
||||
|
||||
Args:
|
||||
@ -324,6 +324,11 @@ class Discussion:
|
||||
Returns:
|
||||
int: The added message id
|
||||
"""
|
||||
if created_at is None:
|
||||
created_at = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
|
||||
if finished_generating_at is None:
|
||||
finished_generating_at = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
self.current_message_binding = binding
|
||||
self.current_message_model = model
|
||||
self.current_message_personality = personality
|
||||
@ -381,13 +386,14 @@ class Discussion:
|
||||
"finished_generating_at": row[10]
|
||||
} for row in rows]
|
||||
|
||||
def update_message(self, message_id, new_content, current_date_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S')):
|
||||
def update_message(self, message_id, new_content):
|
||||
"""Updates the content of a message
|
||||
|
||||
Args:
|
||||
message_id (int): The id of the message to be changed
|
||||
new_content (str): The nex message content
|
||||
"""
|
||||
current_date_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
self.current_message_finished_generating_at = current_date_time
|
||||
|
||||
# print(f"{current_date_time}")
|
||||
|
98
web/dist/assets/index-34e61592.js
vendored
Normal file
98
web/dist/assets/index-34e61592.js
vendored
Normal file
File diff suppressed because one or more lines are too long
98
web/dist/assets/index-47b6b817.js
vendored
98
web/dist/assets/index-47b6b817.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
web/dist/index.html
vendored
4
web/dist/index.html
vendored
@ -6,8 +6,8 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>LoLLMS WebUI - Welcome</title>
|
||||
<script type="module" crossorigin src="/assets/index-47b6b817.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-1760585e.css">
|
||||
<script type="module" crossorigin src="/assets/index-34e61592.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-91dd80ad.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user