manage.py deploy_builtin_llm_clients
This module is used to deploy a customer API.
- class smarter.apps.llm_client.management.commands.deploy_builtin_llm_clients.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]
Bases:
SmarterCommandDeploy built-in llm_clients and plugins for a Smarter account.
This management command automates the deployment of default llm_clients 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 llm_clients, and then deploys each llm_client as a Celery task.
The deployed llm_clients are accessible at URLs of the form:
[llm_client-name].[account-number].api.example.com/llm-client/- 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 llm_client manifest files, create each llm_client, and deploy it asynchronously.
Output progress and status messages for each operation.
This command is intended for administrators to quickly provision standard llm_clients and plugins for new or existing accounts, ensuring consistent setup and deployment across environments.
- create_and_deploy_llm_client(filespec)[source]
Create and deploy an llm_client 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 llm_client by name - deploy the llm_client 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: UserProfile | None = None