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

feat: add auto generate the meaning title for the message using AI #101

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

krushnarout
Copy link
Contributor

Description

Added auto generate the meaning title for the message using gpt-4o-mini.

Related Issue

Changes Made

  • Added new feature
  • Fixed a bug
  • Updated documentation
  • Other (please specify)

How to Test

Please describe the steps to test the changes made in this pull request. Include any specific commands or configurations needed.

  1. Step 1
  2. Step 2
  3. Step 3

Checklist

  • I have read the contributing guidelines
  • I have followed the code style guidelines
  • My code is tested and works as expected
  • I have updated the documentation (if necessary)

Additional Information

Please provide any additional information that may be helpful for the reviewers.

Copy link
Contributor

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

let summaryText = '';

try {
const { text } = await generateText({
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for await, we should prioritize streamText, and we can await generateText after streamText ends.

@@ -173,6 +189,11 @@ export async function autoAnswer(
await streamResponse({ videos: videos }, onStream);
}

if (summaryText) {
await streamResponse({ sources: texts, title: summaryTitle }, onStream);
Copy link
Contributor

Choose a reason for hiding this comment

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

we should update the title in the UI

@krushnarout
Copy link
Contributor Author

Hi @ahaapple, I've added changes according to your comments, please review and let me know!

@ahaapple
Copy link
Contributor

This PR only completes part of the functionality. I will merge it first, and then I will complete the rest of the development. Thank you.

@ahaapple ahaapple merged commit 63e4f9e into memfreeme:main Oct 28, 2024
2 checks passed
Copy link
Contributor

🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀

@krushnarout
Copy link
Contributor Author

This PR only completes part of the functionality. I will merge it first, and then I will complete the rest of the development. Thank you.

Thanks for merging!

@krushnarout krushnarout deleted the feat-generate-title branch October 28, 2024 07:24
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.

Auto generate the meaning title for the message use the AI
2 participants