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

Summarize and rate several responses in action bar #487

Merged
merged 19 commits into from
Aug 16, 2023

Conversation

tanchekwei
Copy link
Contributor

@tanchekwei tanchekwei commented Aug 2, 2023

Close: #476
Close: #478

TODO:

  1. Allow users to maintain their list of actions on the chat tab settings page.
  2. Allow users to customize their template for actions like summarizing. Template example:
Summarize responses below:
{botName}: {response}
  1. When clicking an action button, show a dialog to preview the text.
  2. Display a list of toggled/active bots in the dialog, clicking bot will send the previewed text.
  3. Send the prompt in a new context.
  4. Show summarize response

@sunner

  1. what do you think?
  2. is the names “actions” and “actions bar” suitable?
  3. is the design ok?
2023-08-03.07-09-50.mp4

@vercel
Copy link

vercel bot commented Aug 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
chatall ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 15, 2023 1:12pm

@sunner
Copy link
Owner

sunner commented Aug 6, 2023

Sorry for the delay reply. I'm on a business trip.

What actions will be placed on the bar except summarizing?

@tanchekwei
Copy link
Contributor Author

I planning to make the Summarize button the default, then the user can add, edit, delete in the Chats settings.

@sunner
Copy link
Owner

sunner commented Aug 8, 2023

How about implementing this through a "bulk actions" feature? Users can select multiple messages (even they are not belongs to the same prompt ) and do actions on them.

@tanchekwei
Copy link
Contributor Author

tanchekwei commented Aug 10, 2023

Good idea, here is what I have done to select responses for an action

2023-08-10.20-40-55.mp4

For the actions button, I planning to temporarily hide the header and show at there

Also will add a button to deselect all

Like this:

image

what do you think?

@sunner
Copy link
Owner

sunner commented Aug 10, 2023

Yeah! This is great! Eager for it!

@tanchekwei
Copy link
Contributor Author

done, let me know if anything need to change

2023-08-13.17-34-19.mp4

Comment on lines 116 to 126
actions: [
{
name: "Summarize 1",
template:
"Summarize the data below in a markdown table with the bot name, difference and response rating (1-5) columns.\nDo not include response column in your table.\nSimplify the data and identify the differences.\nResponse is delimited by `details` tag and bot name is delimited by `summary` tag.\n\n{loopStart}\n<details>\n <summary>{botName}</summary>\n{botResponse}\n</details>\n{loopEnd}\n\nGive me the best response.",
index: 0,
},
{
name: "Summarize 2",
template:
"Summarize the data below in a markdown table with the bot name, difference and response rating (1-5) columns.\nDo not include response column in your table.\nSimplify the data and identify the differences.\n\n|Bot|Response|\n|-----|-------------|{loopStart}\n|{botName}|{botResponse}|{loopEnd}\n\nGive me the best response.",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to suggest better prompt

@tanchekwei tanchekwei marked this pull request as ready for review August 13, 2023 10:20
Copy link
Owner

@sunner sunner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Report a problem.

If the response has multiply paragraphs:
image
It can not be collapsed right.
image

src/components/Footer/FooterBar.vue Outdated Show resolved Hide resolved
src/components/Messages/ChatPrompt.vue Outdated Show resolved Hide resolved
src/helpers/template-parser.js Outdated Show resolved Hide resolved
src/store/index.js Outdated Show resolved Hide resolved
src/store/index.js Show resolved Hide resolved
@tanchekwei
Copy link
Contributor Author

tanchekwei commented Aug 14, 2023

Report a problem.

If the response has multiply paragraphs: It can not be collapsed right.

Removed markdown view for prompt.

@sunner sunner changed the title Chat actions Summarize and rate several responses in action bar Aug 16, 2023
@sunner sunner merged commit bcca429 into sunner:main Aug 16, 2023
2 checks passed
@sunner
Copy link
Owner

sunner commented Aug 16, 2023

This is so great! Thank you!

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

Successfully merging this pull request may close these issues.

[FEAT] [FEAT] Summarize and evaluate answers of all models
2 participants