Class ModelBlobPart
java.lang.Object
uno.anahata.asi.agi.event.BasicPropertyChangeSource
uno.anahata.asi.agi.message.AbstractPart
uno.anahata.asi.agi.message.BlobPart
uno.anahata.asi.agi.message.ModelBlobPart
- All Implemented Interfaces:
PropertyChangeSource, ThoughtSignature, Rebindable
A specialized
BlobPart for binary content generated by the model,
including internal thought process details.- Author:
- anahata-ai
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate HostedCodeExecutionCallPartIf this blob was part of the output a hosted tool call (code_interpreter_call), thenprivate byte[]The thought signature / encrypeted reasoningFields inherited from class BasicPropertyChangeSource
propertyChangeSupportModifier and TypeFieldDescriptionprotected PropertyChangeSupportSupport for firing property change events. -
Constructor Summary
ConstructorsConstructorDescriptionModelBlobPart(@NonNull AbstractModelMessage message, @NonNull String mimeType, @NonNull byte[] data, byte[] thoughtSignature) Constructs a ModelBlobPart from raw byte data and a specified MIME type. -
Method Summary
Methods inherited from class BlobPart
appendMetadata, asText, calculateTokenCount, getDefaultMaxDepth, getPrunedHintModifier and TypeMethodDescriptionprotected voidHook for subclasses to inject specialized metadata into the part header.asText()Returns the content of the part as a simple string.protected voidPerforms the lazy, model-specific token calculation for this part.protected intTemplate method hook for subclasses to provide their specific default max depth policy.Returns a summarized string representation of the part's content to be used as a "Hint" when the part is effectively pruned.Methods inherited from class AbstractPart
createMetadataHeader, getAgi, getAgiConfig, getEffectiveMaxDepth, getEffectiveTokenCount, getIdentityLabel, getMetadataTokenCount, getRemainingDepth, getTokenCount, isAuto, isEffectivelyPruned, isPinned, isPruned, remove, resetTokenCount, setExpanded, setPruningState, setPruningState, setTokenCountModifier and TypeMethodDescriptionCreates a standardized text header containing metadata for this part.getAgi()Gets the parent agi session.Gets the agi configuration.final intThe definitive method for resolving the max depth policy for this part.intCalculates the total "effective" tokens contributed by this part.protected StringReturns the identity label for the metadata header (e.g., "Part ID: 45").intCalculates the token count of the metadata header for this part.intCalculates the remaining depth before this part is auto-pruned.intRetrieves the cached token count for this part.booleanisAuto()Checks if this part is managed automatically.booleanCalculates the EFFECTIVE pruned state of this part.booleanisPinned()Checks if this part is explicitly pinned.booleanisPruned()Checks if this part is explicitly pruned.voidremove()Removes this part from its parent message and severs the bidirectional link.voidResets the cached token count, forcing a lazy, background recalculation on the next call to getTokenCount().voidsetExpanded(boolean expanded) Sets the expanded state and fires a property change event.voidsetPruningState(PruningState pruningState) Sets the pruning state of this part and fires a property change event.voidsetPruningState(PruningState pruningState, String reason) Sets the pruning state of this part with an optional reason.voidsetTokenCount(int tokenCount) Sets the token count and fires a property change event.Methods inherited from class BasicPropertyChangeSource
addPropertyChangeListener, addPropertyChangeListener, rebind, removePropertyChangeListener, removePropertyChangeListenerModifier and TypeMethodDescriptionvoidAdds a property change listener.voidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) Adds a property change listener for a specific property.voidrebind()Re-initializes the transientPropertyChangeSupportafter deserialization.voidRemoves a property change listener.voidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener) Removes a property change listener for a specific property.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PropertyChangeSource
getPropertyChangeSupportModifier and TypeMethodDescriptionGets the PropertyChangeSupport instance for this object.Methods inherited from interface ThoughtSignature
getThoughtSignature, setThoughtSignatureModifier and TypeMethodDescriptionbyte[]Gets the signature of the thought process as a byte array.voidsetThoughtSignature(byte[] thoughtSignature) Sets the signature of the thought process as a byte array.
-
Field Details
-
thoughtSignature
private byte[] thoughtSignatureThe thought signature / encrypeted reasoning -
parentCall
If this blob was part of the output a hosted tool call (code_interpreter_call), then
-
-
Constructor Details
-
ModelBlobPart
ModelBlobPart(@NonNull @NonNull AbstractModelMessage message, @NonNull @NonNull String mimeType, @NonNull @NonNull byte[] data, byte[] thoughtSignature) Constructs a ModelBlobPart from raw byte data and a specified MIME type.- Parameters:
message- The model message this part belongs to. Must be aAbstractModelMessage.mimeType- The MIME type.data- The binary data.thoughtSignature- The signature of the thought process as a byte array.
-

