Skip to content

Commit

Permalink
Merge branch 'master' into feature/141-conversation-reconnect-after-2…
Browse files Browse the repository at this point in the history
…4-hours
  • Loading branch information
wayangalihpratama committed Nov 29, 2024
2 parents e17d793 + 4ce1a79 commit 5d94770
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion assistant/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openai==1.35.13
openai==1.55.3
chromadb==0.5.5
pika==1.3.2
black==24.4.2
Expand Down
3 changes: 3 additions & 0 deletions backend/core/socketio_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ async def save_chat_history(
session=session, chat_session_id=conversation_exist.id
)
# Send conversation reconnect template if beyond 24hr
send_conversation_reconnect_template = (
False # TODO:: remove this later
)
if (
platform == Platform_Enum.WHATSAPP.value
and send_conversation_reconnect_template
Expand Down
8 changes: 4 additions & 4 deletions backend/tests/websockets/test_save_chat_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ async def test_save_chat_history_for_a_conversation_without_chat_before(
)
chat_session_id = result.get("chat_session_id")
assert chat_session_id is not None
assert send_conversation_reconnect_template is True
assert send_conversation_reconnect_template is False
assert chat.message == "First message"
assert chat.sender_role == Sender_Role_Enum.USER
assert chat.status == Chat_Status_Enum.READ
Expand All @@ -169,6 +169,6 @@ async def test_save_chat_history_for_a_conversation_without_chat_before(
)
.order_by(Chat.created_at.desc(), Chat.id.desc())
).first()
assert system_chat is not None
text = "Please reply this message to restart your conversation."
assert system_chat.message == f"Hi {client_phone_number},\n{text}"
assert system_chat is None
# text = "Please reply this message to restart your conversation."
# assert system_chat.message == f"Hi {client_phone_number},\n{text}"
2 changes: 1 addition & 1 deletion eppo-librarian/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openai==1.51.2
openai==1.55.3
pandas==2.2.2
chromadb==0.5.5
nltk==3.9.1
Expand Down

0 comments on commit 5d94770

Please sign in to comment.