-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
enhancementNew feature or requestNew feature or request
Description
As described by @belozierov in #98 (comment):
I receive the LLM response as JSON (decoded using
Decodable), which contains the generatedContent(decoded viaAnyCodable) along with additional metadata. I then: 1. Re-encode theAnyCodablecontent back intoData2. Convert thatDatainto aString3. Pass it toGeneratedContent.init(json: String), where it is converted back intoDataagainTo reduce unnecessary transformations (allocations/copies), it would be useful to add
GeneratedContent.init(json: Data). It would be even better ifGeneratedContentsupportedCodabledirectly for JSON data (initially this was a bit confusing, because I assumed this was already howGeneratedContent: Codableworked).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request