Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button to save a conversation #2

Open
vnawrath opened this issue Oct 5, 2023 · 0 comments
Open

Button to save a conversation #2

vnawrath opened this issue Oct 5, 2023 · 0 comments
Assignees

Comments

@vnawrath
Copy link
Contributor

vnawrath commented Oct 5, 2023

As a qa engineer,
I want to be able to save a conversation,
So that I can refer to it later

AC

  1. There's a button in the streamlit app that allows saving the conversation history
  2. The conversation is saved as JSON messages to the folder/file described by the project/test case name

Notes

  • The button should probably appear before we show the input for the user message
    # User message
    if last_message == None or last_message["role"] == "assistant":
        ## here
        with st.chat_message("user"):
            user_message_content = st.text_area(
                "User message content",
                "Let's write a test for a chat app. We should test a user can send a message.",
                key="user_message_content",
                label_visibility="collapsed",
            )
            if user_message_content:
                prompt_messages.append(HumanMessage(content=user_message_content))
            else:
                st.stop()
  • The reasoning is we probably want to save the conversation after the assistant sent a message. We either save the conversation because we are done, or we write another prompt.
@petrmanak petrmanak self-assigned this Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants