Exception thrown when a model fails to produce valid structured output.
# Source: https://github.com/agentscope-ai/agentscope | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
# -*- coding: utf-8 -*-
"""The model related exceptions."""
from ._base import DeveloperOrientedException
class StructuredOutputError(DeveloperOrientedException):
"""Raised when the model fails to produce a valid structured output,
e.g. it does not call the structured-output tool, returns an empty
response, or the returned arguments fail JSON/schema validation."""
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key