alibabacloud-agentrun20250910 4.0.2__py3-none-any.whl → 4.0.4__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.4'
@@ -295,6 +295,7 @@ class AgentRuntime(TeaModel):
295
295
  container_configuration: ContainerConfiguration = None,
296
296
  cpu: float = None,
297
297
  created_at: str = None,
298
+ credential_name: str = None,
298
299
  description: str = None,
299
300
  environment_variables: Dict[str, str] = None,
300
301
  execution_role_arn: str = None,
@@ -328,6 +329,8 @@ class AgentRuntime(TeaModel):
328
329
  self.cpu = cpu
329
330
  # 智能体运行时的创建时间,采用ISO 8601格式
330
331
  self.created_at = created_at
332
+ # 用于访问智能体的凭证名称,访问智能体运行时将使用此凭证进行身份验证
333
+ self.credential_name = credential_name
331
334
  # 智能体运行时的描述信息,说明该运行时的用途和功能
332
335
  self.description = description
333
336
  # 智能体运行时的环境变量配置
@@ -395,6 +398,8 @@ class AgentRuntime(TeaModel):
395
398
  result['cpu'] = self.cpu
396
399
  if self.created_at is not None:
397
400
  result['createdAt'] = self.created_at
401
+ if self.credential_name is not None:
402
+ result['credentialName'] = self.credential_name
398
403
  if self.description is not None:
399
404
  result['description'] = self.description
400
405
  if self.environment_variables is not None:
@@ -447,6 +452,8 @@ class AgentRuntime(TeaModel):
447
452
  self.cpu = m.get('cpu')
448
453
  if m.get('createdAt') is not None:
449
454
  self.created_at = m.get('createdAt')
455
+ if m.get('credentialName') is not None:
456
+ self.credential_name = m.get('credentialName')
450
457
  if m.get('description') is not None:
451
458
  self.description = m.get('description')
452
459
  if m.get('environmentVariables') is not None:
@@ -3572,6 +3579,81 @@ class ProxyConfigEndpoints(TeaModel):
3572
3579
  return self
3573
3580
 
3574
3581
 
3582
+ class ProxyConfigPoliciesAiGuardrailConfig(TeaModel):
3583
+ def __init__(
3584
+ self,
3585
+ block_on_content_moderation: bool = None,
3586
+ block_on_malicious_url: bool = None,
3587
+ block_on_model_hallucination: bool = None,
3588
+ block_on_prompt_attack: bool = None,
3589
+ block_on_sensitive_data: bool = None,
3590
+ check_request: bool = None,
3591
+ check_response: bool = None,
3592
+ level: str = None,
3593
+ max_text_length: int = None,
3594
+ ):
3595
+ self.block_on_content_moderation = block_on_content_moderation
3596
+ self.block_on_malicious_url = block_on_malicious_url
3597
+ self.block_on_model_hallucination = block_on_model_hallucination
3598
+ self.block_on_prompt_attack = block_on_prompt_attack
3599
+ self.block_on_sensitive_data = block_on_sensitive_data
3600
+ self.check_request = check_request
3601
+ self.check_response = check_response
3602
+ self.level = level
3603
+ self.max_text_length = max_text_length
3604
+
3605
+ def validate(self):
3606
+ pass
3607
+
3608
+ def to_map(self):
3609
+ _map = super().to_map()
3610
+ if _map is not None:
3611
+ return _map
3612
+
3613
+ result = dict()
3614
+ if self.block_on_content_moderation is not None:
3615
+ result['blockOnContentModeration'] = self.block_on_content_moderation
3616
+ if self.block_on_malicious_url is not None:
3617
+ result['blockOnMaliciousUrl'] = self.block_on_malicious_url
3618
+ if self.block_on_model_hallucination is not None:
3619
+ result['blockOnModelHallucination'] = self.block_on_model_hallucination
3620
+ if self.block_on_prompt_attack is not None:
3621
+ result['blockOnPromptAttack'] = self.block_on_prompt_attack
3622
+ if self.block_on_sensitive_data is not None:
3623
+ result['blockOnSensitiveData'] = self.block_on_sensitive_data
3624
+ if self.check_request is not None:
3625
+ result['checkRequest'] = self.check_request
3626
+ if self.check_response is not None:
3627
+ result['checkResponse'] = self.check_response
3628
+ if self.level is not None:
3629
+ result['level'] = self.level
3630
+ if self.max_text_length is not None:
3631
+ result['maxTextLength'] = self.max_text_length
3632
+ return result
3633
+
3634
+ def from_map(self, m: dict = None):
3635
+ m = m or dict()
3636
+ if m.get('blockOnContentModeration') is not None:
3637
+ self.block_on_content_moderation = m.get('blockOnContentModeration')
3638
+ if m.get('blockOnMaliciousUrl') is not None:
3639
+ self.block_on_malicious_url = m.get('blockOnMaliciousUrl')
3640
+ if m.get('blockOnModelHallucination') is not None:
3641
+ self.block_on_model_hallucination = m.get('blockOnModelHallucination')
3642
+ if m.get('blockOnPromptAttack') is not None:
3643
+ self.block_on_prompt_attack = m.get('blockOnPromptAttack')
3644
+ if m.get('blockOnSensitiveData') is not None:
3645
+ self.block_on_sensitive_data = m.get('blockOnSensitiveData')
3646
+ if m.get('checkRequest') is not None:
3647
+ self.check_request = m.get('checkRequest')
3648
+ if m.get('checkResponse') is not None:
3649
+ self.check_response = m.get('checkResponse')
3650
+ if m.get('level') is not None:
3651
+ self.level = m.get('level')
3652
+ if m.get('maxTextLength') is not None:
3653
+ self.max_text_length = m.get('maxTextLength')
3654
+ return self
3655
+
3656
+
3575
3657
  class ProxyConfigPoliciesFallbacks(TeaModel):
