The GetMessage method retrieves a specific message prompt and
its associated response from the client session history. This method can
be used when an application has stored a message identifier or has obtained
one using methods such as FindMessage. Message identifiers are
returned when sending requests using the SendMessage method.
If message history has been disabled, the control does not retain
previous messages. However, the most recent prompt and response are
still available and may be retrieved specifying its message identifier.
Applications that need to preserve this information should make a copy
of the data before issuing another request.
Message identifiers are unique only within the client session that
created them. They are not guaranteed to be unique across different
client sessions, processes, or future executions of the application.
Applications should treat message identifiers as opaque values and
should not make assumptions about how they are assigned internally. It
is guaranteed, however, that newer messages will always be assigned
larger message identifier values than older messages within the same
session.
If the specified message identifier does not match a message currently
stored in the client history, the method fails. This can occur if the
message has been removed because the history was cleared or trimmed.
See the Response property for additional information about
text formatting and Unicode handling for model responses.