Annotation Interface Tool
Annotates a business method of a CDI bean as an exposed tool.
The result of a "tool call" operation is always represented as a ToolResponse. However, the annotated method can also
return other types that are converted according to the following rules.
- If the method returns
Stringthen the reponse issuccessand contains the singleTextContentobject. - If the method returns an implementation of
Contentthen the reponse issuccessand contains the single content object. - If the method returns a
ListofContentimplementations orStrings then the reponse issuccessand contains the list of relevant content objects. - The method may return a
that wraps any of the type mentioned above.
invalid reference
Uni
- See Also:
-
Field Summary
Fields -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionAn optional description.Each tool must have a unique name.
-
Field Details
-
ELEMENT_NAME
-
-
Element Details
-
name
String nameEach tool must have a unique name. By default, the name is derived from the name of the annotated method.- Default:
"<<element name>>"
-
description
-