letta-ai / letta

Letta (formerly MemGPT) is a framework for creating LLM services with memory.
https://letta.com
Apache License 2.0
12.88k stars 1.41k forks source link

refactor: patching openapi schema #2035

Open cpacker opened 1 week ago

cpacker commented 1 week ago

Fix issues w/ autogenerated SDK workflow

API changes:

  1. Send message modified to only allow List[MessageCreate] instead of Union[List[Message], List[MessageCreate]]
  2. Get messages modified to be a Union over special types that have names, instead of just a union of Message and LettaMessageUnion

Related error for (2):

Could not infer a name for the union variant.
openapi:2382Schema/CannotInferUnionVariantName
The name for a union variant is inferred from
* a model definition
* a title property on a schema
OpenAPI: #›paths›/v1/agents/{agent_id}/messages›get›responses›200›content›application/json›schema›anyOf›0