Skip to content

Structured Output

Pass a JSON Schema object on the turn:

EveMessageResponse response = await session.SendAsync(
    new EveSendTurnRequest
    {
        Message = EveMessageContent.FromText("Return a structured summary."),
        OutputSchema = outputSchema,
    },
    cancellationToken);

The eve server remains authoritative for validation. The client exposes the most recent result.completed value through EveTurnOutcome.Data.

Use source-generated JSON metadata to deserialize it:

Summary? summary = outcome.DeserializeData(AppJsonContext.Default.Summary);

Structured-output schemas apply only to the turn that sends them.