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

Introduce the ability to use inject models #258

Merged
merged 3 commits into from
Feb 2, 2024
Merged

Introduce the ability to use inject models #258

merged 3 commits into from
Feb 2, 2024

Conversation

geoand
Copy link
Collaborator

@geoand geoand commented Jan 31, 2024

This now allows models to be named and usable via CDI with the @ModelName qualifier.
Furthermore, @RegisterAiService now has the modelName attribute that can be used to select which model should be used for that service in question.

Relates to: #246, #237, #210, #42, #41, #10

@geoand geoand requested a review from a team as a code owner January 31, 2024 12:12
@geoand
Copy link
Collaborator Author

geoand commented Jan 31, 2024

cc @cescoffier @maxandersen @dandreadis @edeandrea @andreadimaio @sarxos who have all mentioned something similar.

@geoand
Copy link
Collaborator Author

geoand commented Feb 2, 2024

@cescoffier can you have a look at this when you get some time, as I would like to get a new release out including this?

Thanks!

@RegisterAiService(
chatLanguageModelSupplier = MyChatModelSupplier.class
)
@RegisterAiService(modelName="m1")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now that we have the qualifier, should it be used there instead of a parameter? Or allow both?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't really like having multiple unless we really have to

@cescoffier cescoffier merged commit c9bf7a9 into main Feb 2, 2024
16 checks passed
@cescoffier cescoffier deleted the multi-model branch February 2, 2024 11:48
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