Method GetTurnStatus
GetTurnStatus(ChatResponse)
Reads the turn status off an aggregated response.
public static ChatTurnStatus? GetTurnStatus(this ChatResponse response)
Parameters
responseChatResponseThe response.
Returns
- ChatTurnStatus
The status, or null when the response did not come from this client.
Remarks
EdgeChatClient.GetResponseAsync puts the record on the response itself. A consumer
who aggregates the stream with MEAI's ToChatResponse gets it on the aggregated
assistant message instead - that is where MEAI lands an update's
AdditionalProperties - so both places are read, response first.
Exceptions
- ArgumentNullException
responseis null.
GetTurnStatus(ChatResponseUpdate)
Reads the turn status off a streaming update.
public static ChatTurnStatus? GetTurnStatus(this ChatResponseUpdate update)
Parameters
updateChatResponseUpdateThe update; only the final one carries it.
Returns
- ChatTurnStatus
The status, or null when this update does not carry one.
Exceptions
- ArgumentNullException
updateis null.