Module mailslurp_client.models.ai_message_ai_options
MailSlurp API
MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - Homepage - Get an API KEY - Generated SDK Clients - Examples repository # noqa: E501
The version of the OpenAPI document: 6.5.2 Contact: contact@mailslurp.dev Generated by: https://openapi-generator.tech
Classes
class AIMessageAIOptions (model=None, max_tokens=None, max_candidates=None, max_output_tokens=None, minimum_confidence=None, local_vars_configuration=None)-
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech
Do not edit the class manually.
AIMessageAIOptions - a model defined in OpenAPI
Expand source code
class AIMessageAIOptions(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'model': 'str', 'max_tokens': 'int', 'max_candidates': 'int', 'max_output_tokens': 'int', 'minimum_confidence': 'float' } attribute_map = { 'model': 'model', 'max_tokens': 'maxTokens', 'max_candidates': 'maxCandidates', 'max_output_tokens': 'maxOutputTokens', 'minimum_confidence': 'minimumConfidence' } def __init__(self, model=None, max_tokens=None, max_candidates=None, max_output_tokens=None, minimum_confidence=None, local_vars_configuration=None): # noqa: E501 """AIMessageAIOptions - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._model = None self._max_tokens = None self._max_candidates = None self._max_output_tokens = None self._minimum_confidence = None self.discriminator = None self.model = model self.max_tokens = max_tokens self.max_candidates = max_candidates self.max_output_tokens = max_output_tokens self.minimum_confidence = minimum_confidence @property def model(self): """Gets the model of this AIMessageAIOptions. # noqa: E501 :return: The model of this AIMessageAIOptions. # noqa: E501 :rtype: str """ return self._model @model.setter def model(self, model): """Sets the model of this AIMessageAIOptions. :param model: The model of this AIMessageAIOptions. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and model is None: # noqa: E501 raise ValueError("Invalid value for `model`, must not be `None`") # noqa: E501 allowed_values = ["BALANCED_V1", "FLASH_LATEST", "QUALITY_V1"] # noqa: E501 if self.local_vars_configuration.client_side_validation and model not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `model` ({0}), must be one of {1}" # noqa: E501 .format(model, allowed_values) ) self._model = model @property def max_tokens(self): """Gets the max_tokens of this AIMessageAIOptions. # noqa: E501 :return: The max_tokens of this AIMessageAIOptions. # noqa: E501 :rtype: int """ return self._max_tokens @max_tokens.setter def max_tokens(self, max_tokens): """Sets the max_tokens of this AIMessageAIOptions. :param max_tokens: The max_tokens of this AIMessageAIOptions. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and max_tokens is None: # noqa: E501 raise ValueError("Invalid value for `max_tokens`, must not be `None`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and max_tokens is not None and max_tokens > 100000): # noqa: E501 raise ValueError("Invalid value for `max_tokens`, must be a value less than or equal to `100000`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and max_tokens is not None and max_tokens < 1): # noqa: E501 raise ValueError("Invalid value for `max_tokens`, must be a value greater than or equal to `1`") # noqa: E501 self._max_tokens = max_tokens @property def max_candidates(self): """Gets the max_candidates of this AIMessageAIOptions. # noqa: E501 :return: The max_candidates of this AIMessageAIOptions. # noqa: E501 :rtype: int """ return self._max_candidates @max_candidates.setter def max_candidates(self, max_candidates): """Sets the max_candidates of this AIMessageAIOptions. :param max_candidates: The max_candidates of this AIMessageAIOptions. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and max_candidates is None: # noqa: E501 raise ValueError("Invalid value for `max_candidates`, must not be `None`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and max_candidates is not None and max_candidates > 100): # noqa: E501 raise ValueError("Invalid value for `max_candidates`, must be a value less than or equal to `100`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and max_candidates is not None and max_candidates < 1): # noqa: E501 raise ValueError("Invalid value for `max_candidates`, must be a value greater than or equal to `1`") # noqa: E501 self._max_candidates = max_candidates @property def max_output_tokens(self): """Gets the max_output_tokens of this AIMessageAIOptions. # noqa: E501 :return: The max_output_tokens of this AIMessageAIOptions. # noqa: E501 :rtype: int """ return self._max_output_tokens @max_output_tokens.setter def max_output_tokens(self, max_output_tokens): """Sets the max_output_tokens of this AIMessageAIOptions. :param max_output_tokens: The max_output_tokens of this AIMessageAIOptions. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and max_output_tokens is None: # noqa: E501 raise ValueError("Invalid value for `max_output_tokens`, must not be `None`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and max_output_tokens is not None and max_output_tokens > 8192): # noqa: E501 raise ValueError("Invalid value for `max_output_tokens`, must be a value less than or equal to `8192`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and max_output_tokens is not None and max_output_tokens < 128): # noqa: E501 raise ValueError("Invalid value for `max_output_tokens`, must be a value greater than or equal to `128`") # noqa: E501 self._max_output_tokens = max_output_tokens @property def minimum_confidence(self): """Gets the minimum_confidence of this AIMessageAIOptions. # noqa: E501 Optional advanced abstention threshold for model-reported confidence. Below it the decision is INCONCLUSIVE. It does not guarantee accuracy or cause reevaluation. # noqa: E501 :return: The minimum_confidence of this AIMessageAIOptions. # noqa: E501 :rtype: float """ return self._minimum_confidence @minimum_confidence.setter def minimum_confidence(self, minimum_confidence): """Sets the minimum_confidence of this AIMessageAIOptions. Optional advanced abstention threshold for model-reported confidence. Below it the decision is INCONCLUSIVE. It does not guarantee accuracy or cause reevaluation. # noqa: E501 :param minimum_confidence: The minimum_confidence of this AIMessageAIOptions. # noqa: E501 :type: float """ if (self.local_vars_configuration.client_side_validation and minimum_confidence is not None and minimum_confidence > 1.0): # noqa: E501 raise ValueError("Invalid value for `minimum_confidence`, must be a value less than or equal to `1.0`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and minimum_confidence is not None and minimum_confidence < 0.0): # noqa: E501 raise ValueError("Invalid value for `minimum_confidence`, must be a value greater than or equal to `0.0`") # noqa: E501 self._minimum_confidence = minimum_confidence def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AIMessageAIOptions): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, AIMessageAIOptions): return True return self.to_dict() != other.to_dict()Class variables
var attribute_mapvar openapi_types
Instance variables
prop max_candidates-
Gets the max_candidates of this AIMessageAIOptions. # noqa: E501
:return: The max_candidates of this AIMessageAIOptions. # noqa: E501 :rtype: int
Expand source code
@property def max_candidates(self): """Gets the max_candidates of this AIMessageAIOptions. # noqa: E501 :return: The max_candidates of this AIMessageAIOptions. # noqa: E501 :rtype: int """ return self._max_candidates prop max_output_tokens-
Gets the max_output_tokens of this AIMessageAIOptions. # noqa: E501
:return: The max_output_tokens of this AIMessageAIOptions. # noqa: E501 :rtype: int
Expand source code
@property def max_output_tokens(self): """Gets the max_output_tokens of this AIMessageAIOptions. # noqa: E501 :return: The max_output_tokens of this AIMessageAIOptions. # noqa: E501 :rtype: int """ return self._max_output_tokens prop max_tokens-
Gets the max_tokens of this AIMessageAIOptions. # noqa: E501
:return: The max_tokens of this AIMessageAIOptions. # noqa: E501 :rtype: int
Expand source code
@property def max_tokens(self): """Gets the max_tokens of this AIMessageAIOptions. # noqa: E501 :return: The max_tokens of this AIMessageAIOptions. # noqa: E501 :rtype: int """ return self._max_tokens prop minimum_confidence-
Gets the minimum_confidence of this AIMessageAIOptions. # noqa: E501
Optional advanced abstention threshold for model-reported confidence. Below it the decision is INCONCLUSIVE. It does not guarantee accuracy or cause reevaluation. # noqa: E501
:return: The minimum_confidence of this AIMessageAIOptions. # noqa: E501 :rtype: float
Expand source code
@property def minimum_confidence(self): """Gets the minimum_confidence of this AIMessageAIOptions. # noqa: E501 Optional advanced abstention threshold for model-reported confidence. Below it the decision is INCONCLUSIVE. It does not guarantee accuracy or cause reevaluation. # noqa: E501 :return: The minimum_confidence of this AIMessageAIOptions. # noqa: E501 :rtype: float """ return self._minimum_confidence prop model-
Gets the model of this AIMessageAIOptions. # noqa: E501
:return: The model of this AIMessageAIOptions. # noqa: E501 :rtype: str
Expand source code
@property def model(self): """Gets the model of this AIMessageAIOptions. # noqa: E501 :return: The model of this AIMessageAIOptions. # noqa: E501 :rtype: str """ return self._model
Methods
def to_dict(self)-
Returns the model properties as a dict
def to_str(self)-
Returns the string representation of the model