Skip to content

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask_test# Flask API

The address of BASE_URL :

API Usage

/audio_steam

  • function: get the audio_steam data
  • method: POST
  • data: the data of audio steam

/api/register

  • function: regiseter a user
  • method: POST
  • data:
     {
     	"email": "your email address",
     	"username": "your user name",
     	"password": "your password",
     	"avatar_url": "your avatar url"
     }

/api/login

  • function: user login
  • method: POST
  • data:
     {
     	"username": "your user name",
     	"password": "your password"
     }

/api/logout

  • function: user logout
  • method: POST
  • data: none

/api/messages

@login_required

  • function: send a message
  • method: POST
  • data:
     {
     	"content": "the content you want to send"
     }

/api/messages

@login_required

  • function: get all messages
  • method: GET
  • data: none

/api/admin/users

@login_required

  • function: get all users if you are an admin
  • method: GET
  • data: none

/api/upload_image

Maybe only in China this method is active!

  • function: upload an image to TencentCloud COS Bucket

  • method: POST

  • data:

    image: the image you want to upload

/api/add_knowledge

  • function: give Cara an image and then Cara will understand the image and then add to its konwledge base
  • method: POST
  • data:
      {
      	"url": "your image url"
      }
    

/api/get_knowledge

  • function: get the knowledge base
  • method: GET
  • data: none

/api/answer_question

  • function: answer user's question based on Cara's knowledge base
  • method: POST
  • data:
      {
      	"question": "your question"
      }
    

/api/delete_all_message

  • function: delete add messages
  • method: GET
  • data: none

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages