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

Add user_chat capacity to proactive notification #1441

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

beastoin
Copy link
Collaborator

@beastoin beastoin commented Nov 29, 2024

Issue: #1327

Usages

  • Enable the user_chat (User chat) notification scope via Omi App

    Screenshot 2024-11-30 at 07 10 26
  • Put {{user_chat}} into your prompt template
    Screenshot 2024-11-30 at 07 03 45

  • Response 'user_chat' as a param in the params field, e.g.

    {
          'session_id': data.session_id,
          'notification': {
              ....
              'params': ['user_name', 'user_facts', 'user_context', 'user_chat'],
          }
      }
    

Example:

TODO

Deploy steps

  • Deploy backend
  • Deploy pusher
  • Deploy plugin

@beastoin beastoin force-pushed the vniwu_proactive_notification_user_chat_1327 branch from 3290ef8 to c374ed5 Compare November 29, 2024 22:50
@beastoin
Copy link
Collaborator Author

Screenshot 2024-11-30 at 06 32 39

@beastoin beastoin marked this pull request as ready for review November 29, 2024 23:52
@beastoin
Copy link
Collaborator Author

Screenshot 2024-11-30 at 06 52 40

@beastoin beastoin merged commit 349615a into main Nov 29, 2024
@beastoin beastoin deleted the vniwu_proactive_notification_user_chat_1327 branch November 29, 2024 23:54
@tiagoefreitas
Copy link

@kodjima33 @beastoin I don't think this implementation is very flexible, because it only allows to add to the llm prompt the AI notifications (from that I understand), so the time sequence is not easy to understand by the llm, and you can't do proper prompt engineering.

My PR adds a new webhook that allows the app to save the notifications and then construct the prompt in a more flexible way, in addition to letting the developer log them or save to memory / db.

So I don't see the usefulness of this user_chat parameter, and also why is it called user_chat if it contains AI messages?

It would make sense for user_chat to mean written chat messages as opposed to audio transcripts, and there should be a separate webhook for that.

@beastoin
Copy link
Collaborator Author

beastoin commented Dec 3, 2024

this implementation is not about the flexibility. it's all about adding support new capacity to the current proactive notification infra - developers now could access Omi's user chats through the prompt template by simply using the parameter {{user_chat}}.

man, what plugin have you created ? if you don't have one yet, my suggestion is to either read more about the code or just go ahead and create one.

i appreciate your PR. but i am confused - do you want to hear my suggestion for your PR or not ?

@tiagoefreitas

https://discord.com/channels/1192313062041067520/1311842044259598406

https://discord.com/channels/1192313062041067520/1307242485264810044

@tiagoefreitas
Copy link

@beastoin yes I am interested in your suggestions, but I pushed my PR with urgency bacause @kodjima33 said it was urgent. I was not able to test it properly though, due to issues setting up the dev environment, but if there is some bug the code can be tested and reviewed nonetheless.

I don't understand why you are writing like I don't understand the issue, without addressing the technical points I made in my messages here and in the PR. You could have replied to my technical points one by one, or made comments in my PR.

Yes, I have created my own app based on mentor, and submitted it for the hackaton, and plan to improve it as time allows.
I stand by my previous message and my PR. the prompt template solution is not flexible enough for proper prompt engineering and I explained why. my PR gives developers access to the notification messages themselves, so they can use them directly.

I think your PR is still useful as a simpler way for developers to use in simple cases, but it does not fully address #1327 in my opinion.

I have also made a suggestion for direct notifications from apps here: #1434

I added it here: https://discord.com/channels/1192313062041067520/1314242481365192789

@beastoin
Copy link
Collaborator Author

beastoin commented Dec 6, 2024

my suggestion:
1/ before sending the PR: you should note down your implementation ideas(bullet points are good enough), test your PR to ensure it works and please clean it up.
2/ you must understand what we already have(how the system works) and what we need to do to fulfill the user(or stakeholder) needs so that you could have good "bullet points" for the implementation.

for your concerns:

I don't understand why you are writing like I don't understand the issue

please help me address your understanding about the stakeholder needs at #1327 and how you fulfill that needs with your PR.

without addressing the technical points I made in my messages here and in the PR

it's not about the technical man.

I have created my own app based on mentor

tell me more about your app. is it work ? what problem would it solve ? are there any technical limitation with the current Omi Apps infra and why.

@tiagoefreitas direct notifications should be supported soon and i would be super happy if you could try to make it happen.

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.

2 participants