MCPcopy Create free account
hub / github.com/aws-samples/sample-devgenius-aws-solution-builder / save_session

Function save_session

chatbot/utils.py:244–252  ·  view source on GitHub ↗
(conversation_id, name, email)

Source from the content-addressed store, hash-verified

242
243# Store conversation details in DynamoDB
244def save_session(conversation_id, name, email):
245 SESSION_TABLE_NAME = retrieve_environment_variables("SESSION_TABLE_NAME")
246 item = {
247 'conversation_id': conversation_id,
248 'user_name': name,
249 'user_email': email,
250 'session_start_time': datetime.datetime.now(tz=datetime.timezone.utc).strftime("%Y-%m-%d %H:%M:%S")
251 }
252 dynamodb_resource.Table(SESSION_TABLE_NAME).put_item(Item=item)
253
254
255# Store conversation details in DynamoDB

Callers 1

agent.pyFile · 0.90

Calls 1

Tested by

no test coverage detected