Signals

Signals for llm_client app.

These signals are used to notify various events in the llm_client lifecycle, such as deployment, DNS verification, and API management.

smarter.apps.llm_client.signals.broker_ready = <django.dispatch.dispatcher.Signal object>

Signal sent when a broker achieves a ready state.

Parameters:

broker – The broker instance that is ready.

Example:

broker_ready.send(sender=self.__class__, broker=self)
smarter.apps.llm_client.signals.llm_client_called = <django.dispatch.dispatcher.Signal object>

Signal triggered when an llm_client is called.

Parameters:
  • llm_client (LLMClient) – The llm_client instance.

  • request (HttpRequest) – The HTTP request object.

  • args – Positional arguments.

  • kwargs – Keyword arguments.

Example:

llm_client_called.send(sender=self.__class__, llm_client=self.llm_client, request=request, args=args, kwargs=kwargs)
smarter.apps.llm_client.signals.llm_client_deploy = <django.dispatch.dispatcher.Signal object>

Signal triggered when an llm_client deployment is initiated.

Parameters:

llm_client (LLMClient) – The llm_client instance.

Example:

llm_client_deploy.send(sender=self.__class__, llm_client=self)
smarter.apps.llm_client.signals.llm_client_deploy_failed = <django.dispatch.dispatcher.Signal object>

Signal triggered when an llm_client deployment fails.

Parameters:

llm_client (LLMClient) – The llm_client instance.

Example:

llm_client_deploy_failed.send(sender=self.__class__, llm_client=self)
smarter.apps.llm_client.signals.llm_client_deploy_status_changed = <django.dispatch.dispatcher.Signal object>

Signal triggered when the deployment status of an llm_client changes.

Parameters:

llm_client (LLMClient) – The llm_client instance.

Example:

llm_client_deploy_status_changed.send(sender=self.__class__, llm_client=self)
smarter.apps.llm_client.signals.llm_client_deployed = <django.dispatch.dispatcher.Signal object>

Signal triggered when an llm_client is successfully deployed.

Parameters:

llm_client (LLMClient) – The llm_client instance.

Example:

llm_client_deployed.send(sender=self.__class__, llm_client=self)
smarter.apps.llm_client.signals.llm_client_dns_failed = <django.dispatch.dispatcher.Signal object>

Signal triggered when DNS verification fails for an llm_client.

Parameters:

llm_client (LLMClient) – The llm_client instance.

Example:

llm_client_dns_failed.send(sender=self.__class__, llm_client=self)
smarter.apps.llm_client.signals.llm_client_dns_verification_initiated = <django.dispatch.dispatcher.Signal object>

Signal triggered when DNS verification is initiated for an llm_client.

Parameters:

llm_client (LLMClient) – The llm_client instance.

Example:

llm_client_dns_verification_initiated.send(sender=self.__class__, llm_client=self)
smarter.apps.llm_client.signals.llm_client_dns_verification_status_changed = <django.dispatch.dispatcher.Signal object>

Signal triggered when the DNS verification status changes for an llm_client.

Parameters:

llm_client (LLMClient) – The llm_client instance.

Example:

llm_client_dns_verification_status_changed.send(sender=self.__class__, llm_client=self)
smarter.apps.llm_client.signals.llm_client_dns_verified = <django.dispatch.dispatcher.Signal object>

Signal triggered when DNS verification is successful for an llm_client.

Parameters:

llm_client (LLMClient) – The llm_client instance.

Example:

llm_client_dns_verified.send(sender=self.__class__, llm_client=self)
smarter.apps.llm_client.signals.post_create_custom_domain_dns_record = <django.dispatch.dispatcher.Signal object>

Signal triggered after creating a DNS record for a custom domain.

Parameters:
  • llm_client_custom_domain_id (int) – The ID of the llm_client custom domain.

  • record_name (str) – The name of the DNS record.

  • record_type (str) – The type of the DNS record (e.g., A, CNAME).

  • record_value (str) – The value of the DNS record.

  • record_ttl (int) – The TTL (time to live) for the DNS record.

Example:

post_create_custom_domain_dns_record.send(
    sender=create_custom_domain_dns_record,
    llm_client_custom_domain_id=llm_client_custom_domain_id,
    record_name=record_name,
    record_type=record_type,
    record_value=record_value,
    record_ttl=record_ttl,
)
smarter.apps.llm_client.signals.post_create_llm_client_request = <django.dispatch.dispatcher.Signal object>

