mirror of
https://github.com/cpacker/MemGPT.git
synced 2025-06-03 04:30:22 +00:00
fix: run openapi polyfill (#1937)
This commit is contained in:
parent
cad8232a14
commit
b2e7e236f2
@ -70,6 +70,9 @@ def generate_openapi_schema(app: FastAPI):
|
||||
letta_docs["components"]["schemas"]["LettaAssistantMessageContentUnion"] = create_letta_assistant_message_content_union_schema()
|
||||
letta_docs["components"]["schemas"]["LettaUserMessageContentUnion"] = create_letta_user_message_content_union_schema()
|
||||
|
||||
# Update the app's schema with our modified version
|
||||
app.openapi_schema = letta_docs
|
||||
|
||||
for name, docs in [
|
||||
(
|
||||
"letta",
|
||||
@ -303,6 +306,9 @@ def create_application() -> "FastAPI":
|
||||
# / static files
|
||||
mount_static_files(app)
|
||||
|
||||
# Generate OpenAPI schema after all routes are mounted
|
||||
generate_openapi_schema(app)
|
||||
|
||||
@app.on_event("shutdown")
|
||||
def on_shutdown():
|
||||
global server
|
||||
|
Loading…
Reference in New Issue
Block a user