ChatCompletionsNamedToolChoice Class

A tool selection of a specific, named function tool that will limit chat completions to using the named function.

Readonly variables are only populated by the server, and will be ignored when sending a request.

Inheritance
azure.ai.inference._model_base.Model
ChatCompletionsNamedToolChoice

Constructor

ChatCompletionsNamedToolChoice(*args: Any, **kwargs: Any)

Variables

Name Description
type
str

The type of the tool. Currently, only function is supported. Required. Default value is "function".

function

The function that should be called. Required.

Methods

as_dict

Return a dict that can be turned into json using json.dump.

clear
copy
get
items
keys
pop
popitem
setdefault
update
values

as_dict

Return a dict that can be turned into json using json.dump.

as_dict(*, exclude_readonly: bool = False) -> Dict[str, Any]

Keyword-Only Parameters

Name Description
exclude_readonly

Whether to remove the readonly properties.

Returns

Type Description

A dict JSON compatible object

clear

clear() -> None

copy

copy() -> Model

get

get(key: str, default: Any = None) -> Any

Parameters

Name Description
key
Required
default
Required
Default value: None

items

items() -> ItemsView[str, Any]

keys

keys() -> KeysView[str]

pop

pop(key: str, default: ~typing.Any = <object object>) -> Any

Parameters

Name Description
key
Required
default
Required

popitem

popitem() -> Tuple[str, Any]

setdefault

setdefault(key: str, default: ~typing.Any = <object object>) -> Any

Parameters

Name Description
key
Required
default
Required

update

update(*args: Any, **kwargs: Any) -> None

values

values() -> ValuesView[Any]

Attributes

function

The function that should be called. Required.

function: _models.ChatCompletionsNamedToolChoiceFunction

type

The type of the tool. Currently, only function is supported. Required. Default value is "function".

type: Literal['function']