Package org.wildfly.mcp.api
Annotation Interface Prompt
Annotates a business method of a CDI bean as an exposed prompt template.
The result of a "prompt get" operation is always represented as a PromptResponse. However, the annotated method can
also return other types that are converted according to the following rules.
- If the method returns a
PromptMessagethen the reponse has no description and contains the single message object. - If the method returns a
ListofPromptMessages then the reponse has no description and contains the list of messages. - The method may return a
Unithat wraps any of the type mentioned above.
PromptResponsePromptMessageList<PromptMessage>Uni<PromptResponse>Uni<PromptMessage>Uni<List<PromptMessage>>
- See Also:
-
PromptResponsePromptArg
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionAn optional description.Each prompt must have a unique name. -
Field Summary
Fields
-
Field Details
-
ELEMENT_NAME
Constant value forname()indicating that the annotated element's name should be used as-is.- See Also:
-
-
Element Details