manage.py deploy_llmclient
This module is used to deploy a customer API.
- class smarter.apps.llmclient.management.commands.deploy_llmclient.Command(*args, **kwargs)[source]
Bases:
SmarterCommandDeploy a customer API.
Provide either an account number or a company name. Deploys to a URL of the form [user-defined-subdomain].####-####-####.api.example.com/llm-client/
- handle(*args, **options)[source]
Deploy a customer-facing llmclient API for a Smarter account.
This management command enables administrators to deploy an llmclient for a specific account, identified either by its account number or company name. The llmclient is deployed to a URL structured as
[subdomain].[account-number].api.example.com/llm-client/.The deployment process checks for the existence of the specified account and llmclient, verifies DNS status, and initiates deployment either synchronously (foreground) or asynchronously (background Celery task).
Usage: - Specify the account using either
--account_numberor--company_name. - Provide the llmclient’s name (subdomain) via--name. - Optionally use--foregroundto run the deployment synchronously.Deployment Steps: - Retrieve the account by account number or company name. - Locate the llmclient by name within the account. - If the llmclient is already deployed and DNS is verified, report success. - Otherwise, deploy the llmclient using the appropriate method. - Output progress and completion messages.
This command streamlines the process of making llmclients available to end users, ensuring proper DNS verification and deployment status.