manage.py deploy_builtin_chatbots
This module is used to deploy a customer API.
- class smarter.apps.chatbot.management.commands.deploy_builtin_chatbots.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]
Bases:
SmarterCommandDeploy built-in chatbots and plugins for a Smarter account.
This management command automates the deployment of default chatbots and plugins for a given account. The account can be specified by its account number. The deployment process reads YAML manifest files from predefined directories, applies each manifest to create plugins and chatbots, and then deploys each chatbot as a Celery task.
The deployed chatbots are accessible at URLs of the form:
[chatbot-name].[account-number].api.example.com/chatbot/- Deployment Steps:
Retrieve the account and its admin user using the provided account number.
Iterate through all plugin manifest files and create each plugin.
Iterate through all chatbot manifest files, create each chatbot, and deploy it asynchronously.
Output progress and status messages for each operation.
This command is intended for administrators to quickly provision standard chatbots and plugins for new or existing accounts, ensuring consistent setup and deployment across environments.
- create_and_deploy_chatbot(filespec)[source]
Create and deploy a chatbot by name. Apply the Smarter yaml manifest: - Read and Parse the YAML file - load in the body of the POST request - get a response - check the response - get the chatbot by name - deploy the chatbot as a Celery task
- Return type:
- create_plugin(filespec)[source]
Create a plugin by name. Apply the Smarter yaml manifest: - Read and Parse the YAML file - load in the body of the POST request - get a response - check the response
- Return type:
-
user_profile:
Optional[UserProfile] = None