Skip to main content

turns_of

Function turns_of 

Source
pub fn turns_of(state: &Value) -> Option<Vec<Turn>>
Expand description

Read a state as a conversation, or None when it is not one.

Only an array whose every element carries some text counts, so a string state, a row of numbers or an object of fields is never mistaken for a thread and quietly reshaped. The key names are read loosely because a transcript pasted in from a chat API is still a transcript.