Record Class ContextReference
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.designer.ai.embed.ContextReference
- Record Components:
assistId- thePromptAssist.id()of the assist that produced the underlyingPromptAssist.Option.Insert— provenance for logging and grouping, and the<id>that leadsinsertText(). It is not how consumers recover typed data: a consumer that needs a reference's structured payload downcasts the concretebody()(aReferenceBody.TextBodyrecord such asOpcReferenceBody), which the compiler checks, rather than matching this string.insertText- the literal token still present in the prompt at submit time, always shaped@<assistId>:<path>(e.g.@tag:[default]Tank/Level). Stable id for composers that group references.body- the resolved payload, produced by the option'sPromptAssist.Option.Insert.body()supplier at submit time.
public record ContextReference(String assistId, String insertText, ReferenceBody body)
extends Record
One reference the user inserted into the prompt via a
PromptAssist.Option.Insert,
resolved at submit time. The framework renders each reference into the outbound message's
canonical <references> block; the host's PromptComposer also receives the list so
it can load extra context keyed off a reference (e.g. OPC grounding).-
Constructor Summary
ConstructorsConstructorDescriptionContextReference(String assistId, String insertText, ReferenceBody body) Creates an instance of aContextReferencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionassistId()Returns the value of theassistIdrecord component.body()Returns the value of thebodyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinsertTextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ContextReference
Creates an instance of aContextReferencerecord class.- Parameters:
assistId- the value for theassistIdrecord componentinsertText- the value for theinsertTextrecord componentbody- the value for thebodyrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
assistId
-
insertText
Returns the value of theinsertTextrecord component.- Returns:
- the value of the
insertTextrecord component
-
body
-