Omit None fields when serializing Content, add optional id to function call/response data, and add Part helpers
#11
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
1.
ContentserializesNonefields asnullIn
src/types/common.rs,Contenthas noskip_serializing_ifonroleorparts:So
system_instruction(which hasrole: None) sends"role": nullin outgoing requests. Fixed the same way in andreban/geologia#21:2. Missing
idon function call/response dataFunctionCallDataandFunctionResponseDatainsrc/types/common.rshave no optionalidfield. Add (as in andreban/geologia#19):3.
Parthelper constructorsPartlacks helper constructors for attaching athought_signatureorFunctionResponsePartmedia blocks, so callers have to mutate struct fields after construction. Add builder-style helpers for these.