alibabacloud-agentrun20250910 4.0.2__py3-none-any.whl → 4.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- __version__ = '4.0.2'
1
+ __version__ = '4.0.3'
@@ -3572,6 +3572,81 @@ class ProxyConfigEndpoints(TeaModel):
3572
3572
  return self
3573
3573
 
3574
3574
 
3575
+ class ProxyConfigPoliciesAiGuardrailConfig(TeaModel):
3576
+ def __init__(
3577
+ self,
3578
+ block_on_content_moderation: bool = None,
3579
+ block_on_malicious_url: bool = None,
3580
+ block_on_model_hallucination: bool = None,
3581
+ block_on_prompt_attack: bool = None,
3582
+ block_on_sensitive_data: bool = None,
3583
+ check_request: bool = None,
3584
+ check_response: bool = None,
3585
+ level: str = None,
3586
+ max_text_length: int = None,
3587
+ ):
3588
+ self.block_on_content_moderation = block_on_content_moderation
3589
+ self.block_on_malicious_url = block_on_malicious_url
3590
+ self.block_on_model_hallucination = block_on_model_hallucination
3591
+ self.block_on_prompt_attack = block_on_prompt_attack
3592
+ self.block_on_sensitive_data = block_on_sensitive_data
3593
+ self.check_request = check_request
3594
+ self.check_response = check_response
3595
+ self.level = level
3596
+ self.max_text_length = max_text_length
3597
+
3598
+ def validate(self):
3599
+ pass
3600
+
3601
+ def to_map(self):
3602
+ _map = super().to_map()
3603
+ if _map is not None:
3604
+ return _map
3605
+
3606
+ result = dict()
3607
+ if self.block_on_content_moderation is not None:
3608
+ result['blockOnContentModeration'] = self.block_on_content_moderation
3609
+ if self.block_on_malicious_url is not None:
3610
+ result['blockOnMaliciousUrl'] = self.block_on_malicious_url
3611
+ if self.block_on_model_hallucination is not None:
3612
+ result['blockOnModelHallucination'] = self.block_on_model_hallucination
3613
+ if self.block_on_prompt_attack is not None:
3614
+ result['blockOnPromptAttack'] = self.block_on_prompt_attack
3615
+ if self.block_on_sensitive_data is not None:
3616
+ result['blockOnSensitiveData'] = self.block_on_sensitive_data
3617
+ if self.check_request is not None:
3618
+ result['checkRequest'] = self.check_request
3619
+ if self.check_response is not None:
3620
+ result['checkResponse'] = self.check_response
3621
+ if self.level is not None:
3622
+ result['level'] = self.level
3623
+ if self.max_text_length is not None:
3624
+ result['maxTextLength'] = self.max_text_length
3625
+ return result
3626
+
3627
+ def from_map(self, m: dict = None):
3628
+ m = m or dict()
3629
+ if m.get('blockOnContentModeration') is not None:
3630
+ self.block_on_content_moderation = m.get('blockOnContentModeration')
3631
+ if m.get('blockOnMaliciousUrl') is not None:
3632
+ self.block_on_malicious_url = m.get('blockOnMaliciousUrl')
3633
+ if m.get('blockOnModelHallucination') is not None:
3634
+ self.block_on_model_hallucination = m.get('blockOnModelHallucination')
3635
+ if m.get('blockOnPromptAttack') is not None:
3636
+ self.block_on_prompt_attack = m.get('blockOnPromptAttack')
3637
+ if m.get('blockOnSensitiveData') is not None:
3638
+ self.block_on_sensitive_data = m.get('blockOnSensitiveData')
3639
+ if m.get('checkRequest') is not None:
3640
+ self.check_request = m.get('checkRequest')
3641
+ if m.get('checkResponse') is not None:
3642
+ self.check_response = m.get('checkResponse')
3643
+ if m.get('level') is not None:
3644
+ self.level = m.get('level')
3645
+ if m.get('maxTextLength') is not None:
3646
+ self.max_text_length = m.get('maxTextLength')
3647
+ return self
3648
+
3649
+
3575
3650
  class ProxyConfigPoliciesFallbacks(TeaModel):
