- Newest
- Most votes
- Most comments
Hello Kenneth,
Currently, Amazon Q developer does not have a built-in functionality to save chat history.
I would suggest either one of the following approach to retain your conversation.
- Manually copy the conversation and save it to a text file.
- Implement a basic logging system to retain the conversation.
I am not sure which programming language you are using but I will give you an example in Python on how you can implement the basic logging function.
-
Leverage Python's built in logging module
import logging
logger = logging.getLogger('conversation_logger')
-
Set up the logger to write to a file name of your choice , e.g. conversation.log
file_handler = logging.FileHandler('conversation.log')
-
Define a function to log each message with a role and content.
def log_message(role, content): logger.info(f"{role.upper()}: {content}")
-
To use this: Call log_message() after each exchange in your conversation.
If you think that my response answers your question please marked this as accepted answer cheers!
Relevant content
- asked 3 months ago
- asked 6 months ago
- asked 2 months ago
- asked 5 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 years ago