Class StructuredOutputException
- Namespace
- Mythosia.AI.Exceptions
- Assembly
- Mythosia.AI.Abstractions.dll
Exception thrown when structured output deserialization fails after all retry attempts. Contains rich diagnostic context: raw LLM responses, parse errors, attempt count, and schema.
public class StructuredOutputException : AIServiceException, ISerializable
- Inheritance
-
StructuredOutputException
- Implements
- Inherited Members
Constructors
StructuredOutputException(string, string, string, string, int, string)
public StructuredOutputException(string targetTypeName, string firstRawResponse, string lastRawResponse, string parseError, int attemptCount, string schemaJson)
Parameters
targetTypeNamestringfirstRawResponsestringlastRawResponsestringparseErrorstringattemptCountintschemaJsonstring
Properties
AttemptCount
Total number of attempts made (1 initial + retries).
public int AttemptCount { get; }
Property Value
FirstRawResponse
The raw LLM response from the first attempt.
public string FirstRawResponse { get; }
Property Value
LastRawResponse
The raw LLM response from the last attempt.
public string LastRawResponse { get; }
Property Value
ParseError
The last JSON parse/deserialization error message.
public string ParseError { get; }
Property Value
SchemaJson
The JSON schema that the LLM was instructed to follow.
public string SchemaJson { get; }
Property Value
TargetTypeName
The target type name that deserialization was attempted for.
public string TargetTypeName { get; }