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=somekey
 
Then to inject the proper ChatLanguageModel, you would need to use Model like so:
     &#64Inject
     &#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
    Modifier and Type
    Class
    Description
    static class 
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specify the cluster name of the connection.
  • Element Details

    • value

      String value
      Specify the cluster name of the connection.
      Returns:
      the value
      Default:
      ""