3576
3651
  def __init__(
3577
3652
  self,
@@ -3605,26 +3680,79 @@ class ProxyConfigPoliciesFallbacks(TeaModel):
3605
3680
  return self
3606
3681
 
3607
3682
 
3683
+ class ProxyConfigPoliciesTokenRateLimiter(TeaModel):
3684
+ def __init__(
3685
+ self,
3686
+ tpd: int = None,
3687
+ tph: int = None,
3688
+ tpm: int = None,
3689
+ tps: int = None,
3690
+ ):
3691
+ self.tpd = tpd
3692
+ self.tph = tph
3693
+ self.tpm = tpm
3694
+ self.tps = tps
3695
+
3696
+ def validate(self):
3697
+ pass
3698
+
3699
+ def to_map(self):
3700
+ _map = super().to_map()
3701
+ if _map is not None:
3702
+ return _map
3703
+
3704
+ result = dict()
3705
+ if self.tpd is not None:
3706
+ result['tpd'] = self.tpd
3707
+ if self.tph is not None:
3708
+ result['tph'] = self.tph
3709
+ if self.tpm is not None:
3710
+ result['tpm'] = self.tpm
3711
+ if self.tps is not None:
3712
+ result['tps'] = self.tps
3713
+ return result
3714
+
3715
+ def from_map(self, m: dict = None):
3716
+ m = m or dict()
3717
+ if m.get('tpd') is not None:
3718
+ self.tpd = m.get('tpd')
3719
+ if m.get('tph') is not None:
3720
+ self.tph = m.get('tph')
3721
+ if m.get('tpm') is not None:
3722
+ self.tpm = m.get('tpm')
3723
+ if m.get('tps') is not None:
3724
+ self.tps = m.get('tps')
3725
+ return self
3726
+
3727
+
3608
3728
  class ProxyConfigPolicies(TeaModel):
3609
3729
  def __init__(
3610
3730
  self,
3731
+ ai_guardrail_config: ProxyConfigPoliciesAiGuardrailConfig = None,
3611
3732
  cache: bool = None,
3612
3733
  concurrency_limit: int = None,
3613
3734
  fallbacks: List[ProxyConfigPoliciesFallbacks] = None,
3614
3735
  num_retries: int = None,
3615
3736
  request_timeout: int = None,
3737
+ token_rate_limiter: ProxyConfigPoliciesTokenRateLimiter = None,
3616
3738
  ):
3739
+ self.ai_guardrail_config = ai_guardrail_config
3617
3740
  self.cache = cache
3618
3741
  self.concurrency_limit = concurrency_limit
3619
3742
  self.fallbacks = fallbacks
3620
3743
  self.num_retries = num_retries
3621
3744
  self.request_timeout = request_timeout
3745
+ self.token_rate_limiter = token_rate_limiter
3622
3746
 
3623
3747
  def validate(self):
3748
+ if self.ai_guardrail_config:
3749
+ self.ai_guardrail_config.validate()
3624
3750
  if self.fallbacks:
3625
3751
  for k in self.fallbacks:
3626
3752
  if k:
3627
3753
  k.validate()
3754
+ if self.token_rate_limiter:
3755
+ self.token_rate_limiter.validate()
3628
3756
 
3629
3757
  def to_map(self):
3630
3758
  _map = super().to_map()
@@ -3632,6 +3760,8 @@ class ProxyConfigPolicies(TeaModel):
3632
3760
  return _map
3633
3761
 
3634
3762
  result = dict()
3763
+ if self.ai_guardrail_config is not None:
3764
+ result['aiGuardrailConfig'] = self.ai_guardrail_config.to_map()
3635
3765
  if self.cache is not None:
3636
3766
  result['cache'] = self.cache
3637
3767
  if self.concurrency_limit is not None:
@@ -3644,10 +3774,15 @@ class ProxyConfigPolicies(TeaModel):
3644
3774
  result['numRetries'] = self.num_retries
3645
3775
  if self.request_timeout is not None:
3646
3776
  result['requestTimeout'] = self.request_timeout
3777
+ if self.token_rate_limiter is not None:
3778
+ result['tokenRateLimiter'] = self.token_rate_limiter.to_map()
3647
3779
  return result
3648
3780
 
3649
3781
  def from_map(self, m: dict = None):
3650
3782
  m = m or dict()
3783
+ if m.get('aiGuardrailConfig') is not None:
3784
+ temp_model = ProxyConfigPoliciesAiGuardrailConfig()
3785
+ self.ai_guardrail_config = temp_model.from_map(m['aiGuardrailConfig'])
3651
3786
  if m.get('cache') is not None:
3652
3787
  self.cache = m.get('cache')
3653
3788
  if m.get('concurrencyLimit') is not None:
@@ -3661,6 +3796,9 @@ class ProxyConfigPolicies(TeaModel):
3661
3796
  self.num_retries = m.get('numRetries')
3662
3797
  if m.get('requestTimeout') is not None:
3663
3798
  self.request_timeout = m.get('requestTimeout')
3799
+ if m.get('tokenRateLimiter') is not None:
3800
+ temp_model = ProxyConfigPoliciesTokenRateLimiter()
3801
+ self.token_rate_limiter = temp_model.from_map(m['tokenRateLimiter'])
3664
3802
  return self
3665
3803
 
3666
3804
 
@@ -3715,6 +3853,7 @@ class CreateModelProxyInput(TeaModel):
3715
3853
  cpu: float = None,
3716
3854
  credential_name: str = None,
3717
3855
  description: str = None,
3856
+ execution_role_arn: str = None,
3718
3857
  litellm_version: str = None,
3719
3858
  log_configuration: LogConfiguration = None,
3720
3859
  memory: int = None,
@@ -3730,6 +3869,7 @@ class CreateModelProxyInput(TeaModel):
3730
3869
  self.cpu = cpu
3731
3870
  self.credential_name = credential_name
3732
3871
  self.description = description
3872
+ self.execution_role_arn = execution_role_arn
3733
3873
  self.litellm_version = litellm_version
3734
3874
  self.log_configuration = log_configuration
3735
3875
  # This parameter is required.
@@ -3768,6 +3908,8 @@ class CreateModelProxyInput(TeaModel):
3768
3908
  result['credentialName'] = self.credential_name
3769
3909
  if self.description is not None:
3770
3910
  result['description'] = self.description
3911
+ if self.execution_role_arn is not None:
3912
+ result['executionRoleArn'] = self.execution_role_arn
3771
3913
  if self.litellm_version is not None:
3772
3914
  result['litellmVersion'] = self.litellm_version
3773
3915
  if self.log_configuration is not None:
@@ -3799,6 +3941,8 @@ class CreateModelProxyInput(TeaModel):
3799
3941
  self.credential_name = m.get('credentialName')
3800
3942
  if m.get('description') is not None:
3801
3943
  self.description = m.get('description')
3944
+ if m.get('executionRoleArn') is not None:
3945
+ self.execution_role_arn = m.get('executionRoleArn')
3802
3946
  if m.get('litellmVersion') is not None:
3803
3947
  self.litellm_version = m.get('litellmVersion')
3804
3948
  if m.get('logConfiguration') is not None:
@@ -5002,6 +5146,7 @@ class ModelProxy(TeaModel):
5002
5146
  credential_name: str = None,
5003
5147
  description: str = None,
5004
5148
  endpoint: str = None,
5149
+ execution_role_arn: str = None,
5005
5150
  function_name: str = None,
5006
5151
  last_updated_at: str = None,
5007
5152
  litellm_version: str = None,
@@ -5022,6 +5167,7 @@ class ModelProxy(TeaModel):
5022
5167
  self.credential_name = credential_name
5023
5168
  self.description = description
5024
5169
  self.endpoint = endpoint
5170
+ self.execution_role_arn = execution_role_arn
5025
5171
  self.function_name = function_name
5026
5172
  self.last_updated_at = last_updated_at
5027
5173
  self.litellm_version = litellm_version
@@ -5061,6 +5207,8 @@ class ModelProxy(TeaModel):
5061
5207
  result['description'] = self.description
5062
5208
  if self.endpoint is not None:
5063
5209
  result['endpoint'] = self.endpoint
5210
+ if self.execution_role_arn is not None:
5211
+ result['executionRoleArn'] = self.execution_role_arn
5064
5212
  if self.function_name is not None:
5065
5213
  result['functionName'] = self.function_name
5066
5214
  if self.last_updated_at is not None:
@@ -5103,6 +5251,8 @@ class ModelProxy(TeaModel):
5103
5251
  self.description = m.get('description')
5104
5252
  if m.get('endpoint') is not None:
5105
5253
  self.endpoint = m.get('endpoint')
5254
+ if m.get('executionRoleArn') is not None:
5255
+ self.execution_role_arn = m.get('executionRoleArn')
5106
5256
  if m.get('functionName') is not None:
5107
5257
  self.function_name = m.get('functionName')
5108
5258
  if m.get('lastUpdatedAt') is not None:
@@ -9583,6 +9733,7 @@ class UpdateModelProxyInput(TeaModel):
9583
9733
  arms_configuration: ArmsConfiguration = None,
9584
9734
  credential_name: str = None,
9585
9735
  description: str = None,
9736
+ execution_role_arn: str = None,
9586
9737
  log_configuration: LogConfiguration = None,
9587
9738
  network_configuration: NetworkConfiguration = None,
9588
9739
  proxy_config: ProxyConfig = None,
@@ -9590,6 +9741,7 @@ class UpdateModelProxyInput(TeaModel):
9590
9741
  self.arms_configuration = arms_configuration
9591
9742
  self.credential_name = credential_name
9592
9743
  self.description = description
9744
+ self.execution_role_arn = execution_role_arn
9593
9745
  self.log_configuration = log_configuration
9594
9746
  self.network_configuration = network_configuration
9595
9747
  self.proxy_config = proxy_config
@@ -9616,6 +9768,8 @@ class UpdateModelProxyInput(TeaModel):
9616
9768
  result['credentialName'] = self.credential_name
9617
9769
  if self.description is not None:
9618
9770
  result['description'] = self.description
9771
+ if self.execution_role_arn is not None:
9772
+ result['executionRoleArn'] = self.execution_role_arn
9619
9773
  if self.log_configuration is not None:
9620
9774
  result['logConfiguration'] = self.log_configuration.to_map()
9621
9775
  if self.network_configuration is not None:
@@ -9633,6 +9787,8 @@ class UpdateModelProxyInput(TeaModel):
9633
9787
  self.credential_name = m.get('credentialName')
9634
9788
  if m.get('description') is not None:
9635
9789
  self.description = m.get('description')
9790
+ if m.get('executionRoleArn') is not None:
9791
+ self.execution_role_arn = m.get('executionRoleArn')
9636
9792
  if m.get('logConfiguration') is not None:
9637
9793
  temp_model = LogConfiguration()
9638
9794
  self.log_configuration = temp_model.from_map(m['logConfiguration'])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: alibabacloud-agentrun20250910
3
- Version: 4.0.2
3
+ Version: 4.0.3
4
4
  Summary: Alibaba Cloud AgentRun (20250910) SDK Library for Python
5
5
  Home-page: https://github.com/aliyun/alibabacloud-python-sdk
6
6
  Author: Alibaba Cloud SDK
@@ -0,0 +1,8 @@
1
+ alibabacloud_agentrun20250910/__init__.py,sha256=WVDh-CWReADU6VLpUNeW8EQnxCJUNqQrdVIoGVLRXxQ,21
2
+ alibabacloud_agentrun20250910/client.py,sha256=Vv1grhdcqdrjMqB9TgpVgXf2rnqn2CYORo7wUp4Hb6c,241199
3
+ alibabacloud_agentrun20250910/models.py,sha256=pZqRS493GsXOA-y34-Efoerd8qA_dCrhbI8mk0TaY9Q,498854
4
+ alibabacloud_agentrun20250910-4.0.3.dist-info/LICENSE,sha256=0CFItL6bHvxqS44T6vlLoW2R4Zaic304OO3WxN0oXF0,600
5
+ alibabacloud_agentrun20250910-4.0.3.dist-info/METADATA,sha256=SMFyrhbGD2E1_zmzDybck9Xma7Oo5Ssz5kzm_gEZtRM,2347
6
+ alibabacloud_agentrun20250910-4.0.3.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
7
+ alibabacloud_agentrun20250910-4.0.3.dist-info/top_level.txt,sha256=52ubthzYJLT_H920wO8t0i9HV90alDqttDu0fv3l1aM,30
8
+ alibabacloud_agentrun20250910-4.0.3.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- alibabacloud_agentrun20250910/__init__.py,sha256=X2FSVyXfKfCh487cbRC3bWEH0TAFIoyQIus2dzhKa3U,21
2
- alibabacloud_agentrun20250910/client.py,sha256=Vv1grhdcqdrjMqB9TgpVgXf2rnqn2CYORo7wUp4Hb6c,241199
3
- alibabacloud_agentrun20250910/models.py,sha256=3Pr_A8SFWWYqkYnD5UCFeSsKMMvrQe1GxbHGA_GwQJ0,492377
4
- alibabacloud_agentrun20250910-4.0.2.dist-info/LICENSE,sha256=0CFItL6bHvxqS44T6vlLoW2R4Zaic304OO3WxN0oXF0,600
5
- alibabacloud_agentrun20250910-4.0.2.dist-info/METADATA,sha256=s8OVqayKqNEMcYAOgnF5O3i8WPlXeqOlV3tCzwsbms0,2347
6
- alibabacloud_agentrun20250910-4.0.2.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
7
- alibabacloud_agentrun20250910-4.0.2.dist-info/top_level.txt,sha256=52ubthzYJLT_H920wO8t0i9HV90alDqttDu0fv3l1aM,30
8
- alibabacloud_agentrun20250910-4.0.2.dist-info/RECORD,,