Drifting Bottle Messenger · GPT 작업
Message Bottle Service without Authentication
This service defines a set of APIs to implement **Message Bottle** scenario and let user use it without authentication which means users need not sign up and sign in.
GET /retrieve_message_bottleRetrieveMessageBottleThis API is used to handle the user's intent to retrieve a message bottle or to fetch a message bottle from the ocean.
GET /howtoHowToThis API is used to introduce the application, Drifting Bottle Messenger.
원본 API 스키마
{
"openapi": "3.0.0",
"info": {
"title": "Message Bottle Service without Authentication",
"description": "This service defines a set of APIs to implement **Message Bottle** scenario and let user use it without authentication which means users need not sign up and sign in.",
"version": "1.0"
},
"servers": [
{
"url": "https://message-bottle.azurefd.net",
"description": "Message Bottle service"
}
],
"paths": {
"/retrieve_message_bottle": {
"get": {
"description": "This API is used to handle the user's intent to retrieve a message bottle or to fetch a message bottle from the ocean.",
"operationId": "RetrieveMessageBottle",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageBottleResponse"
}
}
}
}
}
}
},
"/howto": {
"get": {
"description": "This API is used to introduce the application, Drifting Bottle Messenger.",
"operationId": "HowTo",
"responses": {
"200": {
"description": "success and returns some html text to introduce the application and also show how to use this application.",
"content": {
"text/html": {
"schema": {
"type": "string",
"example": "<html><body>Our platform offers a unique space where individuals can freely express their thoughts, release frustrations, share personal anecdotes, or cultivate connections with others through a playful and anonymous environment. We introduce an innovative method for fostering global connections. Users can dispatch and receive messages across a digital expanse, facilitating serendipitous interactions and the exchange of emotions and experiences. Leveraging the capabilities of GPT-4, our service bridges linguistic divides, enabling people from various corners of the globe to communicate effortlessly within this application. Moreover, each instance of text generation by ChatGPT-4, while immensely valuable, entails both energy and monetary costs. As such, we encourage the sharing of these precious outputs with others on our platform, enriching the communal experience and maximizing the utility of every generated text.</body></html>"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"User": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The user's name."
},
"email": {
"type": "string",
"description": "The user's email."
},
"alias": {
"type": "string",
"description": "The alias of the user. It's for anonymous communication in this application."
}
},
"description": "User schema. It can be sender, reader, replyer in this application."
},
"Reply": {
"required": [
"create_datetime",
"reader"
],
"type": "object",
"properties": {
"reader": {
"$ref": "#/components/schemas/User"
},
"create_datetime": {
"type": "string",
"description": "The create datetime for this reply."
},
"content": {
"type": "string",
"description": "The reply content in this reply. It could be empty which means that the replier only reads the message bottle but not leaves a reply."
}
}
},
"MessageBottle": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The UUID for the message bottle."
},
"sender": {
"$ref": "#/components/schemas/User"
},
"create_datetime": {
"type": "string",
"description": "The create datetime for this message bottle.",
"example": "2024-01-28 08:00:00"
},
"content": {
"type": "string",
"description": "The message content in this message bottle.",
"example": " Life has been overwhelming, with changes at every turn, and I find myself longing for simpler times."
},
"last_modified_datetime": {
"type": "string",
"description": "The last modified datetime of this message bottle. It stands for the create datetime if nobody has read it. If somebody has read or replied to this message bottle, the last modified datetime stands for the latest time."
},
"replies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Reply"
}
}
}
},
"MessageBottleResponse": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Whether the user action for Message Bottle was executed successfully, including RetrieveMessageBottle, SendMessageBottle, ReplyToMessageBottle."
},
"msg": {
"type": "string",
"description": "It is used to show the information of this response in friendly way."
},
"data": {
"$ref": "#/components/schemas/MessageBottle"
},
"html": {
"type": "string",
"description": "This property illustrates how to show the message bottle in the web and it is used to instruct caller to render it's web page."
}
}
}
}
}
}Message Bottle Service
This service defines a set of APIs to implement **Message Bottle** scenario.
GET /users/meGetUserInfoThis API is used to get user's account information.
POST /users/meUpdateAliasThis API is used to update user's alias.
POST /send_message_bottleSendMessageBottleThis API is used to handle the user's intent to send a message bottle or to create a message bottle and drop it into the ocean.
GET /check_message_bottlesCheckMessageBottlesThis API is used to handle the user's intent to check the message bottles that he/she accessed, including sent and retrieved message bottle.
POST /reply_to_message_bottleReplyToMessageBottleThis API is used to handle the user's intent to reply to a message bottle. You must know the `message_id` and the reply `content` before call this API.
원본 API 스키마
{
"openapi": "3.0.0",
"info": {
"title": "Message Bottle Service",
"description": "This service defines a set of APIs to implement **Message Bottle** scenario.",
"version": "1.0"
},
"servers": [
{
"url": "https://chatbot-frontend.azurefd.net",
"description": "Message Bottle service"
}
],
"paths": {
"/users/me": {
"get": {
"description": "This API is used to get user's account information.",
"operationId": "GetUserInfo",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserInfoResponse"
}
}
}
}
}
},
"post": {
"description": "This API is used to update user's alias.",
"operationId": "UpdateAlias",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserInfoRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserInfoResponse"
}
}
}
}
},
"security": [
{
"OAuth2": [
"api://b804568d-677f-4fc7-9bb3-45cb68837c9a/Bottle.Read"
]
}
],
"x-openai-isConsequential": false
}
},
"/send_message_bottle": {
"post": {
"description": "This API is used to handle the user's intent to send a message bottle or to create a message bottle and drop it into the ocean.",
"operationId": "SendMessageBottle",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SendMessageBottleRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageBottleResponse"
}
}
}
}
},
"security": [
{
"OAuth2": [
"api://b804568d-677f-4fc7-9bb3-45cb68837c9a/Bottle.Read"
]
}
],
"x-openai-isConsequential": false
}
},
"/check_message_bottles": {
"get": {
"description": "This API is used to handle the user's intent to check the message bottles that he/she accessed, including sent and retrieved message bottle.",
"operationId": "CheckMessageBottles",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageBottlesResponse"
}
}
}
}
},
"security": [
{
"OAuth2": [
"api://b804568d-677f-4fc7-9bb3-45cb68837c9a/Bottle.Read"
]
}
]
}
},
"/reply_to_message_bottle": {
"post": {
"description": "This API is used to handle the user's intent to reply to a message bottle. You must know the `message_id` and the reply `content` before call this API.",
"operationId": "ReplyToMessageBottle",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReplyToMessageBottleRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageBottleResponse"
}
}
}
}
},
"security": [
{
"OAuth2": [
"api://b804568d-677f-4fc7-9bb3-45cb68837c9a/Bottle.Read"
]
}
],
"x-openai-isConsequential": false
}
}
},
"components": {
"schemas": {
"User": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The user's name."
},
"email": {
"type": "string",
"description": "The user's email."
},
"alias": {
"type": "string",
"description": "The alias of the user. It's for anonymous communication in this application."
}
},
"description": "User schema. It can be sender, reader, replyer in this application."
},
"Reply": {
"required": [
"create_datetime",
"reader"
],
"type": "object",
"properties": {
"reader": {
"$ref": "#/components/schemas/User"
},
"create_datetime": {
"type": "string",
"description": "The create datetime for this reply."
},
"content": {
"type": "string",
"description": "The reply content in this reply. It could be empty which means that the replier only reads the message bottle but not leaves a reply."
}
}
},
"MessageBottle": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The UUID for the message bottle."
},
"sender": {
"$ref": "#/components/schemas/User"
},
"create_datetime": {
"type": "string",
"description": "The create datetime for this message bottle.",
"example": "2024-01-28 08:00:00"
},
"content": {
"type": "string",
"description": "The message content in this message bottle.",
"example": " Life has been overwhelming, with changes at every turn, and I find myself longing for simpler times."
},
"last_modified_datetime": {
"type": "string",
"description": "The last modified datetime of this message bottle. It stands for the create datetime if nobody has read it. If somebody has read or replied to this message bottle, the last modified datetime stands for the latest time."
},
"replies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Reply"
}
}
}
},
"MessageBottles": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MessageBottle"
}
},
"MessageBottleResponse": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Whether the user action for Message Bottle was executed successfully, including RetrieveMessageBottle, SendMessageBottle, ReplyToMessageBottle."
},
"msg": {
"type": "string",
"description": "It is used to show the information of this response in friendly way."
},
"data": {
"$ref": "#/components/schemas/MessageBottle"
},
"html": {
"type": "string",
"description": "This property illustrates how to show the message bottle in the web and it is used to instruct caller to render it's web page."
}
}
},
"MessageBottlesResponse": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Whether the user action for Message Bottles was executed successfully, including CheckMessageBottles."
},
"msg": {
"type": "string",
"description": "It is used to show the information of this response in friendly way."
},
"data": {
"$ref": "#/components/schemas/MessageBottles"
},
"html": {
"type": "string",
"description": "This property illustrates how to show the message bottle in the web and it is used to instruct caller to render it's web page."
}
}
},
"SendMessageBottleRequest": {
"required": [
"content"
],
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "The message content to be sent out."
}
}
},
"ReplyToMessageBottleRequest": {
"required": [
"content",
"message_id"
],
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "The reply content that user want to reply to the message bottle."
},
"message_id": {
"type": "string",
"description": "The message id that user want to reply."
}
}
},
"UserInfoRequest": {
"type": "object",
"properties": {
"alias": {
"type": "string",
"description": "The alias that user wants to set or update."
}
}
},
"UserInfoResponse": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Whether get user's information successfully."
},
"msg": {
"type": "string",
"description": "Show the user's information in friendly way."
},
"data": {
"$ref": "#/components/schemas/User"
}
}
}
},
"securitySchemes": {
"OAuth2": {
"type": "oauth2",
"flows": {
"authorizationCode": {
"authorizationUrl": "https://chatbot-frontend.azurefd.net/oauth2/authorize",
"tokenUrl": "https://chatbot-frontend.azurefd.net/oauth2/token",
"scopes": {
"api://b804568d-677f-4fc7-9bb3-45cb68837c9a/Bottle.Read": "Access API"
}
}
}
}
}
}
}