dart_json_schema_prompt library
A Dart package for creating prompts and handling outputs in JSON schema format.
This library provides utilities for:
- Creating structured prompts with JSON schema specifications
- Parsing JSON responses into strongly typed objects
- Handling both single objects and lists
- Validating JSON schema compliance
Classes
- JsonSchemaParser
- A utility class for parsing and validating JSON responses against schemas.
- JsonSchemaPrompt
- A utility class for creating structured prompts with JSON schema specifications.
- PromptConfig
- Configuration for generating structured prompts with JSON schema.
- PropertyBuilder
- Builder class for creating PropertyDefinition objects with common patterns.
- PropertyDefinition
- Defines a property within a JSON schema.
- SchemaDefinition
- Defines the structure and constraints for a JSON schema.
Enums
- SchemaType
- Supported JSON schema types.
Exceptions / Errors
- JsonParsingException
- Exception thrown when JSON parsing fails.
- JsonSchemaException
- Base exception for JSON schema prompt operations.
- JsonSchemaValidationException
- Exception thrown when JSON schema validation fails.
- PromptGenerationException
- Exception thrown when prompt generation fails.