Management Commands
This module is used to generate seed records for the prompt history models.
- class smarter.apps.provider.management.commands.initialize_providers.Command(*args, **kwargs)[source]
Bases:
SmarterCommandDjango manage.py initialize_providers.py command.
This command is used to create/update the principal Providers that are preloaded on all platforms.
This runs during deployment.
- initialize_provider_model(provider, model_name, is_default=False)[source]
Helper function to initialize a single provider model.
- initialize_provider_models(provider, bearer_token, default_model)[source]
Initialize models by fetching them from the OpenAI compatible API end point.
Example response:
{ "object": "list", "data": [ { "id": "gpt-4-0613", "object": "model", "created": 1686588896, "owned_by": "openai" } ] }
- user_profile: UserProfile | None = None