@@ -29,11 +29,13 @@ class ChatllmTask(AbstractApiClass):
2929 executionMode (str): The execution mode of the chatllm task.
3030 taskDefinition (dict): The task definition (for web_service_trigger tasks).
3131 webAppHostname (str): The hostname of the web app associated with the daemon task.
32+ triggerType (str): The trigger type of the daemon task (scheduled or event_based).
33+ webhookUrl (str): The webhook URL for event-based daemon tasks.
3234 hostedDatabase (HostedDatabase): The hosted database for the daemon task.
3335 latestDaemonTaskInstance (DaemonTaskInstance): The latest task instance for daemon tasks.
3436 """
3537
36- def __init__ (self , client , chatllmTaskId = None , daemonTaskId = None , taskType = None , name = None , instructions = None , description = None , lifecycle = None , scheduleInfo = None , externalApplicationId = None , deploymentConversationId = None , sourceDeploymentConversationId = None , enableEmailAlerts = None , email = None , numUnreadTaskInstances = None , computePointsUsed = None , displayMarkdown = None , requiresNewConversation = None , executionMode = None , taskDefinition = None , webAppHostname = None , hostedDatabase = {}, latestDaemonTaskInstance = {}):
38+ def __init__ (self , client , chatllmTaskId = None , daemonTaskId = None , taskType = None , name = None , instructions = None , description = None , lifecycle = None , scheduleInfo = None , externalApplicationId = None , deploymentConversationId = None , sourceDeploymentConversationId = None , enableEmailAlerts = None , email = None , numUnreadTaskInstances = None , computePointsUsed = None , displayMarkdown = None , requiresNewConversation = None , executionMode = None , taskDefinition = None , webAppHostname = None , triggerType = None , webhookUrl = None , hostedDatabase = {}, latestDaemonTaskInstance = {}):
3739 super ().__init__ (client , chatllmTaskId )
3840 self .chatllm_task_id = chatllmTaskId
3941 self .daemon_task_id = daemonTaskId
@@ -55,15 +57,17 @@ def __init__(self, client, chatllmTaskId=None, daemonTaskId=None, taskType=None,
5557 self .execution_mode = executionMode
5658 self .task_definition = taskDefinition
5759 self .web_app_hostname = webAppHostname
60+ self .trigger_type = triggerType
61+ self .webhook_url = webhookUrl
5862 self .hosted_database = client ._build_class (
5963 HostedDatabase , hostedDatabase )
6064 self .latest_daemon_task_instance = client ._build_class (
6165 DaemonTaskInstance , latestDaemonTaskInstance )
6266 self .deprecated_keys = {}
6367
6468 def __repr__ (self ):
65- repr_dict = {f'chatllm_task_id' : repr (self .chatllm_task_id ), f'daemon_task_id' : repr (self .daemon_task_id ), f'task_type' : repr (self .task_type ), f'name' : repr (self .name ), f'instructions' : repr (self .instructions ), f'description' : repr (self .description ), f'lifecycle' : repr (self .lifecycle ), f'schedule_info' : repr (self .schedule_info ), f'external_application_id' : repr (self .external_application_id ), f'deployment_conversation_id' : repr (self .deployment_conversation_id ), f'source_deployment_conversation_id' : repr (self .source_deployment_conversation_id ), f'enable_email_alerts' : repr (
66- self .enable_email_alerts ), f' email' : repr ( self . email ), f'num_unread_task_instances' : repr (self .num_unread_task_instances ), f'compute_points_used' : repr (self .compute_points_used ), f'display_markdown' : repr (self .display_markdown ), f'requires_new_conversation' : repr (self .requires_new_conversation ), f'execution_mode' : repr (self .execution_mode ), f'task_definition' : repr (self .task_definition ), f'web_app_hostname' : repr (self .web_app_hostname ), f'hosted_database' : repr (self .hosted_database ), f'latest_daemon_task_instance' : repr (self .latest_daemon_task_instance )}
69+ repr_dict = {f'chatllm_task_id' : repr (self .chatllm_task_id ), f'daemon_task_id' : repr (self .daemon_task_id ), f'task_type' : repr (self .task_type ), f'name' : repr (self .name ), f'instructions' : repr (self .instructions ), f'description' : repr (self .description ), f'lifecycle' : repr (self .lifecycle ), f'schedule_info' : repr (self .schedule_info ), f'external_application_id' : repr (self .external_application_id ), f'deployment_conversation_id' : repr (self .deployment_conversation_id ), f'source_deployment_conversation_id' : repr (self .source_deployment_conversation_id ), f'enable_email_alerts' : repr (self . enable_email_alerts ), f'email' : repr (
70+ self .email ), f'num_unread_task_instances' : repr (self .num_unread_task_instances ), f'compute_points_used' : repr (self .compute_points_used ), f'display_markdown' : repr (self .display_markdown ), f'requires_new_conversation' : repr (self .requires_new_conversation ), f'execution_mode' : repr (self .execution_mode ), f'task_definition' : repr (self .task_definition ), f'web_app_hostname' : repr (self .web_app_hostname ), f'trigger_type' : repr ( self . trigger_type ), f'webhook_url' : repr ( self . webhook_url ), f'hosted_database' : repr (self .hosted_database ), f'latest_daemon_task_instance' : repr (self .latest_daemon_task_instance )}
6771 class_name = "ChatllmTask"
6872 repr_str = ',\n ' .join ([f'{ key } ={ value } ' for key , value in repr_dict .items (
6973 ) if getattr (self , key , None ) is not None and key not in self .deprecated_keys ])
@@ -76,6 +80,6 @@ def to_dict(self):
7680 Returns:
7781 dict: The dict value representation of the class parameters
7882 """
79- resp = {'chatllm_task_id' : self .chatllm_task_id , 'daemon_task_id' : self .daemon_task_id , 'task_type' : self .task_type , 'name' : self .name , 'instructions' : self .instructions , 'description' : self .description , 'lifecycle' : self .lifecycle , 'schedule_info' : self .schedule_info , 'external_application_id' : self .external_application_id , 'deployment_conversation_id' : self .deployment_conversation_id , 'source_deployment_conversation_id' : self .source_deployment_conversation_id , 'enable_email_alerts' : self .enable_email_alerts ,
80- 'email' : self . email , ' num_unread_task_instances' : self .num_unread_task_instances , 'compute_points_used' : self .compute_points_used , 'display_markdown' : self .display_markdown , 'requires_new_conversation' : self .requires_new_conversation , 'execution_mode' : self .execution_mode , 'task_definition' : self .task_definition , 'web_app_hostname' : self .web_app_hostname , 'hosted_database' : self ._get_attribute_as_dict (self .hosted_database ), 'latest_daemon_task_instance' : self ._get_attribute_as_dict (self .latest_daemon_task_instance )}
83+ resp = {'chatllm_task_id' : self .chatllm_task_id , 'daemon_task_id' : self .daemon_task_id , 'task_type' : self .task_type , 'name' : self .name , 'instructions' : self .instructions , 'description' : self .description , 'lifecycle' : self .lifecycle , 'schedule_info' : self .schedule_info , 'external_application_id' : self .external_application_id , 'deployment_conversation_id' : self .deployment_conversation_id , 'source_deployment_conversation_id' : self .source_deployment_conversation_id , 'enable_email_alerts' : self .enable_email_alerts , 'email' : self . email ,
84+ 'num_unread_task_instances' : self .num_unread_task_instances , 'compute_points_used' : self .compute_points_used , 'display_markdown' : self .display_markdown , 'requires_new_conversation' : self .requires_new_conversation , 'execution_mode' : self .execution_mode , 'task_definition' : self .task_definition , 'web_app_hostname' : self .web_app_hostname , 'trigger_type' : self . trigger_type , 'webhook_url' : self . webhook_url , 'hosted_database' : self ._get_attribute_as_dict (self .hosted_database ), 'latest_daemon_task_instance' : self ._get_attribute_as_dict (self .latest_daemon_task_instance )}
8185 return {key : value for key , value in resp .items () if value is not None and key not in self .deprecated_keys }
0 commit comments