Structured Output
Basic Usage
[JsonSchema]
public class Character
{
public string Name { get; set; }
public int Level { get; set; }
public string Class { get; set; }
}
Character hero = await "Generate a level 10 warrior"
.GENStruct<Character>()
.ExecuteAsync();
Debug.Log($"{hero.Name} - Lv.{hero.Level} {hero.Class}");Defining Schema Classes
1. Simple Class
2. Nested Objects
3. Collections
4. Enums
Input Types
String Input
Prompt Input
Configuration
Model Selection
Temperature
Common Use Cases
1. Data Extraction
2. Form Generation
3. Configuration Files
4. Content Generation
Unity Examples
Example 1: NPC Dialog Generator
Example 2: Item Database Generator
Example 3: Level Configuration
Example 4: Character Sheet
Best Practices
✅ Do
❌ Don't
Validation
Provider Support
Provider
Support
Models
Error Handling
Next Steps
Last updated