EmbedTextDetails

class oci.generative_ai_inference.models.EmbedTextDetails(**kwargs)

Bases: object

Details for the request to embed texts.

Attributes

INPUT_TYPE_CLASSIFICATION A constant which can be used with the input_type property of a EmbedTextDetails.
INPUT_TYPE_CLUSTERING A constant which can be used with the input_type property of a EmbedTextDetails.
INPUT_TYPE_SEARCH_DOCUMENT A constant which can be used with the input_type property of a EmbedTextDetails.
INPUT_TYPE_SEARCH_QUERY A constant which can be used with the input_type property of a EmbedTextDetails.
TRUNCATE_END A constant which can be used with the truncate property of a EmbedTextDetails.
TRUNCATE_NONE A constant which can be used with the truncate property of a EmbedTextDetails.
TRUNCATE_START A constant which can be used with the truncate property of a EmbedTextDetails.
compartment_id [Required] Gets the compartment_id of this EmbedTextDetails.
input_type Gets the input_type of this EmbedTextDetails.
inputs [Required] Gets the inputs of this EmbedTextDetails.
is_echo Gets the is_echo of this EmbedTextDetails.
serving_mode [Required] Gets the serving_mode of this EmbedTextDetails.
truncate Gets the truncate of this EmbedTextDetails.

Methods

__init__(**kwargs) Initializes a new EmbedTextDetails object with values from keyword arguments.
INPUT_TYPE_CLASSIFICATION = 'CLASSIFICATION'

A constant which can be used with the input_type property of a EmbedTextDetails. This constant has a value of “CLASSIFICATION”

INPUT_TYPE_CLUSTERING = 'CLUSTERING'

A constant which can be used with the input_type property of a EmbedTextDetails. This constant has a value of “CLUSTERING”

INPUT_TYPE_SEARCH_DOCUMENT = 'SEARCH_DOCUMENT'

A constant which can be used with the input_type property of a EmbedTextDetails. This constant has a value of “SEARCH_DOCUMENT”

INPUT_TYPE_SEARCH_QUERY = 'SEARCH_QUERY'

A constant which can be used with the input_type property of a EmbedTextDetails. This constant has a value of “SEARCH_QUERY”

TRUNCATE_END = 'END'

A constant which can be used with the truncate property of a EmbedTextDetails. This constant has a value of “END”

TRUNCATE_NONE = 'NONE'

A constant which can be used with the truncate property of a EmbedTextDetails. This constant has a value of “NONE”

TRUNCATE_START = 'START'

A constant which can be used with the truncate property of a EmbedTextDetails. This constant has a value of “START”

__init__(**kwargs)

Initializes a new EmbedTextDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • inputs (list[str]) – The value to assign to the inputs property of this EmbedTextDetails.
  • serving_mode (oci.generative_ai_inference.models.ServingMode) – The value to assign to the serving_mode property of this EmbedTextDetails.
  • compartment_id (str) – The value to assign to the compartment_id property of this EmbedTextDetails.
  • is_echo (bool) – The value to assign to the is_echo property of this EmbedTextDetails.
  • truncate (str) – The value to assign to the truncate property of this EmbedTextDetails. Allowed values for this property are: “NONE”, “START”, “END”
  • input_type (str) – The value to assign to the input_type property of this EmbedTextDetails. Allowed values for this property are: “SEARCH_DOCUMENT”, “SEARCH_QUERY”, “CLASSIFICATION”, “CLUSTERING”
compartment_id

[Required] Gets the compartment_id of this EmbedTextDetails. The OCID of compartment that the user is authorized to use to call into the Generative AI service.

Returns:The compartment_id of this EmbedTextDetails.
Return type:str
input_type

Gets the input_type of this EmbedTextDetails. Specifies the input type.

Allowed values for this property are: “SEARCH_DOCUMENT”, “SEARCH_QUERY”, “CLASSIFICATION”, “CLUSTERING”

Returns:The input_type of this EmbedTextDetails.
Return type:str
inputs

[Required] Gets the inputs of this EmbedTextDetails. Provide a list of strings with a maximum number of 96 entries. Each string can be words, a phrase, or a paragraph. The maximum length of each string entry in the list is 512 tokens.

Returns:The inputs of this EmbedTextDetails.
Return type:list[str]
is_echo

Gets the is_echo of this EmbedTextDetails. Whether or not to include the original inputs in the response. Results are index-based.

Returns:The is_echo of this EmbedTextDetails.
Return type:bool
serving_mode

[Required] Gets the serving_mode of this EmbedTextDetails.

Returns:The serving_mode of this EmbedTextDetails.
Return type:oci.generative_ai_inference.models.ServingMode
truncate

Gets the truncate of this EmbedTextDetails. For an input that’s longer than the maximum token length, specifies which part of the input text will be truncated.

Allowed values for this property are: “NONE”, “START”, “END”

Returns:The truncate of this EmbedTextDetails.
Return type:str