SummarizeTextDetails

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

Bases: object

Details for the request to summarize text.

Attributes

EXTRACTIVENESS_AUTO A constant which can be used with the extractiveness property of a SummarizeTextDetails.
EXTRACTIVENESS_HIGH A constant which can be used with the extractiveness property of a SummarizeTextDetails.
EXTRACTIVENESS_LOW A constant which can be used with the extractiveness property of a SummarizeTextDetails.
EXTRACTIVENESS_MEDIUM A constant which can be used with the extractiveness property of a SummarizeTextDetails.
FORMAT_AUTO A constant which can be used with the format property of a SummarizeTextDetails.
FORMAT_BULLETS A constant which can be used with the format property of a SummarizeTextDetails.
FORMAT_PARAGRAPH A constant which can be used with the format property of a SummarizeTextDetails.
LENGTH_AUTO A constant which can be used with the length property of a SummarizeTextDetails.
LENGTH_LONG A constant which can be used with the length property of a SummarizeTextDetails.
LENGTH_MEDIUM A constant which can be used with the length property of a SummarizeTextDetails.
LENGTH_SHORT A constant which can be used with the length property of a SummarizeTextDetails.
additional_command Gets the additional_command of this SummarizeTextDetails.
compartment_id [Required] Gets the compartment_id of this SummarizeTextDetails.
extractiveness Gets the extractiveness of this SummarizeTextDetails.
format Gets the format of this SummarizeTextDetails.
input [Required] Gets the input of this SummarizeTextDetails.
is_echo Gets the is_echo of this SummarizeTextDetails.
length Gets the length of this SummarizeTextDetails.
serving_mode [Required] Gets the serving_mode of this SummarizeTextDetails.
temperature Gets the temperature of this SummarizeTextDetails.

Methods

__init__(**kwargs) Initializes a new SummarizeTextDetails object with values from keyword arguments.
EXTRACTIVENESS_AUTO = 'AUTO'

A constant which can be used with the extractiveness property of a SummarizeTextDetails. This constant has a value of “AUTO”

EXTRACTIVENESS_HIGH = 'HIGH'

A constant which can be used with the extractiveness property of a SummarizeTextDetails. This constant has a value of “HIGH”

EXTRACTIVENESS_LOW = 'LOW'

A constant which can be used with the extractiveness property of a SummarizeTextDetails. This constant has a value of “LOW”

EXTRACTIVENESS_MEDIUM = 'MEDIUM'

A constant which can be used with the extractiveness property of a SummarizeTextDetails. This constant has a value of “MEDIUM”

FORMAT_AUTO = 'AUTO'

A constant which can be used with the format property of a SummarizeTextDetails. This constant has a value of “AUTO”

FORMAT_BULLETS = 'BULLETS'

A constant which can be used with the format property of a SummarizeTextDetails. This constant has a value of “BULLETS”

FORMAT_PARAGRAPH = 'PARAGRAPH'

A constant which can be used with the format property of a SummarizeTextDetails. This constant has a value of “PARAGRAPH”

LENGTH_AUTO = 'AUTO'

A constant which can be used with the length property of a SummarizeTextDetails. This constant has a value of “AUTO”

LENGTH_LONG = 'LONG'

A constant which can be used with the length property of a SummarizeTextDetails. This constant has a value of “LONG”

LENGTH_MEDIUM = 'MEDIUM'

A constant which can be used with the length property of a SummarizeTextDetails. This constant has a value of “MEDIUM”

LENGTH_SHORT = 'SHORT'

A constant which can be used with the length property of a SummarizeTextDetails. This constant has a value of “SHORT”

__init__(**kwargs)

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

Parameters:
  • input (str) – The value to assign to the input property of this SummarizeTextDetails.
  • serving_mode (oci.generative_ai_inference.models.ServingMode) – The value to assign to the serving_mode property of this SummarizeTextDetails.
  • compartment_id (str) – The value to assign to the compartment_id property of this SummarizeTextDetails.
  • is_echo (bool) – The value to assign to the is_echo property of this SummarizeTextDetails.
  • temperature (float) – The value to assign to the temperature property of this SummarizeTextDetails.
  • additional_command (str) – The value to assign to the additional_command property of this SummarizeTextDetails.
  • length (str) – The value to assign to the length property of this SummarizeTextDetails. Allowed values for this property are: “SHORT”, “MEDIUM”, “LONG”, “AUTO”
  • format (str) – The value to assign to the format property of this SummarizeTextDetails. Allowed values for this property are: “PARAGRAPH”, “BULLETS”, “AUTO”
  • extractiveness (str) – The value to assign to the extractiveness property of this SummarizeTextDetails. Allowed values for this property are: “LOW”, “MEDIUM”, “HIGH”, “AUTO”
additional_command

Gets the additional_command of this SummarizeTextDetails. A free-form instruction for modifying how the summaries get generated. Should complete the sentence “Generate a summary _”. For example, “focusing on the next steps” or “written by Yoda”.

Returns:The additional_command of this SummarizeTextDetails.
Return type:str
compartment_id

[Required] Gets the compartment_id of this SummarizeTextDetails. The OCID of compartment in which to call the Generative AI service to summarize text.

Returns:The compartment_id of this SummarizeTextDetails.
Return type:str
extractiveness

Gets the extractiveness of this SummarizeTextDetails. Controls how close to the original text the summary is. High extractiveness summaries will lean towards reusing sentences verbatim, while low extractiveness summaries will tend to paraphrase more.

Allowed values for this property are: “LOW”, “MEDIUM”, “HIGH”, “AUTO”

Returns:The extractiveness of this SummarizeTextDetails.
Return type:str
format

Gets the format of this SummarizeTextDetails. Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If “AUTO” is selected, the best option will be picked based on the input text.

Allowed values for this property are: “PARAGRAPH”, “BULLETS”, “AUTO”

Returns:The format of this SummarizeTextDetails.
Return type:str
input

[Required] Gets the input of this SummarizeTextDetails. The input string to be summarized.

Returns:The input of this SummarizeTextDetails.
Return type:str
is_echo

Gets the is_echo of this SummarizeTextDetails. Whether or not to include the original inputs in the response.

Returns:The is_echo of this SummarizeTextDetails.
Return type:bool
length

Gets the length of this SummarizeTextDetails. Indicates the approximate length of the summary. If “AUTO” is selected, the best option will be picked based on the input text.

Allowed values for this property are: “SHORT”, “MEDIUM”, “LONG”, “AUTO”

Returns:The length of this SummarizeTextDetails.
Return type:str
serving_mode

[Required] Gets the serving_mode of this SummarizeTextDetails.

Returns:The serving_mode of this SummarizeTextDetails.
Return type:oci.generative_ai_inference.models.ServingMode
temperature

Gets the temperature of this SummarizeTextDetails. A number that sets the randomness of the generated output. Lower temperatures mean less random generations.

Use lower numbers for tasks with a correct answer such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0, and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs.

Returns:The temperature of this SummarizeTextDetails.
Return type:float