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

Downloading a conversation #306

Open
nsarrazin opened this issue Jun 19, 2023 · 3 comments
Open

Downloading a conversation #306

nsarrazin opened this issue Jun 19, 2023 · 3 comments
Labels
enhancement New feature or request front This issue is related to the front-end of the app.

Comments

@nsarrazin
Copy link
Collaborator

Someone on the hub suggested the ability to download a conversation, which seems like a low hanging fruit. Opening the issue here so we keep track of it!

@nsarrazin nsarrazin added enhancement New feature or request front This issue is related to the front-end of the app. labels Jun 19, 2023
@robertgro
Copy link

robertgro commented Jun 19, 2023

Someone on the hub suggested the ability to download a conversation, which seems like a low hanging fruit. Opening the issue here so we keep track of it!

It was me and I'm still in for it. Posted the discussion originally on huggingface.co due to, for me, this GitHub repo here being related to the UI app in general and at huggingface for their chat service specifically. Thank you opening the issue anyway. I appreciate your efforts.

edit: could be related so I'm referencing it here #176

@nsarrazin
Copy link
Collaborator Author

nsarrazin commented Jun 19, 2023

Haha nice, yeah it's a feature we would have to add to chat-ui to get it deployed on the hosted version.

As a workaround you can indeed download the prompt like so:
image

but it won't give you a clean history and you'd have to parse it (see sample response). I think it would be easy enough to add an endpoint to chat-ui for getting the conversation history in a structured way though.

Sample response:

{
  "note": "This is a preview of the prompt that will be sent to the model when retrying the message. It may differ from what was sent in the past if the parameters have been updated since",
  "prompt": "Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful.\n-----\n<|prompter|>How do I make a delicious lemon cheesecake?</s><|assistant|>To make a delicious lemon cheesecake, you can follow this recipe:\n\nIngredients:\n\n* 16 oz cream cheese, softened\n* 1/2 cup sugar\n* 3 large eggs, lightly beaten\n* 1 teaspoon vanilla extract\n* 1 tablespoon freshly squeezed lemon juice\n* 1/4 cup all-purpose flour\n* 1 pinch salt\n* Nonstick cooking spray\n* Fresh berries for garnish (optional)\n\nInstructions:\n\n1. Preheat your oven to 300°F (150°C). Grease a 9-inch springform pan with nonstick spray.\n2. In a medium bowl, mix together the flour and salt. Set aside.\n3. In a large mixing bowl, beat the cream cheese until smooth using an electric hand mixer. Add the sugar and continue beating until well combined.\n4. Beat in the eggs one at a time, making sure each egg is fully incorporated before adding the next. Stir in the vanilla and lemon juice.\n5. Gradually add the dry ingredient mixture into the wet ingredients while stirring on low speed. Be careful not to overmix.\n6. Pour the batter into the prepared pan. Tap the pan against the counter several times to release any air bubbles.\n7. Bake for 45-50 minutes or until the center of the cake is set. If necessary, cover the top of the pan loosely with foil during the last 15 minutes of baking to prevent excessive browning.\n8. Remove from the oven and allow the cake to cool completely at room temperature. Once cooled, transfer the cake to the refrigerator to chill for at least two hours before serving.\n9. When ready to serve, remove the sides of the springform pan and place the cake on a plate or platter. Garnish with fresh berries if desired. Slice and enjoy!</s><|prompter|>Thank you!</s><|assistant|>",
  "model": "OpenAssistant/oasst-sft-6-llama-30b-xor",
  "parameters": {
    "temperature": 0.2,
    "truncate": 1000,
    "max_new_tokens": 1024,
    "stop": [
      "</s>"
    ],
    "top_p": 0.95,
    "repetition_penalty": 1.2,
    "top_k": 50,
    "return_full_text": false
  }
}

@robertgro
Copy link

robertgro commented Jun 19, 2023

You got it right, yes. My issue is targeting at a clean history download, including all messages shared. If my time spares me some hours, I'll put my hands on this myself. Until then we have this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request front This issue is related to the front-end of the app.
Projects
None yet
Development

No branches or pull requests

2 participants