選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

index.py 353B

123456789101112131415
  1. from controllers.service_api import api
  2. from flask import current_app
  3. from flask_restful import Resource
  4. class IndexApi(Resource):
  5. def get(self):
  6. return {
  7. "welcome": "Dify OpenAPI",
  8. "api_version": "v1",
  9. "server_version": current_app.config['CURRENT_VERSION']
  10. }
  11. api.add_resource(IndexApi, '/')