WebSearchOptions

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

Bases: object

Options for performing a web search to augment the response.

Attributes

SEARCH_CONTEXT_SIZE_HIGH A constant which can be used with the search_context_size property of a WebSearchOptions.
SEARCH_CONTEXT_SIZE_LOW A constant which can be used with the search_context_size property of a WebSearchOptions.
SEARCH_CONTEXT_SIZE_MEDIUM A constant which can be used with the search_context_size property of a WebSearchOptions.
search_context_size Gets the search_context_size of this WebSearchOptions.
user_location Gets the user_location of this WebSearchOptions.

Methods

__init__(**kwargs) Initializes a new WebSearchOptions object with values from keyword arguments.
SEARCH_CONTEXT_SIZE_HIGH = 'HIGH'

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

SEARCH_CONTEXT_SIZE_LOW = 'LOW'

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

SEARCH_CONTEXT_SIZE_MEDIUM = 'MEDIUM'

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

__init__(**kwargs)

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

Parameters:
  • search_context_size (str) – The value to assign to the search_context_size property of this WebSearchOptions. Allowed values for this property are: “HIGH”, “MEDIUM”, “LOW”
  • user_location (oci.generative_ai_inference.models.ApproximateLocation) – The value to assign to the user_location property of this WebSearchOptions.
search_context_size

Gets the search_context_size of this WebSearchOptions. Specifies the size of the web search context.

  • HIGH: Most comprehensive context, highest cost, slower response.
  • MEDIUM: Balanced context, cost, and latency.
  • LOW: Least context, lowest cost, fastest response, but potentially lower answer quality.

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

Returns:The search_context_size of this WebSearchOptions.
Return type:str
user_location

Gets the user_location of this WebSearchOptions.

Returns:The user_location of this WebSearchOptions.
Return type:oci.generative_ai_inference.models.ApproximateLocation