openapi.py 216 B

1234567891011
  1. import json
  2. from g4f.api import create_app
  3. app = create_app()
  4. with open("openapi.json", "w") as f:
  5. data = json.dumps(app.openapi())
  6. f.write(data)
  7. print(f"openapi.json - {round(len(data)/1024, 2)} kbytes")