-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Description
I want to convert MCP tools to FoundationModels, but failed.
extension Value {
func compatible() -> GenerationSchema {
let data = try! JSONEncoder().encode(self)
// failed
return try! JSONDecoder().decode(GenerationSchema.self, from: data)
}
}The error output:
Swift.DecodingError.keyNotFound(CodingKeys(stringValue: "additionalProperties", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: \"additionalProperties\", intValue: nil) (\"additionalProperties\").", underlyingError: nil))
lin72h
Metadata
Metadata
Assignees
Labels
No labels