Skip to content

Commit

Permalink
chore(versioning): versioning and linting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 9, 2024
1 parent 2f41de5 commit 7b1dc2d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions vortex/io/twilio.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
from twilio.rest import Client

from vortex.ai.agents import VortexAgent
from vortex.api.data_models import (ChatsHistory, Conversation, SessionLocal,
get_db)
from vortex.api.data_models import ChatsHistory, Conversation, SessionLocal, get_db

# db = SessionLocal()
# phone_number = ''
Expand Down Expand Up @@ -80,13 +79,13 @@ def store_chat_history(whatsapp_number, agent_history, db):
.values(
sender=whatsapp_number,
history=str(history),
updated_at=datetime.utcnow() # Explicitly set updated_at on insert
updated_at=datetime.utcnow(), # Explicitly set updated_at on insert
)
.on_conflict_do_update(
index_elements=["sender"], # Specify the conflict target
set_={
"history": str(history), # Update the history field upon conflict
"updated_at": datetime.utcnow() # Update the updated_at field upon conflict
"updated_at": datetime.utcnow(), # Update the updated_at field upon conflict
},
)
)
Expand Down

0 comments on commit 7b1dc2d

Please sign in to comment.