Class: LiteLLMClient::LitellmParams
- Inherits:
-
Object
- Object
- LiteLLMClient::LitellmParams
- Defined in:
- lib/litellm_client/models/litellm_params.rb
Instance Attribute Summary collapse
-
#api_base ⇒ Object
Returns the value of attribute api_base.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
-
#aws_bedrock_runtime_endpoint ⇒ Object
Returns the value of attribute aws_bedrock_runtime_endpoint.
-
#aws_profile_name ⇒ Object
Returns the value of attribute aws_profile_name.
-
#aws_region_name ⇒ Object
Returns the value of attribute aws_region_name.
-
#aws_role_name ⇒ Object
Returns the value of attribute aws_role_name.
-
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
-
#aws_session_name ⇒ Object
Returns the value of attribute aws_session_name.
-
#aws_session_token ⇒ Object
Returns the value of attribute aws_session_token.
-
#aws_sts_endpoint ⇒ Object
Returns the value of attribute aws_sts_endpoint.
-
#aws_web_identity_token ⇒ Object
Returns the value of attribute aws_web_identity_token.
-
#breakdown ⇒ Object
Returns the value of attribute breakdown.
-
#category_thresholds ⇒ Object
Returns the value of attribute category_thresholds.
-
#default_on ⇒ Object
Returns the value of attribute default_on.
-
#detect_secrets_config ⇒ Object
Returns the value of attribute detect_secrets_config.
-
#dev_info ⇒ Object
Returns the value of attribute dev_info.
-
#guard_name ⇒ Object
Returns the value of attribute guard_name.
-
#guardrail ⇒ Object
The type of guardrail integration to use.
-
#guardrail_identifier ⇒ Object
Returns the value of attribute guardrail_identifier.
-
#guardrail_version ⇒ Object
Returns the value of attribute guardrail_version.
-
#lasso_conversation_id ⇒ Object
Returns the value of attribute lasso_conversation_id.
-
#lasso_user_id ⇒ Object
Returns the value of attribute lasso_user_id.
-
#mask_request_content ⇒ Object
Returns the value of attribute mask_request_content.
-
#mask_response_content ⇒ Object
Returns the value of attribute mask_response_content.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#mock_redacted_text ⇒ Object
Returns the value of attribute mock_redacted_text.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#output_parse_pii ⇒ Object
Returns the value of attribute output_parse_pii.
-
#pangea_input_recipe ⇒ Object
Returns the value of attribute pangea_input_recipe.
-
#pangea_output_recipe ⇒ Object
Returns the value of attribute pangea_output_recipe.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#pii_entities_config ⇒ Object
Returns the value of attribute pii_entities_config.
-
#presidio_ad_hoc_recognizers ⇒ Object
Returns the value of attribute presidio_ad_hoc_recognizers.
-
#presidio_analyzer_api_base ⇒ Object
Returns the value of attribute presidio_analyzer_api_base.
-
#presidio_anonymizer_api_base ⇒ Object
Returns the value of attribute presidio_anonymizer_api_base.
-
#presidio_language ⇒ Object
Returns the value of attribute presidio_language.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ LitellmParams
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ LitellmParams
Initializes the object
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/litellm_client/models/litellm_params.rb', line 237 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `LiteLLMClient::LitellmParams` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `LiteLLMClient::LitellmParams`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'lasso_user_id') self.lasso_user_id = attributes[:'lasso_user_id'] end if attributes.key?(:'lasso_conversation_id') self.lasso_conversation_id = attributes[:'lasso_conversation_id'] end if attributes.key?(:'api_key') self.api_key = attributes[:'api_key'] end if attributes.key?(:'api_base') self.api_base = attributes[:'api_base'] end if attributes.key?(:'project_id') self.project_id = attributes[:'project_id'] end if attributes.key?(:'payload') self.payload = attributes[:'payload'] end if attributes.key?(:'breakdown') self.breakdown = attributes[:'breakdown'] end if attributes.key?(:'metadata') if (value = attributes[:'metadata']).is_a?(Hash) self. = value end end if attributes.key?(:'dev_info') self.dev_info = attributes[:'dev_info'] end if attributes.key?(:'guardrail_identifier') self.guardrail_identifier = attributes[:'guardrail_identifier'] end if attributes.key?(:'guardrail_version') self.guardrail_version = attributes[:'guardrail_version'] end if attributes.key?(:'aws_region_name') self.aws_region_name = attributes[:'aws_region_name'] end if attributes.key?(:'aws_access_key_id') self.aws_access_key_id = attributes[:'aws_access_key_id'] end if attributes.key?(:'aws_secret_access_key') self.aws_secret_access_key = attributes[:'aws_secret_access_key'] end if attributes.key?(:'aws_session_token') self.aws_session_token = attributes[:'aws_session_token'] end if attributes.key?(:'aws_session_name') self.aws_session_name = attributes[:'aws_session_name'] end if attributes.key?(:'aws_profile_name') self.aws_profile_name = attributes[:'aws_profile_name'] end if attributes.key?(:'aws_role_name') self.aws_role_name = attributes[:'aws_role_name'] end if attributes.key?(:'aws_web_identity_token') self.aws_web_identity_token = attributes[:'aws_web_identity_token'] end if attributes.key?(:'aws_sts_endpoint') self.aws_sts_endpoint = attributes[:'aws_sts_endpoint'] end if attributes.key?(:'aws_bedrock_runtime_endpoint') self.aws_bedrock_runtime_endpoint = attributes[:'aws_bedrock_runtime_endpoint'] end if attributes.key?(:'presidio_analyzer_api_base') self.presidio_analyzer_api_base = attributes[:'presidio_analyzer_api_base'] end if attributes.key?(:'presidio_anonymizer_api_base') self.presidio_anonymizer_api_base = attributes[:'presidio_anonymizer_api_base'] end if attributes.key?(:'output_parse_pii') self.output_parse_pii = attributes[:'output_parse_pii'] end if attributes.key?(:'presidio_language') self.presidio_language = attributes[:'presidio_language'] end if attributes.key?(:'pii_entities_config') if (value = attributes[:'pii_entities_config']).is_a?(Hash) self.pii_entities_config = value end end if attributes.key?(:'presidio_ad_hoc_recognizers') self.presidio_ad_hoc_recognizers = attributes[:'presidio_ad_hoc_recognizers'] end if attributes.key?(:'mock_redacted_text') if (value = attributes[:'mock_redacted_text']).is_a?(Hash) self.mock_redacted_text = value end end if attributes.key?(:'guardrail') self.guardrail = attributes[:'guardrail'] else self.guardrail = nil end if attributes.key?(:'mode') self.mode = attributes[:'mode'] else self.mode = nil end if attributes.key?(:'category_thresholds') self.category_thresholds = attributes[:'category_thresholds'] end if attributes.key?(:'detect_secrets_config') if (value = attributes[:'detect_secrets_config']).is_a?(Hash) self.detect_secrets_config = value end end if attributes.key?(:'guard_name') self.guard_name = attributes[:'guard_name'] end if attributes.key?(:'default_on') self.default_on = attributes[:'default_on'] end if attributes.key?(:'mask_request_content') self.mask_request_content = attributes[:'mask_request_content'] end if attributes.key?(:'mask_response_content') self.mask_response_content = attributes[:'mask_response_content'] end if attributes.key?(:'pangea_input_recipe') self.pangea_input_recipe = attributes[:'pangea_input_recipe'] end if attributes.key?(:'pangea_output_recipe') self.pangea_output_recipe = attributes[:'pangea_output_recipe'] end end |
Instance Attribute Details
#api_base ⇒ Object
Returns the value of attribute api_base.
24 25 26 |
# File 'lib/litellm_client/models/litellm_params.rb', line 24 def api_base @api_base end |
#api_key ⇒ Object
Returns the value of attribute api_key.
22 23 24 |
# File 'lib/litellm_client/models/litellm_params.rb', line 22 def api_key @api_key end |
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
42 43 44 |
# File 'lib/litellm_client/models/litellm_params.rb', line 42 def aws_access_key_id @aws_access_key_id end |
#aws_bedrock_runtime_endpoint ⇒ Object
Returns the value of attribute aws_bedrock_runtime_endpoint.
58 59 60 |
# File 'lib/litellm_client/models/litellm_params.rb', line 58 def aws_bedrock_runtime_endpoint @aws_bedrock_runtime_endpoint end |
#aws_profile_name ⇒ Object
Returns the value of attribute aws_profile_name.
50 51 52 |
# File 'lib/litellm_client/models/litellm_params.rb', line 50 def aws_profile_name @aws_profile_name end |
#aws_region_name ⇒ Object
Returns the value of attribute aws_region_name.
40 41 42 |
# File 'lib/litellm_client/models/litellm_params.rb', line 40 def aws_region_name @aws_region_name end |
#aws_role_name ⇒ Object
Returns the value of attribute aws_role_name.
52 53 54 |
# File 'lib/litellm_client/models/litellm_params.rb', line 52 def aws_role_name @aws_role_name end |
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
44 45 46 |
# File 'lib/litellm_client/models/litellm_params.rb', line 44 def aws_secret_access_key @aws_secret_access_key end |
#aws_session_name ⇒ Object
Returns the value of attribute aws_session_name.
48 49 50 |
# File 'lib/litellm_client/models/litellm_params.rb', line 48 def aws_session_name @aws_session_name end |
#aws_session_token ⇒ Object
Returns the value of attribute aws_session_token.
46 47 48 |
# File 'lib/litellm_client/models/litellm_params.rb', line 46 def aws_session_token @aws_session_token end |
#aws_sts_endpoint ⇒ Object
Returns the value of attribute aws_sts_endpoint.
56 57 58 |
# File 'lib/litellm_client/models/litellm_params.rb', line 56 def aws_sts_endpoint @aws_sts_endpoint end |
#aws_web_identity_token ⇒ Object
Returns the value of attribute aws_web_identity_token.
54 55 56 |
# File 'lib/litellm_client/models/litellm_params.rb', line 54 def aws_web_identity_token @aws_web_identity_token end |
#breakdown ⇒ Object
Returns the value of attribute breakdown.
30 31 32 |
# File 'lib/litellm_client/models/litellm_params.rb', line 30 def breakdown @breakdown end |
#category_thresholds ⇒ Object
Returns the value of attribute category_thresholds.
79 80 81 |
# File 'lib/litellm_client/models/litellm_params.rb', line 79 def category_thresholds @category_thresholds end |
#default_on ⇒ Object
Returns the value of attribute default_on.
85 86 87 |
# File 'lib/litellm_client/models/litellm_params.rb', line 85 def default_on @default_on end |
#detect_secrets_config ⇒ Object
Returns the value of attribute detect_secrets_config.
81 82 83 |
# File 'lib/litellm_client/models/litellm_params.rb', line 81 def detect_secrets_config @detect_secrets_config end |
#dev_info ⇒ Object
Returns the value of attribute dev_info.
34 35 36 |
# File 'lib/litellm_client/models/litellm_params.rb', line 34 def dev_info @dev_info end |
#guard_name ⇒ Object
Returns the value of attribute guard_name.
83 84 85 |
# File 'lib/litellm_client/models/litellm_params.rb', line 83 def guard_name @guard_name end |
#guardrail ⇒ Object
The type of guardrail integration to use
75 76 77 |
# File 'lib/litellm_client/models/litellm_params.rb', line 75 def guardrail @guardrail end |
#guardrail_identifier ⇒ Object
Returns the value of attribute guardrail_identifier.
36 37 38 |
# File 'lib/litellm_client/models/litellm_params.rb', line 36 def guardrail_identifier @guardrail_identifier end |
#guardrail_version ⇒ Object
Returns the value of attribute guardrail_version.
38 39 40 |
# File 'lib/litellm_client/models/litellm_params.rb', line 38 def guardrail_version @guardrail_version end |
#lasso_conversation_id ⇒ Object
Returns the value of attribute lasso_conversation_id.
20 21 22 |
# File 'lib/litellm_client/models/litellm_params.rb', line 20 def lasso_conversation_id @lasso_conversation_id end |
#lasso_user_id ⇒ Object
Returns the value of attribute lasso_user_id.
18 19 20 |
# File 'lib/litellm_client/models/litellm_params.rb', line 18 def lasso_user_id @lasso_user_id end |
#mask_request_content ⇒ Object
Returns the value of attribute mask_request_content.
87 88 89 |
# File 'lib/litellm_client/models/litellm_params.rb', line 87 def mask_request_content @mask_request_content end |
#mask_response_content ⇒ Object
Returns the value of attribute mask_response_content.
89 90 91 |
# File 'lib/litellm_client/models/litellm_params.rb', line 89 def mask_response_content @mask_response_content end |
#metadata ⇒ Object
Returns the value of attribute metadata.
32 33 34 |
# File 'lib/litellm_client/models/litellm_params.rb', line 32 def @metadata end |
#mock_redacted_text ⇒ Object
Returns the value of attribute mock_redacted_text.
72 73 74 |
# File 'lib/litellm_client/models/litellm_params.rb', line 72 def mock_redacted_text @mock_redacted_text end |
#mode ⇒ Object
Returns the value of attribute mode.
77 78 79 |
# File 'lib/litellm_client/models/litellm_params.rb', line 77 def mode @mode end |
#output_parse_pii ⇒ Object
Returns the value of attribute output_parse_pii.
64 65 66 |
# File 'lib/litellm_client/models/litellm_params.rb', line 64 def output_parse_pii @output_parse_pii end |
#pangea_input_recipe ⇒ Object
Returns the value of attribute pangea_input_recipe.
91 92 93 |
# File 'lib/litellm_client/models/litellm_params.rb', line 91 def pangea_input_recipe @pangea_input_recipe end |
#pangea_output_recipe ⇒ Object
Returns the value of attribute pangea_output_recipe.
93 94 95 |
# File 'lib/litellm_client/models/litellm_params.rb', line 93 def pangea_output_recipe @pangea_output_recipe end |
#payload ⇒ Object
Returns the value of attribute payload.
28 29 30 |
# File 'lib/litellm_client/models/litellm_params.rb', line 28 def payload @payload end |
#pii_entities_config ⇒ Object
Returns the value of attribute pii_entities_config.
68 69 70 |
# File 'lib/litellm_client/models/litellm_params.rb', line 68 def pii_entities_config @pii_entities_config end |
#presidio_ad_hoc_recognizers ⇒ Object
Returns the value of attribute presidio_ad_hoc_recognizers.
70 71 72 |
# File 'lib/litellm_client/models/litellm_params.rb', line 70 def presidio_ad_hoc_recognizers @presidio_ad_hoc_recognizers end |
#presidio_analyzer_api_base ⇒ Object
Returns the value of attribute presidio_analyzer_api_base.
60 61 62 |
# File 'lib/litellm_client/models/litellm_params.rb', line 60 def presidio_analyzer_api_base @presidio_analyzer_api_base end |
#presidio_anonymizer_api_base ⇒ Object
Returns the value of attribute presidio_anonymizer_api_base.
62 63 64 |
# File 'lib/litellm_client/models/litellm_params.rb', line 62 def presidio_anonymizer_api_base @presidio_anonymizer_api_base end |
#presidio_language ⇒ Object
Returns the value of attribute presidio_language.
66 67 68 |
# File 'lib/litellm_client/models/litellm_params.rb', line 66 def presidio_language @presidio_language end |
#project_id ⇒ Object
Returns the value of attribute project_id.
26 27 28 |
# File 'lib/litellm_client/models/litellm_params.rb', line 26 def project_id @project_id end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 |
# File 'lib/litellm_client/models/litellm_params.rb', line 545 def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = LiteLLMClient.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
140 141 142 |
# File 'lib/litellm_client/models/litellm_params.rb', line 140 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
145 146 147 |
# File 'lib/litellm_client/models/litellm_params.rb', line 145 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/litellm_client/models/litellm_params.rb', line 96 def self.attribute_map { :'lasso_user_id' => :'lasso_user_id', :'lasso_conversation_id' => :'lasso_conversation_id', :'api_key' => :'api_key', :'api_base' => :'api_base', :'project_id' => :'project_id', :'payload' => :'payload', :'breakdown' => :'breakdown', :'metadata' => :'metadata', :'dev_info' => :'dev_info', :'guardrail_identifier' => :'guardrailIdentifier', :'guardrail_version' => :'guardrailVersion', :'aws_region_name' => :'aws_region_name', :'aws_access_key_id' => :'aws_access_key_id', :'aws_secret_access_key' => :'aws_secret_access_key', :'aws_session_token' => :'aws_session_token', :'aws_session_name' => :'aws_session_name', :'aws_profile_name' => :'aws_profile_name', :'aws_role_name' => :'aws_role_name', :'aws_web_identity_token' => :'aws_web_identity_token', :'aws_sts_endpoint' => :'aws_sts_endpoint', :'aws_bedrock_runtime_endpoint' => :'aws_bedrock_runtime_endpoint', :'presidio_analyzer_api_base' => :'presidio_analyzer_api_base', :'presidio_anonymizer_api_base' => :'presidio_anonymizer_api_base', :'output_parse_pii' => :'output_parse_pii', :'presidio_language' => :'presidio_language', :'pii_entities_config' => :'pii_entities_config', :'presidio_ad_hoc_recognizers' => :'presidio_ad_hoc_recognizers', :'mock_redacted_text' => :'mock_redacted_text', :'guardrail' => :'guardrail', :'mode' => :'mode', :'category_thresholds' => :'category_thresholds', :'detect_secrets_config' => :'detect_secrets_config', :'guard_name' => :'guard_name', :'default_on' => :'default_on', :'mask_request_content' => :'mask_request_content', :'mask_response_content' => :'mask_response_content', :'pangea_input_recipe' => :'pangea_input_recipe', :'pangea_output_recipe' => :'pangea_output_recipe' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 |
# File 'lib/litellm_client/models/litellm_params.rb', line 521 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/litellm_client/models/litellm_params.rb', line 194 def self.openapi_nullable Set.new([ :'lasso_user_id', :'lasso_conversation_id', :'api_key', :'api_base', :'project_id', :'payload', :'breakdown', :'metadata', :'dev_info', :'guardrail_identifier', :'guardrail_version', :'aws_region_name', :'aws_access_key_id', :'aws_secret_access_key', :'aws_session_token', :'aws_session_name', :'aws_profile_name', :'aws_role_name', :'aws_web_identity_token', :'aws_sts_endpoint', :'aws_bedrock_runtime_endpoint', :'presidio_analyzer_api_base', :'presidio_anonymizer_api_base', :'output_parse_pii', :'presidio_language', :'pii_entities_config', :'presidio_ad_hoc_recognizers', :'mock_redacted_text', :'category_thresholds', :'detect_secrets_config', :'guard_name', :'default_on', :'mask_request_content', :'mask_response_content', :'pangea_input_recipe', :'pangea_output_recipe' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/litellm_client/models/litellm_params.rb', line 150 def self.openapi_types { :'lasso_user_id' => :'String', :'lasso_conversation_id' => :'String', :'api_key' => :'String', :'api_base' => :'String', :'project_id' => :'String', :'payload' => :'Boolean', :'breakdown' => :'Boolean', :'metadata' => :'Hash<String, Object>', :'dev_info' => :'Boolean', :'guardrail_identifier' => :'String', :'guardrail_version' => :'String', :'aws_region_name' => :'String', :'aws_access_key_id' => :'String', :'aws_secret_access_key' => :'String', :'aws_session_token' => :'String', :'aws_session_name' => :'String', :'aws_profile_name' => :'String', :'aws_role_name' => :'String', :'aws_web_identity_token' => :'String', :'aws_sts_endpoint' => :'String', :'aws_bedrock_runtime_endpoint' => :'String', :'presidio_analyzer_api_base' => :'String', :'presidio_anonymizer_api_base' => :'String', :'output_parse_pii' => :'Boolean', :'presidio_language' => :'String', :'pii_entities_config' => :'Hash<String, PiiAction>', :'presidio_ad_hoc_recognizers' => :'String', :'mock_redacted_text' => :'Hash<String, Object>', :'guardrail' => :'String', :'mode' => :'Mode1', :'category_thresholds' => :'LakeraCategoryThresholds', :'detect_secrets_config' => :'Hash<String, Object>', :'guard_name' => :'String', :'default_on' => :'Boolean', :'mask_request_content' => :'Boolean', :'mask_response_content' => :'Boolean', :'pangea_input_recipe' => :'String', :'pangea_output_recipe' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/litellm_client/models/litellm_params.rb', line 463 def ==(o) return true if self.equal?(o) self.class == o.class && lasso_user_id == o.lasso_user_id && lasso_conversation_id == o.lasso_conversation_id && api_key == o.api_key && api_base == o.api_base && project_id == o.project_id && payload == o.payload && breakdown == o.breakdown && == o. && dev_info == o.dev_info && guardrail_identifier == o.guardrail_identifier && guardrail_version == o.guardrail_version && aws_region_name == o.aws_region_name && aws_access_key_id == o.aws_access_key_id && aws_secret_access_key == o.aws_secret_access_key && aws_session_token == o.aws_session_token && aws_session_name == o.aws_session_name && aws_profile_name == o.aws_profile_name && aws_role_name == o.aws_role_name && aws_web_identity_token == o.aws_web_identity_token && aws_sts_endpoint == o.aws_sts_endpoint && aws_bedrock_runtime_endpoint == o.aws_bedrock_runtime_endpoint && presidio_analyzer_api_base == o.presidio_analyzer_api_base && presidio_anonymizer_api_base == o.presidio_anonymizer_api_base && output_parse_pii == o.output_parse_pii && presidio_language == o.presidio_language && pii_entities_config == o.pii_entities_config && presidio_ad_hoc_recognizers == o.presidio_ad_hoc_recognizers && mock_redacted_text == o.mock_redacted_text && guardrail == o.guardrail && mode == o.mode && category_thresholds == o.category_thresholds && detect_secrets_config == o.detect_secrets_config && guard_name == o.guard_name && default_on == o.default_on && mask_request_content == o.mask_request_content && mask_response_content == o.mask_response_content && pangea_input_recipe == o.pangea_input_recipe && pangea_output_recipe == o.pangea_output_recipe end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
616 617 618 619 620 621 622 623 624 625 626 627 628 |
# File 'lib/litellm_client/models/litellm_params.rb', line 616 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#eql?(o) ⇒ Boolean
508 509 510 |
# File 'lib/litellm_client/models/litellm_params.rb', line 508 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
514 515 516 |
# File 'lib/litellm_client/models/litellm_params.rb', line 514 def hash [lasso_user_id, lasso_conversation_id, api_key, api_base, project_id, payload, breakdown, , dev_info, guardrail_identifier, guardrail_version, aws_region_name, aws_access_key_id, aws_secret_access_key, aws_session_token, aws_session_name, aws_profile_name, aws_role_name, aws_web_identity_token, aws_sts_endpoint, aws_bedrock_runtime_endpoint, presidio_analyzer_api_base, presidio_anonymizer_api_base, output_parse_pii, presidio_language, pii_entities_config, presidio_ad_hoc_recognizers, mock_redacted_text, guardrail, mode, category_thresholds, detect_secrets_config, guard_name, default_on, mask_request_content, mask_response_content, pangea_input_recipe, pangea_output_recipe].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/litellm_client/models/litellm_params.rb', line 418 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @guardrail.nil? invalid_properties.push('invalid value for "guardrail", guardrail cannot be nil.') end if @mode.nil? invalid_properties.push('invalid value for "mode", mode cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
592 593 594 |
# File 'lib/litellm_client/models/litellm_params.rb', line 592 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
598 599 600 601 602 603 604 605 606 607 608 609 610 |
# File 'lib/litellm_client/models/litellm_params.rb', line 598 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
586 587 588 |
# File 'lib/litellm_client/models/litellm_params.rb', line 586 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
434 435 436 437 438 439 |
# File 'lib/litellm_client/models/litellm_params.rb', line 434 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @guardrail.nil? return false if @mode.nil? true end |