(string json)
| 216 | } |
| 217 | |
| 218 | private static string? ExtractContent(string json) |
| 219 | { |
| 220 | // Simple extraction - in production, use proper JSON parsing |
| 221 | var doc = JsonDocument.Parse(json); |
| 222 | return doc.RootElement |
| 223 | .GetProperty("choices")[0] |
| 224 | .GetProperty("message") |
| 225 | .GetProperty("content") |
| 226 | .GetString(); |
| 227 | } |
| 228 | |
| 229 | // === Snippet 9: File Storage - S3 Upload === |
| 230 | [SpacetimeDB.Table(Accessor = "Document", Public = true)] |