gpt4free/etc/tool/openapi.py

11 lines
216 B
Python
Raw Normal View History

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