MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / ExtractContent

Method ExtractContent

docs/test-csharp-snippets/Module.cs:218–227  ·  view source on GitHub ↗
(string json)

Source from the content-addressed store, hash-verified

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)]

Callers

nothing calls this directly

Calls 1

ParseMethod · 0.45

Tested by

no test coverage detected