3576
3658
  def __init__(
3577
3659
  self,
@@ -3605,26 +3687,79 @@ class ProxyConfigPoliciesFallbacks(TeaModel):
3605
3687
  return self
3606
3688
 
3607
3689
 
3690
+ class ProxyConfigPoliciesTokenRateLimiter(TeaModel):
3691
+ def __init__(
3692
+ self,
3693
+ tpd: int = None,
3694
+ tph: int = None,
3695
+ tpm: int = None,
3696
+ tps: int = None,
3697
+ ):
3698
+ self.tpd = tpd
3699
+ self.tph = tph
3700
+ self.tpm = tpm
3701
+ self.tps = tps
3702
+
3703
+ def validate(self):
3704
+ pass
3705
+
3706
+ def to_map(self):
3707
+ _map = super().to_map()
3708
+ if _map is not None:
3709
+ return _map
3710
+
3711
+ result = dict()
3712
+ if self.tpd is not None:
3713
+ result['tpd'] = self.tpd
3714
+ if self.tph is not None:
3715
+ result['tph'] = self.tph
3716
+ if self.tpm is not None:
3717
+ result['tpm'] = self.tpm
3718
+ if self.tps is not None:
3719
+ result['tps'] = self.tps
3720
+ return result
3721
+
3722
+ def from_map(self, m: dict = None):
3723
+ m = m or dict()
3724
+ if m.get('tpd') is not None:
3725
+ self.tpd = m.get('tpd')
3726
+ if m.get('tph') is not None:
3727
+ self.tph = m.get('tph')
3728
+ if m.get('tpm') is not None:
3729
+ self.tpm = m.get('tpm')
3730
+ if m.get('tps') is not None:
3731
+ self.tps = m.get('tps')
3732
+ return self
3733
+
3734
+
3608
3735
  class ProxyConfigPolicies(TeaModel):
3609
3736
  def __init__(
3610
3737
  self,
3738
+ ai_guardrail_config: ProxyConfigPoliciesAiGuardrailConfig = None,
3611
3739
  cache: bool = None,
3612
3740
  concurrency_limit: int = None,
3613
3741
  fallbacks: List[ProxyConfigPoliciesFallbacks] = None,
3614
3742
  num_retries: int = None,
3615
3743
  request_timeout: int = None,
3744
+ token_rate_limiter: ProxyConfigPoliciesTokenRateLimiter = None,
3616
3745
  ):
3746
+ self.ai_guardrail_config = ai_guardrail_config
3617
3747
  self.cache = cache
3618
3748
  self.concurrency_limit = concurrency_limit
3619
3749
  self.fallbacks = fallbacks
3620
3750
  self.num_retries = num_retries
3621
3751
  self.request_timeout = request_timeout
3752
+ self.token_rate_limiter = token_rate_limiter
3622
3753
 
3623
3754
  def validate(self):
3755
+ if self.ai_guardrail_config:
3756
+ self.ai_guardrail_config.validate()
3624
3757
  if self.fallbacks:
3625
3758
  for k in self.fallbacks:
3626
3759
  if k:
3627
3760
  k.validate()
3761
+ if self.token_rate_limiter:
3762
+ self.token_rate_limiter.validate()
3628
3763
 
3629
3764
  def to_map(self):
3630
3765
  _map = super().to_map()
@@ -3632,6 +3767,8 @@ class ProxyConfigPolicies(TeaModel):
3632
3767
  return _map
3633
3768
 
3634
3769
  result = dict()
3770
+ if self.ai_guardrail_config is not None:
3771
+ result['aiGuardrailConfig'] = self.ai_guardrail_config.to_map()
3635
3772
  if self.cache is not None:
3636
3773
  result['cache'] = self.cache
3637
3774
  if self.concurrency_limit is not None:
@@ -3644,10 +3781,15 @@ class ProxyConfigPolicies(TeaModel):
3644
3781
  result['numRetries'] = self.num_retries
3645
3782
  if self.request_timeout is not None:
3646
3783
  result['requestTimeout'] = self.request_timeout
3784
+ if self.token_rate_limiter is not None:
3785
+ result['tokenRateLimiter'] = self.token_rate_limiter.to_map()
3647
3786
  return result
3648
3787
 
3649
3788
  def from_map(self, m: dict = None):
3650
3789
  m = m or dict()
3790
+ if m.get('aiGuardrailConfig') is not None:
3791
+ temp_model = ProxyConfigPoliciesAiGuardrailConfig()
3792
+ self.ai_guardrail_config = temp_model.from_map(m['aiGuardrailConfig'])
3651
3793
  if m.get('cache') is not None:
3652
3794
  self.cache = m.get('cache')
3653
3795
  if m.get('concurrencyLimit') is not None:
@@ -3661,6 +3803,9 @@ class ProxyConfigPolicies(TeaModel):
3661
3803
  self.num_retries = m.get('numRetries')
3662
3804
  if m.get('requestTimeout') is not None:
3663
3805
  self.request_timeout = m.get('requestTimeout')
3806
+ if m.get('tokenRateLimiter') is not None:
3807
+ temp_model = ProxyConfigPoliciesTokenRateLimiter()
3808
+ self.token_rate_limiter = temp_model.from_map(m['tokenRateLimiter'])
3664
3809
  return self
3665
3810
 
3666
3811
 
@@ -3715,6 +3860,7 @@ class CreateModelProxyInput(TeaModel):
3715
3860
  cpu: float = None,
3716
3861
  credential_name: str = None,
3717
3862
  description: str = None,
3863
+ execution_role_arn: str = None,
3718
3864
  litellm_version: str = None,
3719
3865
  log_configuration: LogConfiguration = None,
3720
3866
  memory: int = None,
@@ -3730,6 +3876,7 @@ class CreateModelProxyInput(TeaModel):
3730
3876
  self.cpu = cpu
3731
3877
  self.credential_name = credential_name
3732
3878
  self.description = description
3879
+ self.execution_role_arn = execution_role_arn
3733
3880
  self.litellm_version = litellm_version
3734
3881
  self.log_configuration = log_configuration
3735
3882
  # This parameter is required.
@@ -3768,6 +3915,8 @@ class CreateModelProxyInput(TeaModel):
3768
3915
  result['credentialName'] = self.credential_name
3769
3916
  if self.description is not None:
3770
3917
  result['description'] = self.description
3918
+ if self.execution_role_arn is not None:
3919
+ result['executionRoleArn'] = self.execution_role_arn
3771
3920
  if self.litellm_version is not None:
3772
3921
  result['litellmVersion'] = self.litellm_version
3773
3922
  if self.log_configuration is not None:
@@ -3799,6 +3948,8 @@ class CreateModelProxyInput(TeaModel):
3799
3948
  self.credential_name = m.get('credentialName')
3800
3949
  if m.get('description') is not None:
3801
3950
  self.description = m.get('description')
3951
+ if m.get('executionRoleArn') is not None:
3952
+ self.execution_role_arn = m.get('executionRoleArn')
3802
3953
  if m.get('litellmVersion') is not None:
3803
3954
  self.litellm_version = m.get('litellmVersion')
3804
3955
  if m.get('logConfiguration') is not None:
@@ -5002,6 +5153,7 @@ class ModelProxy(TeaModel):
5002
5153
  credential_name: str = None,
5003
5154
  description: str = None,
5004
5155
  endpoint: str = None,
5156
+ execution_role_arn: str = None,
5005
5157
  function_name: str = None,
5006
5158
  last_updated_at: str = None,
5007
5159
  litellm_version: str = None,
@@ -5022,6 +5174,7 @@ class ModelProxy(TeaModel):
5022
5174
  self.credential_name = credential_name
5023
5175
  self.description = description
5024
5176
  self.endpoint = endpoint
5177
+ self.execution_role_arn = execution_role_arn
5025
5178
  self.function_name = function_name
5026
5179
  self.last_updated_at = last_updated_at
5027
5180
  self.litellm_version = litellm_version
@@ -5061,6 +5214,8 @@ class ModelProxy(TeaModel):
5061
5214
  result['description'] = self.description
5062
5215
  if self.endpoint is not None:
5063
5216
  result['endpoint'] = self.endpoint
5217
+ if self.execution_role_arn is not None:
5218
+ result['executionRoleArn'] = self.execution_role_arn
5064
5219
  if self.function_name is not None:
5065
5220
  result['functionName'] = self.function_name
5066
5221
  if self.last_updated_at is not None:
@@ -5103,6 +5258,8 @@ class ModelProxy(TeaModel):
5103
5258
  self.description = m.get('description')
5104
5259
  if m.get('endpoint') is not None:
5105
5260
  self.endpoint = m.get('endpoint')
5261
+ if m.get('executionRoleArn') is not None:
5262
+ self.execution_role_arn = m.get('executionRoleArn')
5106
5263
  if m.get('functionName') is not None:
5107
5264
  self.function_name = m.get('functionName')
5108
5265
  if m.get('lastUpdatedAt') is not None:
@@ -9583,6 +9740,7 @@ class UpdateModelProxyInput(TeaModel):
9583
9740
  arms_configuration: ArmsConfiguration = None,
9584
9741
  credential_name: str = None,
9585
9742
  description: str = None,
9743
+ execution_role_arn: str = None,
9586
9744
  log_configuration: LogConfiguration = None,
9587
9745
  network_configuration: NetworkConfiguration = None,
9588
9746
  proxy_config: ProxyConfig = None,
@@ -9590,6 +9748,7 @@ class UpdateModelProxyInput(TeaModel):
9590
9748
  self.arms_configuration = arms_configuration
9591
9749
  self.credential_name = credential_name
9592
9750
  self.description = description
9751
+ self.execution_role_arn = execution_role_arn
9593
9752
  self.log_configuration = log_configuration
9594
9753
  self.network_configuration = network_configuration
9595
9754
  self.proxy_config = proxy_config
@@ -9616,6 +9775,8 @@ class UpdateModelProxyInput(TeaModel):
9616
9775
  result['credentialName'] = self.credential_name
9617
9776
  if self.description is not None:
9618
9777
  result['description'] = self.description
9778
+ if self.execution_role_arn is not None:
9779
+ result['executionRoleArn'] = self.execution_role_arn
9619
9780
  if self.log_configuration is not None:
9620
9781
  result['logConfiguration'] = self.log_configuration.to_map()
9621
9782
  if self.network_configuration is not None:
@@ -9633,6 +9794,8 @@ class UpdateModelProxyInput(TeaModel):
9633
9794
  self.credential_name = m.get('credentialName')
9634
9795
  if m.get('description') is not None:
9635
9796
  self.description = m.get('description')
9797
+ if m.get('executionRoleArn') is not None:
9798
+ self.execution_role_arn = m.get('executionRoleArn')
9636
9799
  if m.get('logConfiguration') is not None:
9637
9800
  temp_model = LogConfiguration()
9638
9801
  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.4
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=TXO21JcOVblzJws1XOoQzR8vKDD4ktx7VTUgJTYbUOA,21
2
+ alibabacloud_agentrun20250910/client.py,sha256=Vv1grhdcqdrjMqB9TgpVgXf2rnqn2CYORo7wUp4Hb6c,241199
3
+ alibabacloud_agentrun20250910/models.py,sha256=38JH7mgZmpKgjJMrBWLHiyHlthdb8fOBUUR1uMm6oJE,499260
4
+ alibabacloud_agentrun20250910-4.0.4.dist-info/LICENSE,sha256=0CFItL6bHvxqS44T6vlLoW2R4Zaic304OO3WxN0oXF0,600
5
+ alibabacloud_agentrun20250910-4.0.4.dist-info/METADATA,sha256=rh6bQ5RZiaCgDAlkqZc3T5cdtfj_25Wlvl61VgbR2-E,2347
6
+ alibabacloud_agentrun20250910-4.0.4.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
7
+ alibabacloud_agentrun20250910-4.0.4.dist-info/top_level.txt,sha256=52ubthzYJLT_H920wO8t0i9HV90alDqttDu0fv3l1aM,30
8
+ alibabacloud_agentrun20250910-4.0.4.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,,