Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: patching openapi schema #2035

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

refactor: patching openapi schema #2035

wants to merge 3 commits into from

Conversation

cpacker
Copy link
Collaborator

@cpacker cpacker commented Nov 13, 2024

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

"text/event-stream": {"description": "Server-Sent Events stream"},
"application/json": {
"schema": {
"$ref": "#/components/schemas/LettaResponse",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was missing a nesting layer w/ schema

@cpacker cpacker requested a review from 4shub November 25, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants