Closed mkouba closed 2 weeks ago
Thanks for opening the issue. I'll have a look
I don't see a good way of handling these to be honest...
I don't see a good way of handling these to be honest...
@geoand What's the reason behind only creating those beans if you find the injection point for them?
To implement this, we'd need to scan the config and pull out all of the models from there. But looking at the code, there is quite some effort to not do that.
The idea was to provide great error messages in order to guide users when configuring various models.
Your idea makes sense, but we'll have to move the configuration to build time (which I want to do anyway at some point)
The idea was to provide great error messages in order to guide users when configuring various models.
Your idea makes sense, but we'll have to move the configuration to build time (which I want to do anyway at some point)
I see. You can still keep that and do some best effort in registering all the other models for which you have no injection points. Here's a draft of what I mean - https://github.com/quarkiverse/quarkus-langchain4j/pull/1061 I am not saying the PR is nice; just sharing it to show what I had in mind :)
Currently, only "specific" injection points, such as
@Inject @ModelName ChatLanguageModel
, are considered. This means that programmatic lookup, such as@Inject @Any Instance<ChatLanguageModel>
or@Inject @All List<ChatLanguageModel>
, does not work unless a specific model is injected somewhere else.See also zulip discussion: https://quarkusio.zulipchat.com/#narrow/channel/187038-dev/topic/named.20ai.20models.3F