Annotation Interface CompletePrompt


@Retention(RUNTIME) @Target(METHOD) public @interface CompletePrompt
Annotates a business method of a CDI bean used to complete a prompt argument

The result of a "complete" operation is always represented as a CompletionResponse. However, the annotated method can also return other types that are converted according to the following rules.

  • If the method returns String then the reponse contains the single value.
  • If the method returns a List of Strings then the reponse contains the list of values.
  • The method may return a Uni that wraps any of the type mentioned above.
In other words, the return type must be one of the following list:
  • CompletionResponse
  • String
  • List<String>
  • Uni<CompletionResponse>
  • Uni<String>
  • Uni<List<String>>
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name reference to a prompt.
  • Element Details

    • value

      String value
      The name reference to a prompt. If not such Prompt exists then the build fails.