Signal triggered after creating an llm_client request.

Parameters:
  • llm_client_id (int) – The ID of the llm_client.

  • request_data (dict) – The data for the llm_client request.

Example:

post_create_llm_client_request.send(sender=create_llm_client_request, llm_client_id=llm_client_id, request_data=request_data)
smarter.apps.llm_client.signals.post_delete_default_api = <django.dispatch.dispatcher.Signal object>

Signal triggered after deleting the default API.

Parameters:
  • url (str) – The URL of the deleted default API.

  • account_number (str) – The account number associated with the default API.

  • name (str) – The name of the default API.

Example:

post_delete_default_api.send(sender=delete_default_api, url=url, account_number=account_number, name=name)
smarter.apps.llm_client.signals.post_deploy_custom_api = <django.dispatch.dispatcher.Signal object>

Signal triggered after deploying a custom API.

Parameters:

llm_client_id (int) – The ID of the llm_client.

Example:

post_deploy_custom_api.send(sender=deploy_custom_api, llm_client_id=llm_client_id)
smarter.apps.llm_client.signals.post_deploy_default_api = <django.dispatch.dispatcher.Signal object>

Signal triggered after deploying the default API.

Parameters:
  • llm_client_id (int) – The ID of the llm_client.

  • with_domain_verification (bool) – Flag indicating whether domain verification was included.

Example:

post_deploy_default_api.send(
    sender=deploy_default_api, llm_client_id=llm_client_id, with_domain_verification=with_domain_verification
)
smarter.apps.llm_client.signals.post_destroy_domain_A_record = <django.dispatch.dispatcher.Signal object>

Signal triggered after destroying a domain’s A record.

Parameters:
  • hostname (str) – The hostname of the domain.

  • api_host_domain (str) – The API host domain associated with the A record.

Example:

post_destroy_domain_A_record.send(
    sender=destroy_domain_A_record, hostname=hostname, api_host_domain=api_host_domain
)
smarter.apps.llm_client.signals.post_register_custom_domain = <django.dispatch.dispatcher.Signal object>

Signal triggered after registering a custom domain.

Parameters:
  • account_id (int) – The ID of the account.

  • domain_name (str) – The name of the registered domain.

Example:

post_register_custom_domain.send(sender=register_custom_domain, account_id=account_id, domain_name=domain_name)
smarter.apps.llm_client.signals.post_undeploy_default_api = <django.dispatch.dispatcher.Signal object>

Signal triggered after undeploying the default API.

Parameters:

llm_client_id (int) – The ID of the llm_client.

Example:

post_undeploy_default_api.send(sender=undeploy_default_api, llm_client_id=llm_client_id)
smarter.apps.llm_client.signals.post_verify_certificate = <django.dispatch.dispatcher.Signal object>

Signal triggered after verifying a certificate.

Parameters:

certificate_arn (str) – The ARN of the verified certificate.

Example:

post_verify_certificate.send(sender=verify_certificate, certificate_arn=certificate_arn)
smarter.apps.llm_client.signals.post_verify_custom_domain = <django.dispatch.dispatcher.Signal object>

Signal triggered after verifying a custom domain.

Parameters:

hosted_zone_id (str) – The ID of the hosted zone for the custom domain.

Example:

post_verify_custom_domain.send(sender=verify_custom_domain, hosted_zone_id=hosted_zone_id)
smarter.apps.llm_client.signals.post_verify_domain = <django.dispatch.dispatcher.Signal object>

Signal triggered after verifying a domain.

Parameters:
  • domain_name (str) – The name of the domain to be verified.

  • record_type (str) – The type of DNS record used for verification.

Example:

post_verify_domain.send(sender=verify_domain, domain_name=domain_name, record_type=record_type)
smarter.apps.llm_client.signals.pre_create_custom_domain_dns_record = <django.dispatch.dispatcher.Signal object>

Signal triggered before creating a DNS record for a custom domain.

Parameters:
  • llm_client_custom_domain_id (int) – The ID of the llm_client custom domain.

  • record_name (str) – The name of the DNS record.

  • record_type (str) – The type of the DNS record (e.g., A, CNAME).

  • record_value (str) – The value of the DNS record.

  • record_ttl (int) – The TTL (time to live) for the DNS record.

