Package io.quarkiverse.langchain4j
Annotation Interface ModelName
@Target({TYPE,METHOD,FIELD,PARAMETER})
@Retention(RUNTIME)
@Documented
@Qualifier
public @interface ModelName
Marker annotation to select a named model
Configure the
name
parameter to select the model instance.
For example, when configuring OpenAI like so:
quarkus.langchain4j.openai.somename.api-key=somekeyThen to inject the proper
ChatLanguageModel
, you would need to use Model
like so:
@Inject &#ModelName("somename") ChatLanguageModel model;For the case of
RegisterAiService
, instead of using this annotation, users should set the modelName
property
instead.-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueSpecify the cluster name of the connection.- Returns:
- the value
- Default:
- ""
-