Class JavaMethodToolCall
java.lang.Object
uno.anahata.asi.agi.event.BasicPropertyChangeSource
uno.anahata.asi.agi.message.AbstractPart
uno.anahata.asi.agi.tool.spi.AbstractToolCall<JavaMethodTool, JavaMethodToolResponse>
uno.anahata.asi.agi.tool.spi.java.JavaMethodToolCall
- All Implemented Interfaces:
PropertyChangeSource, ThoughtSignature, Rebindable
A model-agnostic representation of a request to execute a specific Java
method tool.
- Author:
- anahata-gemini-pro-2.5
-
Field Summary
Fields inherited from class BasicPropertyChangeSource
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionJavaMethodToolCall(AbstractModelMessage modelMessage, String id, @NonNull JavaMethodTool tool, @NonNull Map<String, Object> rawArgs, @NonNull Map<String, Object> args) Constructs a new JavaMethodToolCall instance. -
Method Summary
Modifier and TypeMethodDescriptionasText()Returns the content of the part as a simple string.protected JavaMethodToolResponseCreates the corresponding response object for this tool call.Methods inherited from class AbstractToolCall
calculateTokenCount, getDefaultMaxDepth, getEffectiveArgs, getMessage, getPrunedHint, getToolName, resetTokenCount, setModifiedArgumentMethods inherited from class AbstractPart
appendMetadata, createMetadataHeader, getAgi, getAgiConfig, getEffectiveMaxDepth, getEffectiveTokenCount, getIdentityLabel, getMetadataTokenCount, getRemainingDepth, getTokenCount, isAuto, isEffectivelyPruned, isPinned, isPruned, remove, setExpanded, setPruningState, setPruningState, setTokenCountMethods inherited from class BasicPropertyChangeSource
addPropertyChangeListener, addPropertyChangeListener, rebind, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PropertyChangeSource
getPropertyChangeSupportMethods inherited from interface ThoughtSignature
getThoughtSignature, setThoughtSignature
-
Constructor Details
-
JavaMethodToolCall
public JavaMethodToolCall(AbstractModelMessage modelMessage, String id, @NonNull @NonNull JavaMethodTool tool, @NonNull @NonNull Map<String, Object> rawArgs, @NonNull @NonNull Map<String, Object> args) Constructs a new JavaMethodToolCall instance.- Parameters:
modelMessage- The model message initiating this call.id- The unique identifier of this call.tool- The target JavaMethodTool instance.rawArgs- The raw, untyped JSON arguments passed by the model.args- The converted, type-safe Java arguments.
-
-
Method Details
-
createResponse
Description copied from class:AbstractToolCallCreates the corresponding response object for this tool call. This acts as a factory method and is called once by the constructor.- Specified by:
createResponsein classAbstractToolCall<JavaMethodTool, JavaMethodToolResponse>- Returns:
- A new, un-executed tool response.
-
asText
Returns the content of the part as a simple string. This is implemented by subclasses. Returns a Java-like method signature: toolName(arg1, arg2, null, arg4).- Overrides:
asTextin classAbstractToolCall<JavaMethodTool, JavaMethodToolResponse>- Returns:
- The text representation of the part.
-