Example:

pre_create_custom_domain_dns_record.send(
    sender=create_custom_domain_dns_record,
    llm_client_custom_domain_id=llm_client_custom_domain_id,
    record_name=record_name,
    record_type=record_type,
    record_value=record_value,
    record_ttl=record_ttl,
)
smarter.apps.llm_client.signals.pre_create_llm_client_request = <django.dispatch.dispatcher.Signal object>

Signal triggered before creating an llm_client request.

Parameters:
  • llm_client_id (int) – The ID of the llm_client.

  • request_data (dict) – The data for the llm_client request.

Example:

pre_create_llm_client_request.send(sender=create_llm_client_request, llm_client_id=llm_client_id, request_data=request_data)
smarter.apps.llm_client.signals.pre_delete_default_api = <django.dispatch.dispatcher.Signal object>

Signal triggered before deleting the default API.

Parameters:
  • url (str) – The URL of the default API to be deleted.

  • account_number (str) – The account number associated with the default API.

  • name (str) – The name of the default API.

Example:

pre_delete_default_api.send(sender=delete_default_api, url=url, account_number=account_number, name=name)
smarter.apps.llm_client.signals.pre_deploy_custom_api = <django.dispatch.dispatcher.Signal object>

Signal triggered before deploying a custom API.

Parameters:

llm_client_id (int) – The ID of the llm_client.

Example:

pre_deploy_custom_api.send(sender=deploy_custom_api, llm_client_id=llm_client_id)
smarter.apps.llm_client.signals.pre_deploy_default_api = <django.dispatch.dispatcher.Signal object>

Signal triggered before deploying the default API.

Parameters:
  • llm_client_id (int) – The ID of the llm_client.

  • with_domain_verification (bool) – Flag indicating whether to include domain verification.

Example:

pre_deploy_default_api.send(
    sender=deploy_default_api, llm_client_id=llm_client_id, with_domain_verification=with_domain_verification
)
smarter.apps.llm_client.signals.pre_destroy_domain_A_record = <django.dispatch.dispatcher.Signal object>

Signal triggered before destroying a domain’s A record.

Parameters:
  • hostname (str) – The hostname of the domain.

  • api_host_domain (str) – The API host domain associated with the A record.

Example:

pre_destroy_domain_A_record.send(sender=destroy_domain_A_record, hostname=hostname, api_host_domain=api_host_domain)
smarter.apps.llm_client.signals.pre_register_custom_domain = <django.dispatch.dispatcher.Signal object>

Signal triggered before registering a custom domain.

Parameters:
  • account_id (int) – The ID of the account.

  • domain_name (str) – The name of the domain to be registered.

Example:

pre_register_custom_domain.send(sender=register_custom_domain, account_id=account_id, domain_name=domain_name)
smarter.apps.llm_client.signals.pre_undeploy_default_api = <django.dispatch.dispatcher.Signal object>

Signal triggered before undeploying the default API.

Parameters:

llm_client_id (int) – The ID of the llm_client.

Example:

pre_undeploy_default_api.send(sender=undeploy_default_api, llm_client_id=llm_client_id)
smarter.apps.llm_client.signals.pre_verify_certificate = <django.dispatch.dispatcher.Signal object>

Signal triggered before verifying a certificate.

Parameters:

certificate_arn (str) – The ARN of the certificate to be verified.

Example:

pre_verify_certificate.send(sender=verify_certificate, certificate_arn=certificate_arn)
smarter.apps.llm_client.signals.pre_verify_custom_domain = <django.dispatch.dispatcher.Signal object>

Signal triggered before verifying a custom domain.

Parameters:

hosted_zone_id (str) – The ID of the hosted zone for the custom domain.

Example:

pre_verify_custom_domain.send(sender=verify_custom_domain, hosted_zone_id=hosted_zone_id)
smarter.apps.llm_client.signals.pre_verify_domain = <django.dispatch.dispatcher.Signal object>

Signal triggered before verifying a domain.

Parameters:
  • domain_name (str) – The name of the domain to be verified.

  • record_type (str) – The type of DNS record used for verification.

Example:

pre_verify_domain.send(sender=verify_domain, domain_name=domain_name, record_type=record_type)