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

Expose the query slot in MassPlayMediaOnMediaPlayer only if the mass specific LLM agent is configured #2685

Merged
merged 2 commits into from
Jul 28, 2024

Conversation

tronikos
Copy link
Contributor

fixes #2636

@OzGav
Copy link
Contributor

OzGav commented Jul 27, 2024

Do we need that note we just added to the docs anymore if this gets approved? https://music-assistant.io/integration/voice/

@tronikos
Copy link
Contributor Author

Do we need that note we just added to the docs anymore if this gets approved? https://music-assistant.io/integration/voice/

No

@OzGav
Copy link
Contributor

OzGav commented Jul 27, 2024

OK so why would it fail now if the query argument is not used?

@tronikos tronikos changed the title Expose the query slot in MassPlayMediaOnMediaPlayerHandler only if the mass specific LLM agent is configured Expose the query slot in MassPlayMediaOnMediaPlayer only if the mass specific LLM agent is configured Jul 27, 2024
@tronikos
Copy link
Contributor Author

It won't fail. If you haven't setup the MA Specific Conversation Agent the LLM won't see the query argument.

Keep in mind there is the general LLM, that you interact with, that sees all your exposed entities and all the registered intents. This is the LLM that decides when and how to call MassPlayMediaOnMediaPlayer. If you don't have an MA specific LLM configured, the general LLM won't know the query argument so it will never use it. If you have configured an MA specific LLM, the general LLM will be able to use the query if it decides so. And when the query is specified, the intent will internally call its MA specific LLM to translate the query to artist/track/album.

@OzGav
Copy link
Contributor

OzGav commented Jul 27, 2024

Yes that’s what I thought so why would we need to keep

If you choose not to setup the MA Specific Conversation Agent then you may encounter errors unless you tell the LLM via the prompt to not use the query argument for the MassPlayMediaOnMediaPlayer intent

@tronikos
Copy link
Contributor Author

We should remove it. We don't need it. That's what I said earlier. You asked me: "Do we need that note we just added to the docs anymore if this gets approved?" and I answered: "No"

@OzGav
Copy link
Contributor

OzGav commented Jul 27, 2024

Sorry I thought I asked should we remove it 🤦‍♂️

@jozefKruszynski
Copy link
Contributor

Excellent solution, I tried to do similar, but still don't know enough about python to know that we could simply overrider that property function.
Thanks @tronikos for putting the time in.

Copy link
Member

@marcelveldt marcelveldt left a comment

Choose a reason for hiding this comment

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

Thanks!

@marcelveldt marcelveldt merged commit 2987404 into music-assistant:main Jul 28, 2024
5 checks passed
@tronikos tronikos deleted the intent-query branch July 28, 2024 16:22
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.

AI is confused by the query ambiguity in the intent
4 participants