Skip to main content

parse_harmony_response

Function parse_harmony_response 

Source
pub fn parse_harmony_response(output: &str) -> Result<ParsedHarmonyResponse>
Expand description

Parse one complete decoded GPT-OSS Harmony response.

Accepted shapes are deliberately narrow:

  • final<|return|>
  • analysis<|end|> -> final<|return|>
  • analysis<|end|> -> commentary to=functions.NAME ... <|call|>

The first message may omit <|start|>assistant because that prefix is normally already present at the end of the rendered generation prompt.