Class HostedCodeExecutionResultPart
java.lang.Object
uno.anahata.asi.agi.event.BasicPropertyChangeSource
uno.anahata.asi.agi.message.AbstractPart
uno.anahata.asi.agi.message.TextPart
uno.anahata.asi.agi.message.ModelTextPart
uno.anahata.asi.agi.message.code.HostedCodeExecutionResultPart
- All Implemented Interfaces:
PropertyChangeSource, ThoughtSignature, Rebindable
A specialized part representing the output or logs from a server-side code execution.
This part stores the textual results (stdout/stderr) returned by the execution
environment. Visual outputs (like images) should be captured as ModelBlobParts
associated with the same message turn.
- Author:
- anahata
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe possible outcomes of a server-side code execution. -
Field Summary
FieldsModifier and TypeFieldDescriptionThe final state of the execution (OK, FAILED, etc.) as reported by the provider.private HostedCodeExecutionCallPartThe call part that initiated this execution result, used to reconstruct parent-child relationships in the conversation tree.Fields inherited from class BasicPropertyChangeSource
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionHostedCodeExecutionResultPart(AbstractModelMessage message, String logs, byte[] thoughtSignature) Constructs a new ModelCodeOutputPart. -
Method Summary
Modifier and TypeMethodDescriptionasText()Returns the content of the part as a simple string.protected intTemplate method hook for subclasses to provide their specific default max depth policy.Methods inherited from class ModelTextPart
isThoughtMethods inherited from class TextPart
appendMetadata, appendText, calculateTokenCount, resetTokenCount, setTextMethods inherited from class AbstractPart
createMetadataHeader, getAgi, getAgiConfig, getEffectiveMaxDepth, getEffectiveTokenCount, getIdentityLabel, getMetadataTokenCount, getPrunedHint, 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
-
Field Details
-
parentCall
The call part that initiated this execution result, used to reconstruct parent-child relationships in the conversation tree. -
outcome
The final state of the execution (OK, FAILED, etc.) as reported by the provider.
-
-
Constructor Details
-
HostedCodeExecutionResultPart
public HostedCodeExecutionResultPart(AbstractModelMessage message, String logs, byte[] thoughtSignature) Constructs a new ModelCodeOutputPart.- Parameters:
message- The model message containing the execution results.logs- The textual output or logs from the execution.thoughtSignature- The signature of the thought process associated with this output, if any.
-
-
Method Details
-
asText
-
getDefaultMaxDepth
protected int getDefaultMaxDepth()Template method hook for subclasses to provide their specific default max depth policy. This is the fallback value used when no explicitmaxDepthis set on the instance. Returns the default maximum depth to keep a text part in context, as defined in the agi configuration. Returns the default maximum depth for thoughts if this is a thought part, otherwise falls back to the standard text part depth.Returns the default maximum depth to keep a hosted code execution result part in context.
- Overrides:
getDefaultMaxDepthin classModelTextPart- Returns:
- The default maximum depth for this part type.
-

