{ "openapi": "3.1.0", "info": { "title": "ChatFly Backend application", "version": "0.0.0" }, "paths": { "/api/payment/latest-invoice": { "get": { "tags": [ "Payment" ], "summary": "Get Latest Invoice", "operationId": "get_latest_invoice_api_payment_latest_invoice_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] } }, "/api/payment/ninepay/get-payment-url": { "get": { "tags": [ "Payment" ], "summary": "Get Payment Url", "description": "Get payment url", "operationId": "get_payment_url_api_payment_ninepay_get_payment_url_get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "billing_type", "in": "query", "required": true, "schema": { "type": "integer", "title": "Billing Type" } }, { "name": "subscription_time_type", "in": "query", "required": true, "schema": { "type": "integer", "title": "Subscription Time Type" } }, { "name": "lang", "in": "query", "required": true, "schema": { "$ref": "#/components/schemas/LanguageEnum" } }, { "name": "currency", "in": "query", "required": true, "schema": { "$ref": "#/components/schemas/CurrencyEnum" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/payment/ninepay/callback": { "get": { "tags": [ "Payment" ], "summary": "Callback", "description": "Callback", "operationId": "callback_api_payment_ninepay_callback_get", "parameters": [ { "name": "result", "in": "query", "required": true, "schema": { "title": "Result" } }, { "name": "checksum", "in": "query", "required": true, "schema": { "title": "Checksum" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/user": { "post": { "tags": [ "User" ], "summary": "Create User", "description": "Add user data to database.", "operationId": "create_user_api_user_post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCreateSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "User" ], "summary": "Get Users", "description": "Get all user's information.", "operationId": "get_users_api_user_get", "parameters": [ { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "User" ], "summary": "Delete User", "description": "Delete user.", "operationId": "delete_user_api_user_delete", "parameters": [ { "name": "user_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/user/resend-verify-email": { "post": { "tags": [ "User" ], "summary": "Resend Verify Email", "description": "Add user data to database.", "operationId": "resend_verify_email_api_user_resend_verify_email_post", "parameters": [ { "name": "email", "in": "query", "required": true, "schema": { "type": "string", "title": "Email" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/user/verify-email": { "get": { "tags": [ "User" ], "summary": "Handle Verify", "operationId": "handle_verify_api_user_verify_email_get", "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/user/{user_id}": { "get": { "tags": [ "User" ], "summary": "Get User", "description": "Get user information by an id.", "operationId": "get_user_api_user__user_id__get", "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/user/forgot-password": { "put": { "tags": [ "User" ], "summary": "Forgot Password", "description": "Forgot password.", "operationId": "forgot_password_api_user_forgot_password_put", "parameters": [ { "name": "email", "in": "query", "required": true, "schema": { "type": "string", "title": "Email" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/user/forgot-password/verify": { "put": { "tags": [ "User" ], "summary": "Verify Forgot Password", "description": "Verify token forgot password.", "operationId": "verify_forgot_password_api_user_forgot_password_verify_put", "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/user/forgot-password/change-password": { "put": { "tags": [ "User" ], "summary": "Change Password", "description": "Change password.", "operationId": "change_password_api_user_forgot_password_change_password_put", "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token" } }, { "name": "password", "in": "query", "required": true, "schema": { "type": "string", "title": "Password" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/user/password": { "put": { "tags": [ "User" ], "summary": "Change Password With Auth", "description": "Change password with authentication.", "operationId": "change_password_with_auth_api_user_password_put", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "password", "in": "query", "required": true, "schema": { "type": "string", "title": "Password" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/user/activate-account-user": { "post": { "tags": [ "User" ], "summary": "Activate Account User", "operationId": "activate_account_user_api_user_activate_account_user_post", "parameters": [ { "name": "email", "in": "query", "required": true, "schema": { "type": "string", "title": "Email" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/user/billing-upgrade-request": { "post": { "tags": [ "User" ], "summary": "Send Email Upgrade", "description": "Send email upgrade billing to admin.", "operationId": "send_email_upgrade_api_user_billing_upgrade_request_post", "parameters": [ { "name": "email", "in": "query", "required": true, "schema": { "type": "string", "title": "Email" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/user/auth/google/callback": { "get": { "tags": [ "User" ], "summary": "Login Callback", "operationId": "login_callback_api_user_auth_google_callback_get", "parameters": [ { "name": "access_token", "in": "query", "required": true, "schema": { "type": "string", "title": "Access Token" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/bot": { "post": { "tags": [ "Bot" ], "summary": "Create Bot", "description": "Create a bot.", "operationId": "create_bot_api_bot_post", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotCreateSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "Bot" ], "summary": "Update Bot", "description": "Update bot.", "operationId": "update_bot_api_bot_put", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotUpdateSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Bot" ], "summary": "Delete Bot", "description": "Delete bot.", "operationId": "delete_bot_api_bot_delete", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Bot" ], "summary": "Manage Bot", "description": "Manage bot.", "operationId": "manage_bot_api_bot_get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/bot/change-status": { "post": { "tags": [ "Bot" ], "summary": "Change Status Bot", "description": "Change status bot.", "operationId": "change_status_bot_api_bot_change_status_post", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } }, { "name": "is_activate", "in": "query", "required": true, "schema": { "type": "boolean", "title": "Is Activate" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/bot/rate-limit-per-day": { "get": { "tags": [ "Bot" ], "summary": "Get Rate Limit Per Day", "description": "Get rate limit per day.", "operationId": "get_rate_limit_per_day_api_bot_rate_limit_per_day_get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Bot" ], "summary": "Change Rate Limit Per Day", "description": "Change rate limit per day.", "operationId": "change_rate_limit_per_day_api_bot_rate_limit_per_day_post", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } }, { "name": "rate_limit_per_day", "in": "query", "required": true, "schema": { "type": "integer", "title": "Rate Limit Per Day" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/bot/share": { "get": { "tags": [ "Bot" ], "summary": "Share Bot", "description": "Manage share bot.", "operationId": "share_bot_api_bot_share_get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/bot/share/verify": { "post": { "tags": [ "Bot" ], "summary": "Verify Share Bot", "description": "Verify share bot.", "operationId": "verify_share_bot_api_bot_share_verify_post", "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/bot/information": { "get": { "tags": [ "Bot" ], "summary": "Manage Bot", "description": "Information bot.", "operationId": "manage_bot_api_bot_information_get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/bot/information/collect-customer-info": { "get": { "tags": [ "Bot" ], "summary": "Get Collect Customer Info", "operationId": "get_collect_customer_info_api_bot_information_collect_customer_info_get", "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/bot/bot-template-config": { "post": { "tags": [ "Bot" ], "summary": "Create Bot Template Config", "operationId": "create_bot_template_config_api_bot_bot_template_config_post", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotTemplateConfigSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotTemplateConfigSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Bot" ], "summary": "Get Bot Template Config", "description": "Get bot template config.", "operationId": "get_bot_template_config_api_bot_bot_template_config_get", "parameters": [ { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotTemplateConfigResponseSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "Bot" ], "summary": "Update Bot Template Config", "description": "Update bot template config.", "operationId": "update_bot_template_config_api_bot_bot_template_config_put", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_template_config_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Template Config Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotTemplateConfigSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotTemplateConfigSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Bot" ], "summary": "Delete Bot Template Config", "description": "Delete bot template config.", "operationId": "delete_bot_template_config_api_bot_bot_template_config_delete", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_template_config_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Template Config Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotTemplateConfigSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/bot/bot-widget-setting": { "get": { "tags": [ "Bot" ], "summary": "Get Bot Widget Setting", "description": "Get bot widget settings by bot id", "operationId": "get_bot_widget_setting_api_bot_bot_widget_setting_get", "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotWidgetSettingSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "Bot" ], "summary": "Create Bot Widget Setting", "description": "Create a new bot widget setting.", "operationId": "create_bot_widget_setting_api_bot_bot_widget_setting_post", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotWidgetSettingSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotWidgetSettingSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "Bot" ], "summary": "Update Bot Widget Setting", "description": "Update bot widget setting.", "operationId": "update_bot_widget_setting_api_bot_bot_widget_setting_put", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotWidgetSettingSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotWidgetSettingSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Bot" ], "summary": "Delete Bot Widget Setting", "description": "Delete bot widget setting.", "operationId": "delete_bot_widget_setting_api_bot_bot_widget_setting_delete", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotWidgetSettingSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/bot/upload-bot-profile-picture": { "post": { "tags": [ "Bot" ], "summary": "Upload Bot Profile Picture", "description": "Upload bot profile picture to S3", "operationId": "upload_bot_profile_picture_api_bot_upload_bot_profile_picture_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_bot_profile_picture_api_bot_upload_bot_profile_picture_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] } }, "/api/bot/domain-access": { "post": { "tags": [ "Bot" ], "summary": "Update Domain Access", "operationId": "update_domain_access_api_bot_domain_access_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotDomainAccessSchema" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] } }, "/api/bot/evaluation": { "get": { "tags": [ "Bot" ], "summary": "Bot Evaluation Strong", "operationId": "bot_evaluation_strong_api_bot_evaluation_get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/scraping/url": { "post": { "tags": [ "Scraping" ], "summary": "Scrape Url", "description": "Create a Knowledge Base and return a streaming response.", "operationId": "scrape_url_api_scraping_url_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseCreateSchema" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] }, "delete": { "tags": [ "Scraping" ], "summary": "Delete Url Knowledge Base", "operationId": "delete_url_knowledge_base_api_scraping_url_delete", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseDeleteURLSchema" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] } }, "/api/scraping/url/{bot_id}": { "get": { "tags": [ "Scraping" ], "summary": "Get All Url", "description": "Get all urls for a given bot by bot_id", "operationId": "get_all_url_api_scraping_url__bot_id__get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BotKnowledgeBaseUrlResponseSchema" }, "title": "Response Get All Url Api Scraping Url Bot Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/scraping/file/{bot_id}": { "get": { "tags": [ "Scraping" ], "summary": "Get All File", "description": "Get all urls for a given bot by bot_id", "operationId": "get_all_file_api_scraping_file__bot_id__get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BotKnowledgeBaseFileResponseSchema" }, "title": "Response Get All File Api Scraping File Bot Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/scraping/include-resources/{bot_id}": { "get": { "tags": [ "Scraping" ], "summary": "Get Include Resources", "operationId": "get_include_resources_api_scraping_include_resources__bot_id__get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotKnowledgeBaseIncludeResourcesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/scraping/file": { "post": { "tags": [ "Scraping" ], "summary": "Upload File", "operationId": "upload_file_api_scraping_file_post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_file_api_scraping_file_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] }, "delete": { "tags": [ "Scraping" ], "summary": "Delete File Knowledge Base", "operationId": "delete_file_knowledge_base_api_scraping_file_delete", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseDeleteFileSchema" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] } }, "/api/scraping/{bot_id}": { "get": { "tags": [ "Scraping" ], "summary": "Get Status Of All Knowledge Bases", "description": "Get all knowledge bases.\n\n@param bot_id: Bot to get all knowledge bases\n@param db: Databases to use for retrieval.\n\n@return list of dicts", "operationId": "get_status_of_all_knowledge_bases_api_scraping__bot_id__get", "parameters": [ { "name": "bot_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotKnowledgeBaseResponseSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/scraping/question-answer/{bot_id}": { "post": { "tags": [ "Scraping" ], "summary": "Add One Question Answer", "description": "Import question and answer of bot.", "operationId": "add_one_question_answer_api_scraping_question_answer__bot_id__post", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotQADocumentSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotQADocumentResponseSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Scraping" ], "summary": "Get All Question Answer", "description": "Get question and answer of bot.", "operationId": "get_all_question_answer_api_scraping_question_answer__bot_id__get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BotQADocumentResponseSchema" }, "title": "Response Get All Question Answer Api Scraping Question Answer Bot Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Scraping" ], "summary": "Delete Question Answer", "description": "Delete question and answer of bot.", "operationId": "delete_question_answer_api_scraping_question_answer__bot_id__delete", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseDeleteQASchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/scraping/question-answer/{bot_id}/many": { "post": { "tags": [ "Scraping" ], "summary": "Add Many Question Answer", "description": "Import question and answer of bot.", "operationId": "add_many_question_answer_api_scraping_question_answer__bot_id__many_post", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotManyQADocumentSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BotQADocumentResponseSchema" }, "title": "Response Add Many Question Answer Api Scraping Question Answer Bot Id Many Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/scraping/text-document/{bot_id}": { "post": { "tags": [ "Scraping" ], "summary": "Add One Text Document", "description": "Import text document of bot.", "operationId": "add_one_text_document_api_scraping_text_document__bot_id__post", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportTextDocumentSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotTextDocumentResponseSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Scraping" ], "summary": "Get All Text Document", "description": "Get text document of bot.", "operationId": "get_all_text_document_api_scraping_text_document__bot_id__get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BotTextDocumentResponseSchema" }, "title": "Response Get All Text Document Api Scraping Text Document Bot Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Scraping" ], "summary": "Delete Text Document", "description": "Delete text document of bot.", "operationId": "delete_text_document_api_scraping_text_document__bot_id__delete", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseDeleteTextSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/scraping/text-document/{bot_id}/many": { "post": { "tags": [ "Scraping" ], "summary": "Add Many Text Document", "description": "Import text document of bot.", "operationId": "add_many_text_document_api_scraping_text_document__bot_id__many_post", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BotManyTextDocumentSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BotTextDocumentResponseSchema" }, "title": "Response Add Many Text Document Api Scraping Text Document Bot Id Many Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/session": { "post": { "tags": [ "Chat" ], "summary": "Generate Session", "description": "Generate new session uuid", "operationId": "generate_session_api_chat_session_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Response Generate Session Api Chat Session Post" } } } } } } }, "/api/chat/get-streaming-response": { "post": { "tags": [ "Chat" ], "summary": "Get Streaming Response", "description": "Create a Knowledge Base and return a streaming response.", "operationId": "get_streaming_response_api_chat_get_streaming_response_post", "parameters": [ { "name": "type_qa", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Type Qa" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatHistoryCreateSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/get-streaming-response-with-chat-history": { "post": { "tags": [ "Chat" ], "summary": "Get Streaming Response With Chat History", "description": "Get streaming response with chat history.", "operationId": "get_streaming_response_with_chat_history_api_chat_get_streaming_response_with_chat_history_post", "parameters": [ { "name": "type_qa", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Type Qa" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StreamingWithChatHistorySchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/get-streaming-response-with-custom-settings": { "post": { "tags": [ "Chat" ], "summary": "Get Streaming Response With Chat History", "description": "Get streaming response with custom settings.", "operationId": "get_streaming_response_with_chat_history_api_chat_get_streaming_response_with_custom_settings_post", "parameters": [ { "name": "type_qa", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Type Qa" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StreamingWithCustomSettingsSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/history": { "get": { "tags": [ "Chat" ], "summary": "Get Conversations History", "description": "Get Conversation history.", "operationId": "get_conversations_history_api_chat_history_get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } }, { "name": "date_from", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time", "default": "2023-01-01T00:00:00", "title": "Date From" } }, { "name": "date_to", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time", "default": "2030-12-31T00:00:00", "title": "Date To" } }, { "name": "order", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "created_at.desc", "title": "Order" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/session/{session_id}": { "delete": { "tags": [ "Chat" ], "summary": "Delete Session", "operationId": "delete_session_api_chat_session__session_id__delete", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/get-normal-response": { "post": { "tags": [ "Chat" ], "summary": "Get Normal Response", "description": "Get a normal response.", "operationId": "get_normal_response_api_chat_get_normal_response_post", "parameters": [ { "name": "message", "in": "query", "required": true, "schema": { "type": "string", "title": "Message" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/messager-webhook": { "get": { "tags": [ "Chat" ], "summary": "Verify Message Webhook", "operationId": "verify_message_webhook_api_chat_messager_webhook_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } }, "post": { "tags": [ "Chat" ], "summary": "Send Message Webhook", "operationId": "send_message_webhook_api_chat_messager_webhook_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/chat/history.pdf": { "post": { "tags": [ "Chat" ], "summary": "Convert History Export Pdf", "description": "Export Conversation History to PDF", "operationId": "convert_history_export_pdf_api_chat_history_pdf_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatHistoryConversationInputSchema" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] } }, "/api/chat/{session_id}/history.pdf": { "post": { "tags": [ "Chat" ], "summary": "Get Session Chat History", "description": "Export Conversation History to PDF", "operationId": "get_session_chat_history_api_chat__session_id__history_pdf_post", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatHistoryConversationInputSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/num-message-left": { "get": { "tags": [ "Chat" ], "summary": "Get Num Message Left", "operationId": "get_num_message_left_api_chat_num_message_left_get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NumMessageLeftResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/chat/submit-information": { "post": { "tags": [ "Chat" ], "summary": "Submit Information", "operationId": "submit_information_api_chat_submit_information_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatHistorySubmitInformationSchema" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/billing/upgrade": { "post": { "tags": [ "Billing" ], "summary": "Billing Upgrade", "operationId": "billing_upgrade_api_billing_upgrade_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingUpgradeSchema" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingCreateSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] } }, "/api/billing/get-current-pricing-plan": { "get": { "tags": [ "Billing" ], "summary": "Get Current Pricing Plans", "operationId": "get_current_pricing_plans_api_billing_get_current_pricing_plan_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] } }, "/api/billing/upgrade/vnpay-return": { "get": { "tags": [ "Billing" ], "summary": "Vnpay Billing Upgrade With Return", "operationId": "vnpay_billing_upgrade_with_return_api_billing_upgrade_vnpay_return_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] } }, "/api/billing/upgrade/vnpay-sandbox": { "get": { "tags": [ "Billing" ], "summary": "Vnpay Billing Redirect", "operationId": "vnpay_billing_redirect_api_billing_upgrade_vnpay_sandbox_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] } }, "/api/slack/callback": { "get": { "tags": [ "Slack" ], "summary": "Auth Callback", "operationId": "auth_callback_api_slack_callback_get", "parameters": [ { "name": "code", "in": "query", "required": true, "schema": { "type": "string", "title": "Code" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/slack/customer-info": { "get": { "tags": [ "Slack" ], "summary": "Get Customer Info", "operationId": "get_customer_info_api_slack_customer_info_get", "parameters": [ { "name": "app_id", "in": "query", "required": true, "schema": { "type": "string", "title": "App Id" } }, { "name": "team_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Team Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/slack/bot": { "post": { "tags": [ "Slack" ], "summary": "Add Bot To Channel", "operationId": "add_bot_to_channel_api_slack_bot_post", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SlackBotChannelSchema" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Slack" ], "summary": "Get Slack Bot Channel", "operationId": "get_slack_bot_channel_api_slack_bot_get", "parameters": [ { "name": "slack_team_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Slack Team Id" } }, { "name": "slack_channel_id", "in": "query", "required": true, "schema": { "type": "string", "title": "Slack Channel Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/integration/ms-team/link-conversation": { "post": { "tags": [ "Integration" ], "summary": "Create Link Conversation", "description": "Create link conversation with bot.", "operationId": "create_link_conversation_api_integration_ms_team_link_conversation_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationSchema" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationResponseSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/integration/ms-team/linked-bot": { "get": { "tags": [ "Integration" ], "summary": "Get Linked Bot", "description": "Get linked bot.", "operationId": "get_linked_bot_api_integration_ms_team_linked_bot_get", "parameters": [ { "name": "conversation_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/integration/ms-team/get-link-integration": { "get": { "tags": [ "Integration" ], "summary": "Get Linked Bot", "description": "Get linked bot.", "operationId": "get_linked_bot_api_integration_ms_team_get_link_integration_get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/integration/ms-team/linked-conversation": { "get": { "tags": [ "Integration" ], "summary": "Get Linked Bot", "description": "Get linked conversation.", "operationId": "get_linked_bot_api_integration_ms_team_linked_conversation_get", "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/integration/messager/{bot_id}": { "post": { "tags": [ "Integration" ], "summary": "Add Bot To Messager Page", "description": "Add bot to channel id.", "operationId": "add_bot_to_messager_page_api_integration_messager__bot_id__post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IntegrationMessagerCreateSchema" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] } }, "/api/integration/telegram/channel/{channel_id}": { "post": { "tags": [ "Integration" ], "summary": "Add Bot To Channel Id", "description": "Add bot to channel id.", "operationId": "add_bot_to_channel_id_api_integration_telegram_channel__channel_id__post", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Channel Id" } }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Integration" ], "summary": "Get Bot Id In Channel", "description": "Get bot id by channel id.", "operationId": "get_bot_id_in_channel_api_integration_telegram_channel__channel_id__get", "parameters": [ { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Channel Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/integration/telegram/token": { "get": { "tags": [ "Integration" ], "summary": "Get Telegram Access Token", "description": "Get telegram access token.", "operationId": "get_telegram_access_token_api_integration_telegram_token_get", "security": [ { "OAuth2PasswordBearerCookie": [] } ], "parameters": [ { "name": "bot_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bot Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/token": { "post": { "tags": [ "Authentication" ], "summary": "Login For Access Token", "description": "Login token.", "operationId": "login_for_access_token_token_post", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/Body_login_for_access_token_token_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenSchema" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/logout": { "get": { "tags": [ "Authentication" ], "summary": "Route Logout And Remove Cookie", "description": "Logout and remove cookie.", "operationId": "route_logout_and_remove_cookie_logout_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/docs/logout": { "get": { "tags": [ "Authentication" ], "summary": "Route Logout And Remove Cookie", "description": "Logout and remove cookie.", "operationId": "route_logout_and_remove_cookie_docs_logout_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/docs/login": { "get": { "tags": [ "Authentication" ], "summary": "Login Basic", "description": "Login and get token.", "operationId": "login_basic_docs_login_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "BasicAuth": [] } ] } }, "/docs": { "get": { "tags": [ "Authentication" ], "summary": "Get Documentation", "description": "Get documentation.", "operationId": "get_documentation_docs_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/user/me": { "get": { "tags": [ "Authentication" ], "summary": "Read Users Me", "description": "Get information of current user.", "operationId": "read_users_me_user_me_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSchema" } } } } }, "security": [ { "OAuth2PasswordBearerCookie": [] } ] } }, "/": { "get": { "tags": [ "UI" ], "summary": "Read Root", "operationId": "read_root__get", "responses": { "200": { "description": "Successful Response", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/logger": { "get": { "summary": "Get Logger", "operationId": "get_logger_logger_get", "responses": { "200": { "description": "Successful Response", "content": { "text/html": { "schema": { "type": "string" } } } } } } } }, "components": { "schemas": { "BillingCreateSchema": { "properties": { "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active", "default": true, "omit_default": true }, "billing_type": { "type": "integer", "title": "Billing Type", "default": 1 }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At", "default": "2023-11-26T16:35:58.901598", "omit_default": true } }, "type": "object", "title": "BillingCreateSchema", "description": "Billing Create." }, "BillingUpgradeSchema": { "properties": { "user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "User Id", "omit_default": true }, "billing_type": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Billing Type", "default": 1 } }, "type": "object", "title": "BillingUpgradeSchema", "description": "Billing update schema." }, "Body_login_for_access_token_token_post": { "properties": { "grant_type": { "anyOf": [ { "type": "string", "pattern": "password" }, { "type": "null" } ], "title": "Grant Type" }, "username": { "type": "string", "title": "Username" }, "password": { "type": "string", "title": "Password" }, "scope": { "type": "string", "title": "Scope", "default": "" }, "client_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Client Id" }, "client_secret": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Client Secret" } }, "type": "object", "required": [ "username", "password" ], "title": "Body_login_for_access_token_token_post" }, "Body_upload_bot_profile_picture_api_bot_upload_bot_profile_picture_post": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "file": { "type": "string", "format": "binary", "title": "File", "description": "A file read as UploadFile" } }, "type": "object", "required": [ "bot_id", "file" ], "title": "Body_upload_bot_profile_picture_api_bot_upload_bot_profile_picture_post" }, "Body_upload_file_api_scraping_file_post": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "file": { "type": "string", "format": "binary", "title": "File", "description": "A file read as UploadFile" } }, "type": "object", "required": [ "bot_id", "file" ], "title": "Body_upload_file_api_scraping_file_post" }, "BotCreateSchema": { "properties": { "user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "User Id", "omit_default": true }, "bot_name": { "type": "string", "title": "Bot Name" }, "case_study": { "type": "string", "title": "Case Study" }, "is_visibility": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Visibility", "omit_default": true }, "domain": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Domain", "omit_default": true }, "collect_customer_info": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Collect Customer Info" }, "rules": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Rules" }, "gpt_model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Gpt Model Name", "omit_default": true }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature", "omit_default": true }, "custom_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Custom Prompt", "omit_default": true }, "bot_tone_type": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Bot Tone Type", "omit_default": true }, "custom_error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Custom Error Message", "omit_default": true }, "is_activate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Activate", "omit_default": true } }, "type": "object", "required": [ "bot_name", "case_study" ], "title": "BotCreateSchema", "description": "Bot create." }, "BotDomainAccessSchema": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "domain": { "items": {}, "type": "array", "title": "Domain" } }, "type": "object", "required": [ "bot_id", "domain" ], "title": "BotDomainAccessSchema", "description": "Domain access schema." }, "BotKnowledgeBaseFileResponseSchema": { "properties": { "knowledge_base_id": { "type": "string", "format": "uuid", "title": "Knowledge Base Id" }, "filename": { "type": "string", "title": "Filename" }, "num_token": { "type": "integer", "title": "Num Token" } }, "type": "object", "required": [ "knowledge_base_id", "filename", "num_token" ], "title": "BotKnowledgeBaseFileResponseSchema", "description": "Base knowledge get all files." }, "BotKnowledgeBaseIncludeResources": { "properties": { "type": { "type": "string", "title": "Type" }, "number_of_resources": { "type": "integer", "title": "Number Of Resources" }, "token": { "type": "integer", "title": "Token" } }, "type": "object", "required": [ "type", "number_of_resources", "token" ], "title": "BotKnowledgeBaseIncludeResources", "description": "Base knowledge get all includes resources" }, "BotKnowledgeBaseIncludeResourcesResponse": { "properties": { "resource": { "items": { "$ref": "#/components/schemas/BotKnowledgeBaseIncludeResources" }, "type": "array", "title": "Resource" }, "total_token": { "type": "integer", "title": "Total Token" } }, "type": "object", "required": [ "resource", "total_token" ], "title": "BotKnowledgeBaseIncludeResourcesResponse" }, "BotKnowledgeBaseResponseSchema": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "full_page_url": { "type": "string", "title": "Full Page Url" }, "training_status": { "type": "string", "title": "Training Status" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "bot_id", "full_page_url", "training_status", "created_at", "updated_at" ], "title": "BotKnowledgeBaseResponseSchema", "description": "User Schema." }, "BotKnowledgeBaseUrlResponseSchema": { "properties": { "knowledge_base_id": { "type": "string", "format": "uuid", "title": "Knowledge Base Id" }, "url": { "type": "string", "title": "Url" }, "num_token": { "type": "integer", "title": "Num Token" } }, "type": "object", "required": [ "knowledge_base_id", "url", "num_token" ], "title": "BotKnowledgeBaseUrlResponseSchema", "description": "Base knowledge get all urls." }, "BotManyQADocumentSchema": { "properties": { "question_answers": { "items": { "$ref": "#/components/schemas/QuestionAnswerInputSchema" }, "type": "array", "title": "Question Answers" } }, "type": "object", "required": [ "question_answers" ], "title": "BotManyQADocumentSchema", "description": "Bot question and answer document schema." }, "BotManyTextDocumentSchema": { "properties": { "text_documents": { "items": { "type": "string" }, "type": "array", "title": "Text Documents" } }, "type": "object", "required": [ "text_documents" ], "title": "BotManyTextDocumentSchema", "description": "Bot many text document schema." }, "BotQADocumentResponseSchema": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "question": { "type": "string", "title": "Question" }, "answer": { "type": "string", "title": "Answer" }, "num_token": { "type": "integer", "title": "Num Token" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "bot_id", "question", "answer", "num_token", "created_at" ], "title": "BotQADocumentResponseSchema", "description": "Bot question and answer document response schema." }, "BotQADocumentSchema": { "properties": { "question": { "type": "string", "title": "Question" }, "answer": { "type": "string", "title": "Answer" } }, "type": "object", "required": [ "question", "answer" ], "title": "BotQADocumentSchema", "description": "Bot question and answer document schema." }, "BotSchema": { "properties": { "user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "User Id", "omit_default": true }, "bot_name": { "type": "string", "title": "Bot Name" }, "case_study": { "type": "string", "title": "Case Study" }, "is_visibility": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Visibility", "omit_default": true }, "domain": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Domain", "omit_default": true }, "collect_customer_info": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Collect Customer Info" }, "rules": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Rules" }, "gpt_model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Gpt Model Name", "omit_default": true }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature", "omit_default": true }, "custom_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Custom Prompt", "omit_default": true }, "bot_tone_type": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Bot Tone Type", "omit_default": true }, "custom_error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Custom Error Message", "omit_default": true }, "is_activate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Activate", "omit_default": true }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "num_message_left": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Num Message Left", "omit_default": true }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At", "omit_default": true }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At", "default": "2023-11-12T16:36:00.724444" } }, "type": "object", "required": [ "bot_name", "case_study", "id" ], "title": "BotSchema", "description": "Bot Schema." }, "BotTemplateConfigResponseSchema": { "properties": { "bot_template_config": { "anyOf": [ { "items": { "$ref": "#/components/schemas/BotTemplateConfigSchema" }, "type": "array" }, { "type": "null" } ], "title": "Bot Template Config" } }, "type": "object", "required": [ "bot_template_config" ], "title": "BotTemplateConfigResponseSchema", "description": "Bot template config response schema" }, "BotTemplateConfigSchema": { "properties": { "id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Id", "omit_default": true }, "case_study": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Case Study", "omit_default": true }, "prompt_template": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Prompt Template", "omit_default": true }, "gpt_model_name": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Gpt Model Name", "omit_default": true }, "visibility": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Visibility", "omit_default": true } }, "type": "object", "title": "BotTemplateConfigSchema", "description": "Bot template config schema." }, "BotTextDocumentResponseSchema": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "content": { "type": "string", "title": "Content" }, "num_token": { "type": "integer", "title": "Num Token" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "bot_id", "content", "num_token", "created_at" ], "title": "BotTextDocumentResponseSchema", "description": "Bot text document response schema." }, "BotUpdateSchema": { "properties": { "user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "User Id", "omit_default": true }, "bot_name": { "type": "string", "title": "Bot Name" }, "case_study": { "type": "string", "title": "Case Study" }, "is_visibility": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Visibility", "omit_default": true }, "domain": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Domain", "omit_default": true }, "collect_customer_info": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Collect Customer Info" }, "rules": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Rules" }, "gpt_model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Gpt Model Name", "omit_default": true }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature", "omit_default": true }, "custom_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Custom Prompt", "omit_default": true }, "bot_tone_type": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Bot Tone Type", "omit_default": true }, "custom_error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Custom Error Message", "omit_default": true }, "is_activate": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Activate", "omit_default": true }, "id": { "type": "string", "format": "uuid", "title": "Id" } }, "type": "object", "required": [ "bot_name", "case_study", "id" ], "title": "BotUpdateSchema", "description": "Bot update." }, "BotWidgetSettingSchema": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "domain": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Domain", "omit_default": true }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name", "omit_default": true }, "initial_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Initial Message", "omit_default": true }, "suggest_messages": { "anyOf": [ { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Suggest Messages", "omit_default": true }, "theme": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Theme", "omit_default": true }, "bot_avatar_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Bot Avatar Url", "omit_default": true }, "chat_icon_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Chat Icon Url", "omit_default": true }, "chat_bubble_button_color": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Chat Bubble Button Color", "omit_default": true }, "chat_message_color": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Chat Message Color", "omit_default": true }, "align_chat_bubble_button": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Align Chat Bubble Button", "omit_default": true }, "auto_show_initial_message_after": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Auto Show Initial Message After", "omit_default": true }, "is_circle_icon": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Circle Icon", "default": true, "omit_default": true } }, "type": "object", "required": [ "bot_id" ], "title": "BotWidgetSettingSchema", "description": "Bot widget setting schema." }, "ChatHistoryConversationInputSchema": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "User Id", "omit_default": true }, "order": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Order", "default": "created_at.desc", "omit_default": true }, "date_from": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Date From", "default": "2023-01-01T00:00:00", "omit_default": true }, "date_to": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Date To", "default": "2030-12-31T00:00:00", "omit_default": true } }, "type": "object", "required": [ "bot_id" ], "title": "ChatHistoryConversationInputSchema", "description": "Conversation history schema." }, "ChatHistoryCreateSchema": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "message": { "type": "string", "title": "Message" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" } }, "type": "object", "required": [ "bot_id", "message", "session_id" ], "title": "ChatHistoryCreateSchema", "description": "Message Schema." }, "ChatHistorySchema": { "properties": { "sender_type": { "type": "string", "title": "Sender Type" }, "content": { "type": "string", "title": "Content" } }, "type": "object", "required": [ "sender_type", "content" ], "title": "ChatHistorySchema", "description": "Chat history response schema." }, "ChatHistorySubmitInformationSchema": { "properties": { "user_infor": { "type": "object", "title": "User Infor" }, "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" } }, "type": "object", "required": [ "user_infor", "bot_id", "session_id" ], "title": "ChatHistorySubmitInformationSchema" }, "ConversationResponseSchema": { "properties": { "bot_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Bot Id" }, "conversation_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Conversation Id" }, "id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Id" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At", "omit_default": true }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At", "omit_default": true } }, "type": "object", "required": [ "bot_id", "conversation_id", "id" ], "title": "ConversationResponseSchema", "description": "Conversation Response Schema." }, "ConversationSchema": { "properties": { "bot_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Bot Id" }, "conversation_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Conversation Id" } }, "type": "object", "required": [ "bot_id", "conversation_id" ], "title": "ConversationSchema", "description": "Conversation Schema." }, "CurrencyEnum": { "type": "string", "enum": [ "USD", "EUR", "GBP", "CNY", "JPY", "VND" ], "title": "CurrencyEnum" }, "HTTPValidationError": { "properties": { "errors": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Errors" } }, "type": "object", "title": "HTTPValidationError" }, "ImportTextDocumentSchema": { "properties": { "content": { "type": "string", "title": "Content" } }, "type": "object", "required": [ "content" ], "title": "ImportTextDocumentSchema", "description": "Import text document schema." }, "IntegrationMessagerCreateSchema": { "properties": { "user_id": { "type": "string", "format": "uuid", "title": "User Id", "omit_default": true }, "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "page_id": { "type": "string", "title": "Page Id" }, "page_token": { "type": "string", "title": "Page Token" } }, "type": "object", "required": [ "bot_id", "page_id", "page_token" ], "title": "IntegrationMessagerCreateSchema", "description": "Integration Messager Create Schema." }, "KnowledgeBaseCreateSchema": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "scrape_url": { "type": "string", "title": "Scrape Url" }, "scrape_type": { "anyOf": [ { "$ref": "#/components/schemas/ScrapeTypeEnum" }, { "type": "null" } ], "default": 2, "omit_default": true } }, "type": "object", "required": [ "bot_id", "scrape_url" ], "title": "KnowledgeBaseCreateSchema" }, "KnowledgeBaseDeleteFileSchema": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "knowledge_base_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Knowledge Base Ids" } }, "type": "object", "required": [ "bot_id", "knowledge_base_ids" ], "title": "KnowledgeBaseDeleteFileSchema" }, "KnowledgeBaseDeleteQASchema": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "question_answer_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Question Answer Ids" } }, "type": "object", "required": [ "bot_id", "question_answer_ids" ], "title": "KnowledgeBaseDeleteQASchema" }, "KnowledgeBaseDeleteTextSchema": { "properties": { "text_document_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Text Document Ids" } }, "type": "object", "required": [ "text_document_ids" ], "title": "KnowledgeBaseDeleteTextSchema" }, "KnowledgeBaseDeleteURLSchema": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "base64_urls": { "items": { "type": "string" }, "type": "array", "title": "Base64 Urls" } }, "type": "object", "required": [ "bot_id", "base64_urls" ], "title": "KnowledgeBaseDeleteURLSchema" }, "LanguageEnum": { "type": "string", "enum": [ "en", "vi" ], "title": "LanguageEnum" }, "NumMessageLeftResponse": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "num_message_left": { "type": "integer", "title": "Num Message Left" } }, "type": "object", "required": [ "bot_id", "num_message_left" ], "title": "NumMessageLeftResponse" }, "QuestionAnswerInputSchema": { "properties": { "question": { "type": "string", "title": "Question" }, "answer": { "type": "string", "title": "Answer" } }, "type": "object", "required": [ "question", "answer" ], "title": "QuestionAnswerInputSchema" }, "ScrapeTypeEnum": { "type": "integer", "enum": [ 1, 2 ], "title": "ScrapeTypeEnum" }, "SlackBotChannelSchema": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "slack_channel_id": { "type": "string", "title": "Slack Channel Id" }, "slack_team_id": { "type": "string", "title": "Slack Team Id" }, "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id", "omit_default": true } }, "type": "object", "required": [ "bot_id", "slack_channel_id", "slack_team_id" ], "title": "SlackBotChannelSchema" }, "StreamingWithChatHistorySchema": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "message": { "type": "string", "title": "Message" }, "chat_history": { "items": { "$ref": "#/components/schemas/ChatHistorySchema" }, "type": "array", "title": "Chat History" } }, "type": "object", "required": [ "bot_id", "message", "chat_history" ], "title": "StreamingWithChatHistorySchema", "description": "Streaming With Chat History Schema." }, "StreamingWithCustomSettingsSchema": { "properties": { "bot_id": { "type": "string", "format": "uuid", "title": "Bot Id" }, "message": { "type": "string", "title": "Message" }, "chat_history": { "items": { "$ref": "#/components/schemas/ChatHistorySchema" }, "type": "array", "title": "Chat History" }, "custom_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Custom Prompt", "default": "I want you to act as an assistant to a customer support agent by writing email responses. I will provide the customer inquiry or issue, and your task is to compose an appropriate, professional, and helpful response. You should not include additional instructions, questions, or explanations in your response. Only the main body of the email needs to be written.", "omit_default": true }, "gpt_model_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Gpt Model Name", "default": "gpt-3.5-turbo-16k", "omit_default": true }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature", "default": 0, "omit_default": true }, "rules": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Rules" } }, "type": "object", "required": [ "bot_id", "message", "chat_history" ], "title": "StreamingWithCustomSettingsSchema", "description": "Streaming With Chat History Schema." }, "TokenSchema": { "properties": { "access_token": { "type": "string", "title": "Access Token" }, "token_type": { "type": "string", "title": "Token Type" } }, "type": "object", "required": [ "access_token", "token_type" ], "title": "TokenSchema", "description": "Token Model." }, "UserCreateSchema": { "properties": { "email": { "type": "string", "title": "Email" }, "password": { "type": "string", "title": "Password" }, "full_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Full Name", "omit_default": true }, "role": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role", "omit_default": true } }, "type": "object", "required": [ "email", "password" ], "title": "UserCreateSchema", "description": "User create." }, "UserSchema": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "email": { "type": "string", "title": "Email" }, "is_active": { "type": "boolean", "title": "Is Active" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At", "omit_default": true }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At", "default": "2023-11-12T16:35:58.269569" } }, "type": "object", "required": [ "id", "email", "is_active" ], "title": "UserSchema", "description": "User Schema." }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" } }, "securitySchemes": { "OAuth2PasswordBearerCookie": { "type": "oauth2", "flows": { "password": { "scopes": {}, "tokenUrl": "/token" } } }, "BasicAuth": { "type": "http", "scheme": "bearer" } } } }