azure.ai.projects.models package

class azure.ai.projects.models.Agent(*args: Any, **kwargs: Any)[source]

Represents an agent that can call the model and use tools.

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

Variables:
  • id (str) – The identifier, which can be referenced in API endpoints. Required.

  • object (str) – The object type, which is always assistant. Required. Default value is “assistant”.

  • created_at (datetime) – The Unix timestamp, in seconds, representing when this object was created. Required.

  • name (str) – The name of the agent. Required.

  • description (str) – The description of the agent. Required.

  • model (str) – The ID of the model to use. Required.

  • instructions (str) – The system instructions for the agent to use. Required.

  • tools (list[ToolDefinition]) – The collection of tools enabled for the agent. Required.

  • tool_resources (ToolResources) – A set of resources that are used by the agent’s tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs. Required.

  • temperature (float) – What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Required.

  • top_p (float) –

    An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

    We generally recommend altering this or temperature but not both. Required.

  • response_format (str or str or AgentsApiResponseFormatMode or AgentsApiResponseFormat or ResponseFormatJsonSchemaType) – The response format of the tool calls used by this agent. Is one of the following types: str, Union[str, “_models.AgentsApiResponseFormatMode”], AgentsApiResponseFormat, ResponseFormatJsonSchemaType

  • metadata (dict[str, str]) – A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

created_at: datetime

The Unix timestamp, in seconds, representing when this object was created. Required.

description: str

The description of the agent. Required.

id: str

The identifier, which can be referenced in API endpoints. Required.

instructions: str

The system instructions for the agent to use. Required.

metadata: Dict[str, str]

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required.

model: str

The ID of the model to use. Required.

name: str

The name of the agent. Required.

object: Literal['assistant']

The object type, which is always assistant. Required. Default value is “assistant”.

response_format: _types.AgentsApiResponseFormatOption | None

str, Union[str, “_models.AgentsApiResponseFormatMode”], AgentsApiResponseFormat, ResponseFormatJsonSchemaType

Type:

The response format of the tool calls used by this agent. Is one of the following types

temperature: float

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Required.

tool_resources: _models.ToolResources

A set of resources that are used by the agent’s tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs. Required.

tools: List[_models.ToolDefinition]

The collection of tools enabled for the agent. Required.

top_p: float

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

We generally recommend altering this or temperature but not both. Required.

class azure.ai.projects.models.AgentDeletionStatus(*args: Any, **kwargs: Any)[source]

The status of an agent deletion operation.

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

Variables:
  • id (str) – The ID of the resource specified for deletion. Required.

  • deleted (bool) – A value indicating whether deletion was successful. Required.

  • object (str) – The object type, which is always ‘assistant.deleted’. Required. Default value is “assistant.deleted”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

deleted: bool

A value indicating whether deletion was successful. Required.

id: str

The ID of the resource specified for deletion. Required.

object: Literal['assistant.deleted']

The object type, which is always ‘assistant.deleted’. Required. Default value is “assistant.deleted”.

class azure.ai.projects.models.AgentEventHandler[source]
initialize(response_iterator: Iterator[bytes], submit_tool_outputs: Callable[[ThreadRun, BaseAgentEventHandler[T]], None]) None
on_done() EventFunctionReturnT | None[source]

Handle the completion of the stream.

on_error(data: str) EventFunctionReturnT | None[source]

Handle error events.

Parameters:

data (str) – The error event’s data.

Return type:

Optional[EventFunctionReturnT]

on_message_delta(delta: MessageDeltaChunk) EventFunctionReturnT | None[source]

Handle message delta events.

Parameters:

delta (MessageDeltaChunk) – The message delta.

Return type:

Optional[EventFunctionReturnT]

on_run_step(step: RunStep) EventFunctionReturnT | None[source]

Handle run step events.

Parameters:

step (RunStep) – The run step.

Return type:

Optional[EventFunctionReturnT]

on_run_step_delta(delta: RunStepDeltaChunk) EventFunctionReturnT | None[source]

Handle run step delta events.

Parameters:

delta (RunStepDeltaChunk) – The run step delta.

Return type:

Optional[EventFunctionReturnT]

on_thread_message(message: ThreadMessage) EventFunctionReturnT | None[source]

Handle thread message events.

Parameters:

message (ThreadMessage) – The thread message.

Return type:

Optional[EventFunctionReturnT]

on_thread_run(run: ThreadRun) EventFunctionReturnT | None[source]

Handle thread run events.

Parameters:

run (ThreadRun) – The thread run.

Return type:

Optional[EventFunctionReturnT]

on_unhandled_event(event_type: str, event_data: str) EventFunctionReturnT | None[source]

Handle any unhandled event types.

Parameters:
  • event_type (str) – The event type.

  • event_data (Any) – The event’s data.

until_done() None

Iterates through all events until the stream is marked as done. Calls the provided callback function with each event data.

class azure.ai.projects.models.AgentRunStream(response_iterator: Iterator[bytes], submit_tool_outputs: Callable[[ThreadRun, BaseAgentEventHandlerT], None], event_handler: BaseAgentEventHandlerT)[source]
class azure.ai.projects.models.AgentStreamEvent(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Each event in a server-sent events stream has an event and data property:

event: thread.created
data: {"id": "thread_123", "object": "thread", ...}

We emit events whenever a new object is created, transitions to a new state, or is being streamed in parts (deltas). For example, we emit thread.run.created when a new run is created, thread.run.completed when a run completes, and so on. When an Agent chooses to create a message during a run, we emit a thread.message.created event, a thread.message.in_progress event, many thread.message.delta events, and finally a thread.message.completed event.

We may add additional events over time, so we recommend handling unknown events gracefully in your code.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

DONE = 'done'

Event sent when the stream is done.

ERROR = 'error'

Event sent when an error occurs, such as an internal server error or a timeout.

THREAD_CREATED = 'thread.created'

Event sent when a new thread is created. The data of this event is of type AgentThread

THREAD_MESSAGE_COMPLETED = 'thread.message.completed'

Event sent when a message is completed. The data of this event is of type ThreadMessage

THREAD_MESSAGE_CREATED = 'thread.message.created'

Event sent when a new message is created. The data of this event is of type ThreadMessage

THREAD_MESSAGE_DELTA = 'thread.message.delta'

Event sent when a message is being streamed. The data of this event is of type MessageDeltaChunk

THREAD_MESSAGE_INCOMPLETE = 'thread.message.incomplete'

Event sent before a message is completed. The data of this event is of type ThreadMessage

THREAD_MESSAGE_IN_PROGRESS = 'thread.message.in_progress'

Event sent when a message moves to in_progress status. The data of this event is of type ThreadMessage

THREAD_RUN_CANCELLED = 'thread.run.cancelled'

Event sent when a run is cancelled. The data of this event is of type ThreadRun

THREAD_RUN_CANCELLING = 'thread.run.cancelling'

Event sent when a run moves to cancelling status. The data of this event is of type ThreadRun

THREAD_RUN_COMPLETED = 'thread.run.completed'

Event sent when a run is completed. The data of this event is of type ThreadRun

THREAD_RUN_CREATED = 'thread.run.created'

Event sent when a new run is created. The data of this event is of type ThreadRun

THREAD_RUN_EXPIRED = 'thread.run.expired'

Event sent when a run is expired. The data of this event is of type ThreadRun

THREAD_RUN_FAILED = 'thread.run.failed'

Event sent when a run fails. The data of this event is of type ThreadRun

THREAD_RUN_INCOMPLETE = 'thread.run.incomplete'

Event sent when a run ends incomplete. The data of this event is of type ThreadRun

THREAD_RUN_IN_PROGRESS = 'thread.run.in_progress'

Event sent when a run moves to in_progress status. The data of this event is of type ThreadRun

THREAD_RUN_QUEUED = 'thread.run.queued'

Event sent when a run moves to queued status. The data of this event is of type ThreadRun

THREAD_RUN_REQUIRES_ACTION = 'thread.run.requires_action'

Event sent when a run moves to requires_action status. The data of this event is of type ThreadRun

THREAD_RUN_STEP_CANCELLED = 'thread.run.step.cancelled'

Event sent when a run step is cancelled. The data of this event is of type RunStep

THREAD_RUN_STEP_COMPLETED = 'thread.run.step.completed'

Event sent when a run step is completed. The data of this event is of type RunStep

THREAD_RUN_STEP_CREATED = 'thread.run.step.created'

Event sent when a new thread run step is created. The data of this event is of type RunStep

THREAD_RUN_STEP_DELTA = 'thread.run.step.delta'

Event sent when a run step is being streamed. The data of this event is of type RunStepDeltaChunk

THREAD_RUN_STEP_EXPIRED = 'thread.run.step.expired'

Event sent when a run step is expired. The data of this event is of type RunStep

THREAD_RUN_STEP_FAILED = 'thread.run.step.failed'

Event sent when a run step fails. The data of this event is of type RunStep

THREAD_RUN_STEP_IN_PROGRESS = 'thread.run.step.in_progress'

Event sent when a run step moves to in_progress status. The data of this event is of type RunStep

class azure.ai.projects.models.AgentThread(*args: Any, **kwargs: Any)[source]

Information about a single thread associated with an agent.

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

Variables:
  • id (str) – The identifier, which can be referenced in API endpoints. Required.

  • object (str) – The object type, which is always ‘thread’. Required. Default value is “thread”.

  • created_at (datetime) – The Unix timestamp, in seconds, representing when this object was created. Required.

  • tool_resources (ToolResources) – A set of resources that are made available to the agent’s tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs. Required.

  • metadata (dict[str, str]) – A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

created_at: datetime

The Unix timestamp, in seconds, representing when this object was created. Required.

id: str

The identifier, which can be referenced in API endpoints. Required.

metadata: Dict[str, str]

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required.

object: Literal['thread']

The object type, which is always ‘thread’. Required. Default value is “thread”.

tool_resources: _models.ToolResources

A set of resources that are made available to the agent’s tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs. Required.

class azure.ai.projects.models.AgentThreadCreationOptions(*args: Any, **kwargs: Any)[source]

The details used to create a new agent thread.

Variables:
  • messages (list[ThreadMessageOptions]) – The initial messages to associate with the new thread.

  • tool_resources (ToolResources) – A set of resources that are made available to the agent’s tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

  • metadata (dict[str, str]) – A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

messages: List[_models.ThreadMessageOptions] | None

The initial messages to associate with the new thread.

metadata: Dict[str, str] | None

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

tool_resources: _models.ToolResources | None

A set of resources that are made available to the agent’s tools in this thread. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

class azure.ai.projects.models.AgentsApiResponseFormat(*args: Any, **kwargs: Any)[source]

An object describing the expected output of the model. If json_object only function type tools are allowed to be passed to the Run. If text the model can return text or any value needed.

Variables:

type (str or ResponseFormat) – Must be one of text or json_object. Known values are: “text” and “json_object”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: str | _models.ResponseFormat | None

“text” and “json_object”.

Type:

Must be one of text or json_object. Known values are

class azure.ai.projects.models.AgentsApiResponseFormatMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Represents the mode in which the model will handle the return format of a tool call.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AUTO = 'auto'

Default value. Let the model handle the return format.

NONE = 'none'

Setting the value to none, will result in a 400 Bad request.

class azure.ai.projects.models.AgentsApiToolChoiceOptionMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Specifies how the tool choice will be used.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AUTO = 'auto'

The model can pick between generating a message or calling a function.

NONE = 'none'

The model will not call a function and instead generates a message.

class azure.ai.projects.models.AgentsNamedToolChoice(*args: Any, **kwargs: Any)[source]

Specifies a tool the model should use. Use to force the model to call a specific tool.

Variables:
  • type (str or AgentsNamedToolChoiceType) – the type of tool. If type is function, the function name must be set. Required. Known values are: “function”, “code_interpreter”, “file_search”, “bing_grounding”, “fabric_aiskill”, “sharepoint_grounding”, and “azure_ai_search”.

  • function (FunctionName) – The name of the function to call.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

function: _models.FunctionName | None

The name of the function to call.

type: str | _models.AgentsNamedToolChoiceType

the type of tool. If type is function, the function name must be set. Required. Known values are: “function”, “code_interpreter”, “file_search”, “bing_grounding”, “fabric_aiskill”, “sharepoint_grounding”, and “azure_ai_search”.

class azure.ai.projects.models.AgentsNamedToolChoiceType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Available tool types for agents named tools.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

Tool type azure_ai_search

BING_GROUNDING = 'bing_grounding'

Tool type bing_grounding

CODE_INTERPRETER = 'code_interpreter'

Tool type code_interpreter

Tool type file_search

FUNCTION = 'function'

Tool type function

MICROSOFT_FABRIC = 'fabric_aiskill'

Tool type fabric_aiskill

SHAREPOINT = 'sharepoint_grounding'

Tool type sharepoint_grounding

class azure.ai.projects.models.ApplicationInsightsConfiguration(*args: Any, **kwargs: Any)[source]

Data Source for Application Insights.

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

Variables:
  • type (str) – Required. Default value is “app_insights”.

  • resource_id (str) – LogAnalytic Workspace resourceID associated with ApplicationInsights. Required.

  • query (str) – Query to fetch the data. Required.

  • service_name (str) – Service name.

  • connection_string (str) – Connection String to connect to ApplicationInsights.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

connection_string: str | None

Connection String to connect to ApplicationInsights.

query: str

Query to fetch the data. Required.

resource_id: str

LogAnalytic Workspace resourceID associated with ApplicationInsights. Required.

service_name: str | None

Service name.

type: Literal['app_insights']

Required. Default value is “app_insights”.

class azure.ai.projects.models.AsyncAgentEventHandler[source]
initialize(response_iterator: AsyncIterator[bytes], submit_tool_outputs: Callable[[ThreadRun, BaseAsyncAgentEventHandler[T]], Awaitable[None]])
async on_done() EventFunctionReturnT | None[source]

Handle the completion of the stream. :rtype: Optional[EventFunctionReturnT]

async on_error(data: str) EventFunctionReturnT | None[source]

Handle error events.

Parameters:

data (str) – The error event’s data.

Return type:

Optional[EventFunctionReturnT]

async on_message_delta(delta: MessageDeltaChunk) EventFunctionReturnT | None[source]

Handle message delta events.

Parameters:

delta (MessageDeltaChunk) – The message delta.

Return type:

Optional[EventFunctionReturnT]

async on_run_step(step: RunStep) EventFunctionReturnT | None[source]

Handle run step events.

Parameters:

step (RunStep) – The run step.

Return type:

Optional[EventFunctionReturnT]

async on_run_step_delta(delta: RunStepDeltaChunk) EventFunctionReturnT | None[source]

Handle run step delta events.

Parameters:

delta (RunStepDeltaChunk) – The run step delta.

Return type:

Optional[EventFunctionReturnT]

async on_thread_message(message: ThreadMessage) EventFunctionReturnT | None[source]

Handle thread message events.

Parameters:

message (ThreadMessage) – The thread message.

Return type:

Optional[EventFunctionReturnT]

async on_thread_run(run: ThreadRun) EventFunctionReturnT | None[source]

Handle thread run events.

Parameters:

run (ThreadRun) – The thread run.

Return type:

Optional[EventFunctionReturnT]

async on_unhandled_event(event_type: str, event_data: str) EventFunctionReturnT | None[source]

Handle any unhandled event types.

Parameters:
  • event_type (str) – The event type.

  • event_data (Any) – The event’s data.

Return type:

Optional[EventFunctionReturnT]

async until_done() None

Iterates through all events until the stream is marked as done. Calls the provided callback function with each event data.

class azure.ai.projects.models.AsyncAgentRunStream(response_iterator: AsyncIterator[bytes], submit_tool_outputs: Callable[[ThreadRun, BaseAsyncAgentEventHandlerT], Awaitable[None]], event_handler: BaseAsyncAgentEventHandlerT)[source]
class azure.ai.projects.models.AsyncFunctionTool(functions: Set[Callable[[...], Any]])[source]

Initialize FunctionTool with a set of functions.

Parameters:

functions – A set of function objects.

add_functions(extra_functions: Set[Callable[[...], Any]]) None

Add more functions into this FunctionTool’s existing function set. If a function with the same name already exists, it is overwritten.

Parameters:

extra_functions (Set[Callable[..., Any]]) – A set of additional functions to be added to the existing function set. Functions are defined as callables and may have any number of arguments and return types.

async execute(tool_call: RequiredFunctionToolCall) Any[source]

Execute the tool with the provided tool call.

Parameters:

tool_call (Any) – The tool call to execute.

Returns:

The output of the tool operations.

property definitions: List[FunctionToolDefinition]

Get the function definitions.

Returns:

A list of function definitions.

Return type:

List[ToolDefinition]

property resources: ToolResources

Get the tool resources for the agent.

Returns:

An empty ToolResources as FunctionTool doesn’t have specific resources.

Return type:

ToolResources

class azure.ai.projects.models.AsyncToolSet[source]

A collection of tools that can be used by an asynchronous agent.

add(tool: Tool)

Add a tool to the tool set.

Parameters:

tool (Tool) – The tool to add.

Raises:

ValueError – If a tool of the same type already exists.

async execute_tool_calls(tool_calls: List[Any]) Any[source]

Execute a tool of the specified type with the provided tool calls.

Parameters:

tool_calls (List[Any]) – A list of tool calls to execute.

Returns:

The output of the tool operations.

Return type:

Any

get_definitions_and_resources() Dict[str, Any]

Get the definitions and resources for all tools in the tool set.

Returns:

A dictionary containing the tool resources and definitions.

Return type:

Dict[str, Any]

get_tool(tool_type: Type[ToolT]) ToolT

Get a tool of the specified type from the tool set.

Parameters:

tool_type (Type[Tool]) – The type of tool to get.

Returns:

The tool of the specified type.

Return type:

Tool

Raises:

ValueError – If a tool of the specified type is not found.

remove(tool_type: Type[Tool]) None

Remove a tool of the specified type from the tool set.

Parameters:

tool_type (Type[Tool]) – The type of tool to remove.

Raises:

ValueError – If a tool of the specified type is not found.

validate_tool_type(tool: Tool) None[source]

Validate the type of the tool.

Parameters:

tool (Tool) – The type of the tool to validate.

Raises:

ValueError – If the tool type is not a subclass of Tool.

property definitions: List[ToolDefinition]

Get the definitions for all tools in the tool set.

Return type:

List[ToolDefinition]

property resources: ToolResources

Get the resources for all tools in the tool set.

Return type:

ToolResources

class azure.ai.projects.models.AuthenticationType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Authentication type used by Azure AI service to connect to another service.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

API_KEY = 'ApiKey'

API Key authentication

ENTRA_ID = 'AAD'

Entra ID authentication (formerly known as AAD)

NONE = 'None'

No authentication

SAS = 'SAS'

Shared Access Signature (SAS) authentication

class azure.ai.projects.models.AzureAISearchResource(*args: Any, **kwargs: Any)[source]

A set of index resources used by the azure_ai_search tool.

Variables:

index_list (list[IndexResource]) – The indices attached to this agent. There can be a maximum of 1 index resource attached to the agent.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

index_list: List[_models.IndexResource] | None

The indices attached to this agent. There can be a maximum of 1 index resource attached to the agent.

class azure.ai.projects.models.AzureAISearchTool(index_connection_id: str, index_name: str)[source]

A tool that searches for information using Azure AI Search.

execute(tool_call: Any)[source]

AI Search tool does not execute client-side.

Parameters:

tool_call (Any) – The tool call to execute.

property definitions: List[AzureAISearchToolDefinition]

Get the Azure AI search tool definitions.

Returns:

A list of tool definitions.

Return type:

List[ToolDefinition]

property resources: ToolResources

Get the Azure AI search resources.

Returns:

ToolResources populated with azure_ai_search associated resources.

Return type:

ToolResources

class azure.ai.projects.models.AzureAISearchToolDefinition(*args: Any, **kwargs: Any)[source]

The input definition information for an Azure AI search tool as used to configure an agent.

Variables:

type (str) – The object type, which is always ‘azure_ai_search’. Required. Default value is “azure_ai_search”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: Literal['azure_ai_search']

The object type, which is always ‘azure_ai_search’. Required. Default value is “azure_ai_search”.

class azure.ai.projects.models.AzureFunctionBinding(*args: Any, **kwargs: Any)[source]

The structure for keeping storage queue name and URI.

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

Variables:
  • type (str) – The type of binding, which is always ‘storage_queue’. Required. Default value is “storage_queue”.

  • storage_queue (AzureFunctionStorageQueue) – Storage queue. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

storage_queue: _models.AzureFunctionStorageQueue

Storage queue. Required.

type: Literal['storage_queue']

The type of binding, which is always ‘storage_queue’. Required. Default value is “storage_queue”.

class azure.ai.projects.models.AzureFunctionDefinition(*args: Any, **kwargs: Any)[source]

The definition of Azure function.

Variables:
  • function (FunctionDefinition) – The definition of azure function and its parameters. Required.

  • input_binding (AzureFunctionBinding) – Input storage queue. The queue storage trigger runs a function as messages are added to it. Required.

  • output_binding (AzureFunctionBinding) – Output storage queue. The function writes output to this queue when the input items are processed. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

function: _models.FunctionDefinition

The definition of azure function and its parameters. Required.

input_binding: _models.AzureFunctionBinding

Input storage queue. The queue storage trigger runs a function as messages are added to it. Required.

output_binding: _models.AzureFunctionBinding

Output storage queue. The function writes output to this queue when the input items are processed. Required.

class azure.ai.projects.models.AzureFunctionStorageQueue(*args: Any, **kwargs: Any)[source]

The structure for keeping storage queue name and URI.

Variables:
  • storage_service_endpoint (str) – URI to the Azure Storage Queue service allowing you to manipulate a queue. Required.

  • queue_name (str) – The name of an Azure function storage queue. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

queue_name: str

The name of an Azure function storage queue. Required.

storage_service_endpoint: str

URI to the Azure Storage Queue service allowing you to manipulate a queue. Required.

class azure.ai.projects.models.AzureFunctionTool(name: str, description: str, parameters: Dict[str, Any], input_queue: AzureFunctionStorageQueue, output_queue: AzureFunctionStorageQueue)[source]

A tool that is used to inform agent about available the Azure function.

Parameters:
  • name – The azure function name.

  • description – The azure function description.

  • parameters – The description of function parameters.

  • input_queue – Input queue used, by azure function.

  • output_queue – Output queue used, by azure function.

execute(tool_call: Any) Any[source]

Execute the tool with the provided tool call.

Parameters:

tool_call (Any) – The tool call to execute.

Returns:

The output of the tool operations.

property definitions: List[AzureFunctionToolDefinition]

Get the Azure AI search tool definitions.

Return type:

List[ToolDefinition]

property resources: ToolResources

Get the Azure AI search resources.

Return type:

ToolResources

class azure.ai.projects.models.AzureFunctionToolDefinition(*args: Any, **kwargs: Any)[source]

The input definition information for a azure function tool as used to configure an agent.

Variables:
  • type (str) – The object type, which is always ‘azure_function’. Required. Default value is “azure_function”.

  • azure_function (AzureFunctionDefinition) – The definition of the concrete function that the function tool should call. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

azure_function: _models.AzureFunctionDefinition

The definition of the concrete function that the function tool should call. Required.

type: Literal['azure_function']

The object type, which is always ‘azure_function’. Required. Default value is “azure_function”.

class azure.ai.projects.models.BaseAgentEventHandler[source]
initialize(response_iterator: Iterator[bytes], submit_tool_outputs: Callable[[ThreadRun, BaseAgentEventHandler[T]], None]) None[source]
until_done() None[source]

Iterates through all events until the stream is marked as done. Calls the provided callback function with each event data.

class azure.ai.projects.models.BaseAsyncAgentEventHandler[source]
initialize(response_iterator: AsyncIterator[bytes], submit_tool_outputs: Callable[[ThreadRun, BaseAsyncAgentEventHandler[T]], Awaitable[None]])[source]
async until_done() None[source]

Iterates through all events until the stream is marked as done. Calls the provided callback function with each event data.

class azure.ai.projects.models.BingGroundingTool(connection_id: str)[source]

A tool that searches for information using Bing.

Initialize ConnectionTool with a connection_id.

Parameters:

connection_id – Connection ID used by tool. All connection tools allow only one connection.

execute(tool_call: Any) Any

Execute the tool with the provided tool call.

Parameters:

tool_call (Any) – The tool call to execute.

Returns:

The output of the tool operations.

property definitions: List[BingGroundingToolDefinition]

Get the Bing grounding tool definitions.

Return type:

List[ToolDefinition]

property resources: ToolResources

Get the connection tool resources.

Return type:

ToolResources

class azure.ai.projects.models.BingGroundingToolDefinition(*args: Any, **kwargs: Any)[source]

The input definition information for a bing grounding search tool as used to configure an agent.

Variables:
  • type (str) – The object type, which is always ‘bing_grounding’. Required. Default value is “bing_grounding”.

  • bing_grounding (ToolConnectionList) – The list of connections used by the bing grounding tool. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

bing_grounding: _models.ToolConnectionList

The list of connections used by the bing grounding tool. Required.

type: Literal['bing_grounding']

The object type, which is always ‘bing_grounding’. Required. Default value is “bing_grounding”.

class azure.ai.projects.models.CodeInterpreterTool(file_ids: List[str] | None = None)[source]

A tool that interprets code files uploaded to the agent.

Parameters:

file_ids (list[str]) – A list of file IDs to interpret.

add_file(file_id: str) None[source]

Add a file ID to the list of files to interpret.

Parameters:

file_id (str) – The ID of the file to interpret.

execute(tool_call: Any) Any[source]

Execute the tool with the provided tool call.

Parameters:

tool_call (Any) – The tool call to execute.

Returns:

The output of the tool operations.

remove_file(file_id: str) None[source]

Remove a file ID from the list of files to interpret.

Parameters:

file_id (str) – The ID of the file to remove.

property definitions: List[CodeInterpreterToolDefinition]

Get the code interpreter tool definitions.

Return type:

List[ToolDefinition]

property resources: ToolResources

Get the code interpreter resources.

Return type:

ToolResources

class azure.ai.projects.models.CodeInterpreterToolDefinition(*args: Any, **kwargs: Any)[source]

The input definition information for a code interpreter tool as used to configure an agent.

Variables:

type (str) – The object type, which is always ‘code_interpreter’. Required. Default value is “code_interpreter”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: Literal['code_interpreter']

The object type, which is always ‘code_interpreter’. Required. Default value is “code_interpreter”.

class azure.ai.projects.models.CodeInterpreterToolResource(*args: Any, **kwargs: Any)[source]

A set of resources that are used by the code_interpreter tool.

Variables:
  • file_ids (list[str]) – A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.

  • data_sources (list[VectorStoreDataSource]) – The data sources to be used. This option is mutually exclusive with the fileIds property.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data_sources: List[_models.VectorStoreDataSource] | None

The data sources to be used. This option is mutually exclusive with the fileIds property.

file_ids: List[str] | None

A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.

class azure.ai.projects.models.ConnectionProperties(*, connection: GetConnectionResponse, token_credential: TokenCredential | AsyncTokenCredential | None = None)[source]

The properties of a single connection.

Variables:
  • id (str) – A unique identifier for the connection.

  • name (str) – The friendly name of the connection.

  • authentication_type (AuthenticationType) – The authentication type used by the connection.

  • connection_type (ConnectionType) – The connection type .

  • endpoint_url (str) – The endpoint URL associated with this connection

  • key (str) – The api-key to be used when accessing the connection.

  • token_credential (TokenCredential) – The TokenCredential to be used when accessing the connection.

to_evaluator_model_config(deployment_name: str, api_version: str, *, include_credentials: bool = False) Dict[str, str][source]

Get model configuration to be used with evaluators, from connection.

Parameters:
  • deployment_name (str) – Deployment name to build model configuration.

  • api_version (str) – API version used by model deployment.

Keyword Arguments:

include_credentials (bool) – Include credentials in the model configuration. If set to True, the model configuration will have the key field set to the actual key value. If set to False, the model configuration will have the key field set to the connection id. To get the secret, connection.get method should be called with include_credentials set to True.

Returns:

Model configuration dictionary.

Return type:

Dict[str, str]

class azure.ai.projects.models.ConnectionType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The Type (or category) of the connection.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

Azure AI Search

AZURE_AI_SERVICES = 'AIServices'

Azure AI Services

AZURE_BLOB_STORAGE = 'AzureBlob'

Azure Blob Storage

AZURE_OPEN_AI = 'AzureOpenAI'

Azure OpenAI Service

SERVERLESS = 'Serverless'

Serverless API Service

class azure.ai.projects.models.CronTrigger(*args: Any, **kwargs: Any)[source]

Cron Trigger Definition.

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

Variables:
  • type (str) – Required. Default value is “Cron”.

  • expression (str) – Cron expression for the trigger. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

expression: str

Cron expression for the trigger. Required.

type: Literal['Cron']

Required. Default value is “Cron”.

class azure.ai.projects.models.Dataset(*args: Any, **kwargs: Any)[source]

Dataset as source for evaluation.

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

Variables:
  • type (str) – Required. Default value is “dataset”.

  • id (str) – Evaluation input data. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

id: str

Evaluation input data. Required.

type: Literal['dataset']

Required. Default value is “dataset”.

class azure.ai.projects.models.DoneEvent(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Terminal event indicating the successful end of a stream.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

DONE = 'done'

Event sent when the stream is done.

class azure.ai.projects.models.ErrorEvent(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Terminal event indicating a server side error while streaming.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ERROR = 'error'

Event sent when an error occurs, such as an internal server error or a timeout.

class azure.ai.projects.models.Evaluation(*args: Any, **kwargs: Any)[source]

Evaluation Definition.

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

Variables:
  • id (str) – Identifier of the evaluation. Required.

  • data (InputData) – Data for evaluation. Required.

  • display_name (str) – Display Name for evaluation. It helps to find the evaluation easily in AI Foundry. It does not need to be unique.

  • description (str) – Description of the evaluation. It can be used to store additional information about the evaluation and is mutable.

  • system_data (SystemData) – Metadata containing createdBy and modifiedBy information.

  • status (str) – Status of the evaluation. It is set by service and is read-only.

  • tags (dict[str, str]) – Evaluation’s tags. Unlike properties, tags are fully mutable.

  • properties (dict[str, str]) – Evaluation’s properties. Unlike tags, properties are add-only. Once added, a property cannot be removed.

  • evaluators (dict[str, EvaluatorConfiguration]) – Evaluators to be used for the evaluation. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data: _models.InputData

Data for evaluation. Required.

description: str | None

Description of the evaluation. It can be used to store additional information about the evaluation and is mutable.

display_name: str | None

Display Name for evaluation. It helps to find the evaluation easily in AI Foundry. It does not need to be unique.

evaluators: Dict[str, _models.EvaluatorConfiguration]

Evaluators to be used for the evaluation. Required.

id: str

Identifier of the evaluation. Required.

properties: Dict[str, str] | None

Evaluation’s properties. Unlike tags, properties are add-only. Once added, a property cannot be removed.

status: str | None

Status of the evaluation. It is set by service and is read-only.

system_data: _models.SystemData | None

Metadata containing createdBy and modifiedBy information.

tags: Dict[str, str] | None

Evaluation’s tags. Unlike properties, tags are fully mutable.

class azure.ai.projects.models.EvaluationSchedule(*args: Any, **kwargs: Any)[source]

Evaluation Schedule Definition.

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

Variables:
  • name (str) – Name of the schedule, which also serves as the unique identifier for the evaluation. Required.

  • data (ApplicationInsightsConfiguration) – Data for evaluation. Required.

  • description (str) – Description of the evaluation. It can be used to store additional information about the evaluation and is mutable.

  • system_data (SystemData) – Metadata containing createdBy and modifiedBy information.

  • provisioning_state (str) – Provisioning State of the evaluation. It is set by service and is read-only.

  • tags (dict[str, str]) – Evaluation’s tags. Unlike properties, tags are fully mutable.

  • properties (dict[str, str]) – Evaluation’s properties. Unlike tags, properties are add-only. Once added, a property cannot be removed.

  • is_enabled (str) – Enabled status of the evaluation. It is set by service and is read-only.

  • evaluators (dict[str, EvaluatorConfiguration]) – Evaluators to be used for the evaluation. Required.

  • trigger (Trigger) – Trigger for the evaluation. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data: _models.ApplicationInsightsConfiguration

Data for evaluation. Required.

description: str | None

Description of the evaluation. It can be used to store additional information about the evaluation and is mutable.

evaluators: Dict[str, _models.EvaluatorConfiguration]

Evaluators to be used for the evaluation. Required.

is_enabled: str | None

Enabled status of the evaluation. It is set by service and is read-only.

name: str

Name of the schedule, which also serves as the unique identifier for the evaluation. Required.

properties: Dict[str, str] | None

Evaluation’s properties. Unlike tags, properties are add-only. Once added, a property cannot be removed.

provisioning_state: str | None

Provisioning State of the evaluation. It is set by service and is read-only.

system_data: _models.SystemData | None

Metadata containing createdBy and modifiedBy information.

tags: Dict[str, str] | None

Evaluation’s tags. Unlike properties, tags are fully mutable.

trigger: _models.Trigger

Trigger for the evaluation. Required.

class azure.ai.projects.models.EvaluatorConfiguration(*args: Any, **kwargs: Any)[source]

Evaluator Configuration.

Variables:
  • id (str) – Identifier of the evaluator. Required.

  • init_params (dict[str, any]) – Initialization parameters of the evaluator.

  • data_mapping (dict[str, str]) – Data parameters of the evaluator.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data_mapping: Dict[str, str] | None

Data parameters of the evaluator.

id: str

Identifier of the evaluator. Required.

init_params: Dict[str, Any] | None

Initialization parameters of the evaluator.

class azure.ai.projects.models.FabricTool(connection_id: str)[source]

A tool that searches for information using Microsoft Fabric.

Initialize ConnectionTool with a connection_id.

Parameters:

connection_id – Connection ID used by tool. All connection tools allow only one connection.

execute(tool_call: Any) Any

Execute the tool with the provided tool call.

Parameters:

tool_call (Any) – The tool call to execute.

Returns:

The output of the tool operations.

property definitions: List[MicrosoftFabricToolDefinition]

Get the Microsoft Fabric tool definitions.

Return type:

List[ToolDefinition]

property resources: ToolResources

Get the connection tool resources.

Return type:

ToolResources

class azure.ai.projects.models.FileDeletionStatus(*args: Any, **kwargs: Any)[source]

A status response from a file deletion operation.

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

Variables:
  • id (str) – The ID of the resource specified for deletion. Required.

  • deleted (bool) – A value indicating whether deletion was successful. Required.

  • object (str) – The object type, which is always ‘file’. Required. Default value is “file”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

deleted: bool

A value indicating whether deletion was successful. Required.

id: str

The ID of the resource specified for deletion. Required.

object: Literal['file']

The object type, which is always ‘file’. Required. Default value is “file”.

class azure.ai.projects.models.FileListResponse(*args: Any, **kwargs: Any)[source]

The response data from a file list operation.

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

Variables:
  • object (str) – The object type, which is always ‘list’. Required. Default value is “list”.

  • data (list[OpenAIFile]) – The files returned for the request. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data: List[_models.OpenAIFile]

The files returned for the request. Required.

object: Literal['list']

The object type, which is always ‘list’. Required. Default value is “list”.

class azure.ai.projects.models.FilePurpose(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible values denoting the intended usage of a file.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AGENTS = 'assistants'

Indicates a file is used as input to agents.

AGENTS_OUTPUT = 'assistants_output'

Indicates a file is used as output by agents.

BATCH = 'batch'

Indicates a file is used as input to .

BATCH_OUTPUT = 'batch_output'

Indicates a file is used as output by a vector store batch operation.

FINE_TUNE = 'fine-tune'

Indicates a file is used for fine tuning input.

FINE_TUNE_RESULTS = 'fine-tune-results'

Indicates a file is used for fine tuning results.

VISION = 'vision'

Indicates a file is used as input to a vision operation.

class azure.ai.projects.models.FileSearchRankingOptions(*args: Any, **kwargs: Any)[source]

Ranking options for file search.

Variables:
  • ranker (str) – File search ranker. Required.

  • score_threshold (float) – Ranker search threshold. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

ranker: str

File search ranker. Required.

score_threshold: float

Ranker search threshold. Required.

class azure.ai.projects.models.FileSearchTool(vector_store_ids: List[str] | None = None)[source]

A tool that searches for uploaded file information from the created vector stores.

Parameters:

vector_store_ids (list[str]) – A list of vector store IDs to search for files.

add_vector_store(store_id: str) None[source]

Add a vector store ID to the list of vector stores to search for files.

Parameters:

store_id (str) – The ID of the vector store to search for files.

execute(tool_call: Any) Any[source]

Execute the tool with the provided tool call.

Parameters:

tool_call (Any) – The tool call to execute.

Returns:

The output of the tool operations.

remove_vector_store(store_id: str) None[source]

Remove a vector store ID from the list of vector stores to search for files.

Parameters:

store_id (str) – The ID of the vector store to remove.

property definitions: List[FileSearchToolDefinition]

Get the file search tool definitions.

Return type:

List[ToolDefinition]

property resources: ToolResources

Get the file search resources.

Return type:

ToolResources

class azure.ai.projects.models.FileSearchToolCallContent(*args: Any, **kwargs: Any)[source]

The file search result content object.

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

Variables:
  • type (str) – The type of the content. Required. Default value is “text”.

  • text (str) – The text content of the file. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

text: str

The text content of the file. Required.

type: Literal['text']

The type of the content. Required. Default value is “text”.

class azure.ai.projects.models.FileSearchToolDefinition(*args: Any, **kwargs: Any)[source]

The input definition information for a file search tool as used to configure an agent.

Variables:
  • type (str) – The object type, which is always ‘file_search’. Required. Default value is “file_search”.

  • file_search (FileSearchToolDefinitionDetails) – Options overrides for the file search tool.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

Options overrides for the file search tool.

type: Literal['file_search']

The object type, which is always ‘file_search’. Required. Default value is “file_search”.

class azure.ai.projects.models.FileSearchToolDefinitionDetails(*args: Any, **kwargs: Any)[source]

Options overrides for the file search tool.

Variables:
  • max_num_results (int) –

    The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive.

    Note that the file search tool may output fewer than max_num_results results. See the file search tool documentation for more information.

  • ranking_options (FileSearchRankingOptions) – Ranking options for file search.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

max_num_results: int | None

The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive.

Note that the file search tool may output fewer than max_num_results results. See the file search tool documentation for more information.

ranking_options: _models.FileSearchRankingOptions | None

Ranking options for file search.

class azure.ai.projects.models.FileSearchToolResource(*args: Any, **kwargs: Any)[source]

A set of resources that are used by the file_search tool.

Variables:
  • vector_store_ids (list[str]) – The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.

  • vector_stores (list[VectorStoreConfigurations]) – The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

vector_store_ids: List[str] | None

The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.

vector_stores: List[_models.VectorStoreConfigurations] | None

The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool.

class azure.ai.projects.models.FileState(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The state of the file.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

DELETED = 'deleted'

The entity has been deleted but may still be referenced by other entities predating the deletion. It can be categorized as a terminal state.

DELETING = 'deleting'

The entity is in the process to be deleted. This state is not returned by Azure OpenAI and exposed only for compatibility. It can be categorized as an active state.

ERROR = 'error'

The operation has completed processing with a failure and cannot be further consumed. It can be categorized as a terminal state.

PENDING = 'pending'

The operation was created and is not queued to be processed in the future. It can be categorized as an inactive state.

PROCESSED = 'processed'

The operation has successfully processed and is ready for consumption. It can be categorized as a terminal state.

RUNNING = 'running'

The operation has started to be processed. It can be categorized as an active state.

UPLOADED = 'uploaded'

The file has been uploaded but it’s not yet processed. This state is not returned by Azure OpenAI and exposed only for compatibility. It can be categorized as an inactive state.

class azure.ai.projects.models.Frequency(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Frequency of the schedule - day, week, month, hour, minute.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

DAY = 'Day'
HOUR = 'Hour'
MINUTE = 'Minute'
MONTH = 'Month'
WEEK = 'Week'
class azure.ai.projects.models.FunctionDefinition(*args: Any, **kwargs: Any)[source]

The input definition information for a function.

Variables:
  • name (str) – The name of the function to be called. Required.

  • description (str) – A description of what the function does, used by the model to choose when and how to call the function.

  • parameters (any) – The parameters the functions accepts, described as a JSON Schema object. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

description: str | None

A description of what the function does, used by the model to choose when and how to call the function.

name: str

The name of the function to be called. Required.

parameters: Any

The parameters the functions accepts, described as a JSON Schema object. Required.

class azure.ai.projects.models.FunctionName(*args: Any, **kwargs: Any)[source]

The function name that will be used, if using the function tool.

Variables:

name (str) – The name of the function to call. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

name: str

The name of the function to call. Required.

class azure.ai.projects.models.FunctionTool(functions: Set[Callable[[...], Any]])[source]

Initialize FunctionTool with a set of functions.

Parameters:

functions – A set of function objects.

add_functions(extra_functions: Set[Callable[[...], Any]]) None

Add more functions into this FunctionTool’s existing function set. If a function with the same name already exists, it is overwritten.

Parameters:

extra_functions (Set[Callable[..., Any]]) – A set of additional functions to be added to the existing function set. Functions are defined as callables and may have any number of arguments and return types.

execute(tool_call: RequiredFunctionToolCall) Any[source]

Execute the tool with the provided tool call.

Parameters:

tool_call (Any) – The tool call to execute.

Returns:

The output of the tool operations.

property definitions: List[FunctionToolDefinition]

Get the function definitions.

Returns:

A list of function definitions.

Return type:

List[ToolDefinition]

property resources: ToolResources

Get the tool resources for the agent.

Returns:

An empty ToolResources as FunctionTool doesn’t have specific resources.

Return type:

ToolResources

class azure.ai.projects.models.FunctionToolDefinition(*args: Any, **kwargs: Any)[source]

The input definition information for a function tool as used to configure an agent.

Variables:
  • type (str) – The object type, which is always ‘function’. Required. Default value is “function”.

  • function (FunctionDefinition) – The definition of the concrete function that the function tool should call. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

function: _models.FunctionDefinition

The definition of the concrete function that the function tool should call. Required.

type: Literal['function']

The object type, which is always ‘function’. Required. Default value is “function”.

class azure.ai.projects.models.IncompleteDetailsReason(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

MAX_COMPLETION_TOKENS = 'max_completion_tokens'

Maximum completion tokens exceeded

MAX_PROMPT_TOKENS = 'max_prompt_tokens'

Maximum prompt tokens exceeded

class azure.ai.projects.models.IncompleteRunDetails(*args: Any, **kwargs: Any)[source]

Details on why the run is incomplete. Will be null if the run is not incomplete.

Variables:

reason (str or IncompleteDetailsReason) – The reason why the run is incomplete. This indicates which specific token limit was reached during the run. Required. Known values are: “max_completion_tokens” and “max_prompt_tokens”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

reason: str | _models.IncompleteDetailsReason

The reason why the run is incomplete. This indicates which specific token limit was reached during the run. Required. Known values are: “max_completion_tokens” and “max_prompt_tokens”.

class azure.ai.projects.models.IndexResource(*args: Any, **kwargs: Any)[source]

A Index resource.

Variables:
  • index_connection_id (str) – An index connection id in an IndexResource attached to this agent. Required.

  • index_name (str) – The name of an index in an IndexResource attached to this agent. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

index_connection_id: str

An index connection id in an IndexResource attached to this agent. Required.

index_name: str

The name of an index in an IndexResource attached to this agent. Required.

class azure.ai.projects.models.InputData(*args: Any, **kwargs: Any)[source]

Abstract data class for input data configuration.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ApplicationInsightsConfiguration, Dataset

Variables:

type (str) – Type of the data. Required. Default value is None.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: str

Type of the data. Required. Default value is None.

class azure.ai.projects.models.ListSortOrder(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The available sorting options when requesting a list of response objects.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ASCENDING = 'asc'

Specifies an ascending sort order.

DESCENDING = 'desc'

Specifies a descending sort order.

class azure.ai.projects.models.MessageAttachment(*args: Any, **kwargs: Any)[source]
as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data_source: '_models.VectorStoreDataSource' | None

Azure asset ID.

file_id: str | None

The ID of the file to attach to the message.

tools: List['_types.MessageAttachmentToolDefinition']

The tools to add to this file. Required.

class azure.ai.projects.models.MessageContent(*args: Any, **kwargs: Any)[source]

An abstract representation of a single item of thread message content.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: MessageImageFileContent, MessageTextContent

Variables:

type (str) – The object type. Required. Default value is None.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: str

The object type. Required. Default value is None.

class azure.ai.projects.models.MessageDelta(*args: Any, **kwargs: Any)[source]

Represents the typed ‘delta’ payload within a streaming message delta chunk.

Variables:
  • role (str or MessageRole) – The entity that produced the message. Required. Known values are: “user” and “assistant”.

  • content (list[MessageDeltaContent]) – The content of the message as an array of text and/or images. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

content: List[_models.MessageDeltaContent]

The content of the message as an array of text and/or images. Required.

role: str | _models.MessageRole

“user” and “assistant”.

Type:

The entity that produced the message. Required. Known values are

class azure.ai.projects.models.MessageDeltaChunk(*args: Any, **kwargs: Any)[source]
as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

delta: _models.MessageDelta

The delta containing the fields that have changed on the Message. Required.

id: str

The identifier of the message, which can be referenced in API endpoints. Required.

object: Literal['thread.message.delta']

The object type, which is always thread.message.delta. Required. Default value is “thread.message.delta”.

property text: str

Get the text content of the delta chunk.

Return type:

str

class azure.ai.projects.models.MessageDeltaContent(*args: Any, **kwargs: Any)[source]

The abstract base representation of a partial streamed message content payload.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: MessageDeltaImageFileContent, MessageDeltaTextContent

Variables:
  • index (int) – The index of the content part of the message. Required.

  • type (str) – The type of content for this content part. Required. Default value is None.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

index: int

The index of the content part of the message. Required.

type: str

The type of content for this content part. Required. Default value is None.

class azure.ai.projects.models.MessageDeltaImageFileContent(*args: Any, **kwargs: Any)[source]

Represents a streamed image file content part within a streaming message delta chunk.

Variables:
  • index (int) – The index of the content part of the message. Required.

  • type (str) – The type of content for this content part, which is always “image_file.”. Required. Default value is “image_file”.

  • image_file (MessageDeltaImageFileContentObject) – The image_file data.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

image_file: _models.MessageDeltaImageFileContentObject | None

The image_file data.

index: int

The index of the content part of the message. Required.

type: Literal['image_file']

The type of content for this content part, which is always “image_file.”. Required. Default value is “image_file”.

class azure.ai.projects.models.MessageDeltaImageFileContentObject(*args: Any, **kwargs: Any)[source]

Represents the ‘image_file’ payload within streaming image file content.

Variables:

file_id (str) – The file ID of the image in the message content.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

file_id: str | None

The file ID of the image in the message content.

class azure.ai.projects.models.MessageDeltaTextAnnotation(*args: Any, **kwargs: Any)[source]

The abstract base representation of a streamed text content part’s text annotation.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: MessageDeltaTextFileCitationAnnotation, MessageDeltaTextFilePathAnnotation

Variables:
  • index (int) – The index of the annotation within a text content part. Required.

  • type (str) – The type of the text content annotation. Required. Default value is None.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

index: int

The index of the annotation within a text content part. Required.

type: str

The type of the text content annotation. Required. Default value is None.

class azure.ai.projects.models.MessageDeltaTextContent(*args: Any, **kwargs: Any)[source]

Represents a streamed text content part within a streaming message delta chunk.

Variables:
  • index (int) – The index of the content part of the message. Required.

  • type (str) – The type of content for this content part, which is always “text.”. Required. Default value is “text”.

  • text (MessageDeltaTextContentObject) – The text content details.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

index: int

The index of the content part of the message. Required.

text: _models.MessageDeltaTextContentObject | None

The text content details.

type: Literal['text']

The type of content for this content part, which is always “text.”. Required. Default value is “text”.

class azure.ai.projects.models.MessageDeltaTextContentObject(*args: Any, **kwargs: Any)[source]

Represents the data of a streamed text content part within a streaming message delta chunk.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

annotations: List[_models.MessageDeltaTextAnnotation] | None

Annotations for the text.

value: str | None

The data that makes up the text.

class azure.ai.projects.models.MessageDeltaTextFileCitationAnnotation(*args: Any, **kwargs: Any)[source]

Represents a streamed file citation applied to a streaming text content part.

Variables:
  • index (int) – The index of the annotation within a text content part. Required.

  • type (str) – The type of the text content annotation, which is always “file_citation.”. Required. Default value is “file_citation”.

  • file_citation (MessageDeltaTextFileCitationAnnotationObject) – The file citation information.

  • text (str) – The text in the message content that needs to be replaced.

  • start_index (int) – The start index of this annotation in the content text.

  • end_index (int) – The end index of this annotation in the content text.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

end_index: int | None

The end index of this annotation in the content text.

file_citation: _models.MessageDeltaTextFileCitationAnnotationObject | None

The file citation information.

index: int

The index of the annotation within a text content part. Required.

start_index: int | None

The start index of this annotation in the content text.

text: str | None

The text in the message content that needs to be replaced.

type: Literal['file_citation']

The type of the text content annotation, which is always “file_citation.”. Required. Default value is “file_citation”.

class azure.ai.projects.models.MessageDeltaTextFileCitationAnnotationObject(*args: Any, **kwargs: Any)[source]

Represents the data of a streamed file citation as applied to a streaming text content part.

Variables:
  • file_id (str) – The ID of the specific file the citation is from.

  • quote (str) – The specific quote in the cited file.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

file_id: str | None

The ID of the specific file the citation is from.

quote: str | None

The specific quote in the cited file.

class azure.ai.projects.models.MessageDeltaTextFilePathAnnotation(*args: Any, **kwargs: Any)[source]

Represents a streamed file path annotation applied to a streaming text content part.

Variables:
  • index (int) – The index of the annotation within a text content part. Required.

  • type (str) – The type of the text content annotation, which is always “file_path.”. Required. Default value is “file_path”.

  • file_path (MessageDeltaTextFilePathAnnotationObject) – The file path information.

  • start_index (int) – The start index of this annotation in the content text.

  • end_index (int) – The end index of this annotation in the content text.

  • text (str) – The text in the message content that needs to be replaced.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

end_index: int | None

The end index of this annotation in the content text.

file_path: _models.MessageDeltaTextFilePathAnnotationObject | None

The file path information.

index: int

The index of the annotation within a text content part. Required.

start_index: int | None

The start index of this annotation in the content text.

text: str | None

The text in the message content that needs to be replaced.

type: Literal['file_path']

The type of the text content annotation, which is always “file_path.”. Required. Default value is “file_path”.

class azure.ai.projects.models.MessageDeltaTextFilePathAnnotationObject(*args: Any, **kwargs: Any)[source]

Represents the data of a streamed file path annotation as applied to a streaming text content part.

Variables:

file_id (str) – The file ID for the annotation.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

file_id: str | None

The file ID for the annotation.

class azure.ai.projects.models.MessageImageFileContent(*args: Any, **kwargs: Any)[source]

A representation of image file content in a thread message.

Variables:
  • type (str) – The object type, which is always ‘image_file’. Required. Default value is “image_file”.

  • image_file (MessageImageFileDetails) – The image file for this thread message content item. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

image_file: _models.MessageImageFileDetails

The image file for this thread message content item. Required.

type: Literal['image_file']

The object type, which is always ‘image_file’. Required. Default value is “image_file”.

class azure.ai.projects.models.MessageImageFileDetails(*args: Any, **kwargs: Any)[source]

An image reference, as represented in thread message content.

Variables:

file_id (str) – The ID for the file associated with this image. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

file_id: str

The ID for the file associated with this image. Required.

class azure.ai.projects.models.MessageIncompleteDetails(*args: Any, **kwargs: Any)[source]

Information providing additional detail about a message entering an incomplete status.

Variables:

reason (str or MessageIncompleteDetailsReason) – The provided reason describing why the message was marked as incomplete. Required. Known values are: “content_filter”, “max_tokens”, “run_cancelled”, “run_failed”, and “run_expired”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

reason: str | _models.MessageIncompleteDetailsReason

The provided reason describing why the message was marked as incomplete. Required. Known values are: “content_filter”, “max_tokens”, “run_cancelled”, “run_failed”, and “run_expired”.

class azure.ai.projects.models.MessageIncompleteDetailsReason(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

A set of reasons describing why a message is marked as incomplete.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

CONTENT_FILTER = 'content_filter'

The run generating the message was terminated due to content filter flagging.

MAX_TOKENS = 'max_tokens'

The run generating the message exhausted available tokens before completion.

RUN_CANCELLED = 'run_cancelled'

The run generating the message was cancelled before completion.

RUN_EXPIRED = 'run_expired'

The run generating the message expired.

RUN_FAILED = 'run_failed'

The run generating the message failed.

class azure.ai.projects.models.MessageRole(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible values for roles attributed to messages in a thread.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AGENT = 'assistant'

The role representing the agent.

USER = 'user'

The role representing the end-user.

class azure.ai.projects.models.MessageStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible execution status values for a thread message.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

COMPLETED = 'completed'

This message was successfully completed by a run.

INCOMPLETE = 'incomplete'

This message is incomplete. See incomplete_details for more information.

IN_PROGRESS = 'in_progress'

A run is currently creating this message.

class azure.ai.projects.models.MessageStreamEvent(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Message operation related streaming events.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

THREAD_MESSAGE_COMPLETED = 'thread.message.completed'

Event sent when a message is completed. The data of this event is of type ThreadMessage

THREAD_MESSAGE_CREATED = 'thread.message.created'

Event sent when a new message is created. The data of this event is of type ThreadMessage

THREAD_MESSAGE_DELTA = 'thread.message.delta'

Event sent when a message is being streamed. The data of this event is of type MessageDeltaChunk

THREAD_MESSAGE_INCOMPLETE = 'thread.message.incomplete'

Event sent before a message is completed. The data of this event is of type ThreadMessage

THREAD_MESSAGE_IN_PROGRESS = 'thread.message.in_progress'

Event sent when a message moves to in_progress status. The data of this event is of type ThreadMessage

class azure.ai.projects.models.MessageTextAnnotation(*args: Any, **kwargs: Any)[source]

An abstract representation of an annotation to text thread message content.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: MessageTextFileCitationAnnotation, MessageTextFilePathAnnotation

Variables:
  • type (str) – The object type. Required. Default value is None.

  • text (str) – The textual content associated with this text annotation item. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

text: str

The textual content associated with this text annotation item. Required.

type: str

The object type. Required. Default value is None.

class azure.ai.projects.models.MessageTextContent(*args: Any, **kwargs: Any)[source]

A representation of a textual item of thread message content.

Variables:
  • type (str) – The object type, which is always ‘text’. Required. Default value is “text”.

  • text (MessageTextDetails) – The text and associated annotations for this thread message content item. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

text: _models.MessageTextDetails

The text and associated annotations for this thread message content item. Required.

type: Literal['text']

The object type, which is always ‘text’. Required. Default value is “text”.

class azure.ai.projects.models.MessageTextDetails(*args: Any, **kwargs: Any)[source]

The text and associated annotations for a single item of agent thread message content.

Variables:
  • value (str) – The text data. Required.

  • annotations (list[MessageTextAnnotation]) – A list of annotations associated with this text. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

annotations: List[_models.MessageTextAnnotation]

A list of annotations associated with this text. Required.

value: str

The text data. Required.

class azure.ai.projects.models.MessageTextFileCitationAnnotation(*args: Any, **kwargs: Any)[source]

A citation within the message that points to a specific quote from a specific File associated with the agent or the message. Generated when the agent uses the ‘file_search’ tool to search files.

Variables:
  • text (str) – The textual content associated with this text annotation item. Required.

  • type (str) – The object type, which is always ‘file_citation’. Required. Default value is “file_citation”.

  • file_citation (MessageTextFileCitationDetails) – A citation within the message that points to a specific quote from a specific file. Generated when the agent uses the “file_search” tool to search files. Required.

  • start_index (int) – The first text index associated with this text annotation.

  • end_index (int) – The last text index associated with this text annotation.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

end_index: int | None

The last text index associated with this text annotation.

file_citation: _models.MessageTextFileCitationDetails

A citation within the message that points to a specific quote from a specific file. Generated when the agent uses the “file_search” tool to search files. Required.

start_index: int | None

The first text index associated with this text annotation.

text: str

The textual content associated with this text annotation item. Required.

type: Literal['file_citation']

The object type, which is always ‘file_citation’. Required. Default value is “file_citation”.

class azure.ai.projects.models.MessageTextFileCitationDetails(*args: Any, **kwargs: Any)[source]

A representation of a file-based text citation, as used in a file-based annotation of text thread message content.

Variables:
  • file_id (str) – The ID of the file associated with this citation. Required.

  • quote (str) – The specific quote cited in the associated file. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

file_id: str

The ID of the file associated with this citation. Required.

quote: str

The specific quote cited in the associated file. Required.

class azure.ai.projects.models.MessageTextFilePathAnnotation(*args: Any, **kwargs: Any)[source]

A citation within the message that points to a file located at a specific path.

Variables:
  • text (str) – The textual content associated with this text annotation item. Required.

  • type (str) – The object type, which is always ‘file_path’. Required. Default value is “file_path”.

  • file_path (MessageTextFilePathDetails) – A URL for the file that’s generated when the agent used the code_interpreter tool to generate a file. Required.

  • start_index (int) – The first text index associated with this text annotation.

  • end_index (int) – The last text index associated with this text annotation.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

end_index: int | None

The last text index associated with this text annotation.

file_path: _models.MessageTextFilePathDetails

A URL for the file that’s generated when the agent used the code_interpreter tool to generate a file. Required.

start_index: int | None

The first text index associated with this text annotation.

text: str

The textual content associated with this text annotation item. Required.

type: Literal['file_path']

The object type, which is always ‘file_path’. Required. Default value is “file_path”.

class azure.ai.projects.models.MessageTextFilePathDetails(*args: Any, **kwargs: Any)[source]

An encapsulation of an image file ID, as used by message image content.

Variables:

file_id (str) – The ID of the specific file that the citation is from. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

file_id: str

The ID of the specific file that the citation is from. Required.

class azure.ai.projects.models.MicrosoftFabricToolDefinition(*args: Any, **kwargs: Any)[source]

The input definition information for a Microsoft Fabric tool as used to configure an agent.

Variables:
  • type (str) – The object type, which is always ‘fabric_aiskill’. Required. Default value is “fabric_aiskill”.

  • fabric_aiskill (ToolConnectionList) – The list of connections used by the Microsoft Fabric tool. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

fabric_aiskill: _models.ToolConnectionList

The list of connections used by the Microsoft Fabric tool. Required.

type: Literal['fabric_aiskill']

The object type, which is always ‘fabric_aiskill’. Required. Default value is “fabric_aiskill”.

class azure.ai.projects.models.OpenAIFile(*args: Any, **kwargs: Any)[source]

Represents an agent that can call the model and use tools.

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

Variables:
  • object (str) – The object type, which is always ‘file’. Required. Default value is “file”.

  • id (str) – The identifier, which can be referenced in API endpoints. Required.

  • bytes (int) – The size of the file, in bytes. Required.

  • filename (str) – The name of the file. Required.

  • created_at (datetime) – The Unix timestamp, in seconds, representing when this object was created. Required.

  • purpose (str or FilePurpose) – The intended purpose of a file. Required. Known values are: “fine-tune”, “fine-tune-results”, “assistants”, “assistants_output”, “batch”, “batch_output”, and “vision”.

  • status (str or FileState) – The state of the file. This field is available in Azure OpenAI only. Known values are: “uploaded”, “pending”, “running”, “processed”, “error”, “deleting”, and “deleted”.

  • status_details (str) – The error message with details in case processing of this file failed. This field is available in Azure OpenAI only.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

bytes: int

The size of the file, in bytes. Required.

created_at: datetime

The Unix timestamp, in seconds, representing when this object was created. Required.

filename: str

The name of the file. Required.

id: str

The identifier, which can be referenced in API endpoints. Required.

object: Literal['file']

The object type, which is always ‘file’. Required. Default value is “file”.

purpose: str | _models.FilePurpose

“fine-tune”, “fine-tune-results”, “assistants”, “assistants_output”, “batch”, “batch_output”, and “vision”.

Type:

The intended purpose of a file. Required. Known values are

status: str | _models.FileState | None

The state of the file. This field is available in Azure OpenAI only. Known values are: “uploaded”, “pending”, “running”, “processed”, “error”, “deleting”, and “deleted”.

status_details: str | None

The error message with details in case processing of this file failed. This field is available in Azure OpenAI only.

class azure.ai.projects.models.OpenAIPageableListOfAgent(*args: Any, **kwargs: Any)[source]

The response data for a requested list of items.

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

Variables:
  • object (str) – The object type, which is always list. Required. Default value is “list”.

  • data (list[Agent]) – The requested list of items. Required.

  • first_id (str) – The first ID represented in this list. Required.

  • last_id (str) – The last ID represented in this list. Required.

  • has_more (bool) – A value indicating whether there are additional values available not captured in this list. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data: List[_models.Agent]

The requested list of items. Required.

first_id: str

The first ID represented in this list. Required.

has_more: bool

A value indicating whether there are additional values available not captured in this list. Required.

last_id: str

The last ID represented in this list. Required.

object: Literal['list']

The object type, which is always list. Required. Default value is “list”.

class azure.ai.projects.models.OpenAIPageableListOfRunStep(*args: Any, **kwargs: Any)[source]

The response data for a requested list of items.

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

Variables:
  • object (str) – The object type, which is always list. Required. Default value is “list”.

  • data (list[RunStep]) – The requested list of items. Required.

  • first_id (str) – The first ID represented in this list. Required.

  • last_id (str) – The last ID represented in this list. Required.

  • has_more (bool) – A value indicating whether there are additional values available not captured in this list. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data: List[_models.RunStep]

The requested list of items. Required.

first_id: str

The first ID represented in this list. Required.

has_more: bool

A value indicating whether there are additional values available not captured in this list. Required.

last_id: str

The last ID represented in this list. Required.

object: Literal['list']

The object type, which is always list. Required. Default value is “list”.

class azure.ai.projects.models.OpenAIPageableListOfThreadMessage(*args: Any, **kwargs: Any)[source]
as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

get_last_message_by_role(role: MessageRole) ThreadMessage | None[source]

Returns the last message from a sender in the specified role.

Parameters:

role (MessageRole) – The role of the sender.

Returns:

The last message from a sender in the specified role.

Return type:

ThreadMessage

get_last_text_message_by_role(role: MessageRole) MessageTextContent | None[source]

Returns the last text message from a sender in the specified role.

Parameters:

role (MessageRole) – The role of the sender.

Returns:

The last text message from a sender in the specified role.

Return type:

MessageTextContent

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data: List['_models.ThreadMessage']

The requested list of items. Required.

property file_citation_annotations: List[MessageTextFileCitationAnnotation]

Returns all file citation annotations from text message annotations in the messages.

Return type:

List[MessageTextFileCitationAnnotation]

property file_path_annotations: List[MessageTextFilePathAnnotation]

Returns all file path annotations from text message annotations in the messages.

Return type:

List[MessageTextFilePathAnnotation]

first_id: str

The first ID represented in this list. Required.

has_more: bool

A value indicating whether there are additional values available not captured in this list. Required.

property image_contents: List[MessageImageFileContent]

Returns all image file contents from image message contents in the messages.

Return type:

List[MessageImageFileContent]

last_id: str

The last ID represented in this list. Required.

object: Literal['list']

The object type, which is always list. Required. Default value is “list”.

property text_messages: List[MessageTextContent]

Returns all text message contents in the messages.

Return type:

List[MessageTextContent]

class azure.ai.projects.models.OpenAIPageableListOfThreadRun(*args: Any, **kwargs: Any)[source]

The response data for a requested list of items.

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

Variables:
  • object (str) – The object type, which is always list. Required. Default value is “list”.

  • data (list[ThreadRun]) – The requested list of items. Required.

  • first_id (str) – The first ID represented in this list. Required.

  • last_id (str) – The last ID represented in this list. Required.

  • has_more (bool) – A value indicating whether there are additional values available not captured in this list. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data: List[_models.ThreadRun]

The requested list of items. Required.

first_id: str

The first ID represented in this list. Required.

has_more: bool

A value indicating whether there are additional values available not captured in this list. Required.

last_id: str

The last ID represented in this list. Required.

object: Literal['list']

The object type, which is always list. Required. Default value is “list”.

class azure.ai.projects.models.OpenAIPageableListOfVectorStore(*args: Any, **kwargs: Any)[source]

The response data for a requested list of items.

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

Variables:
  • object (str) – The object type, which is always list. Required. Default value is “list”.

  • data (list[VectorStore]) – The requested list of items. Required.

  • first_id (str) – The first ID represented in this list. Required.

  • last_id (str) – The last ID represented in this list. Required.

  • has_more (bool) – A value indicating whether there are additional values available not captured in this list. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data: List[_models.VectorStore]

The requested list of items. Required.

first_id: str

The first ID represented in this list. Required.

has_more: bool

A value indicating whether there are additional values available not captured in this list. Required.

last_id: str

The last ID represented in this list. Required.

object: Literal['list']

The object type, which is always list. Required. Default value is “list”.

class azure.ai.projects.models.OpenAIPageableListOfVectorStoreFile(*args: Any, **kwargs: Any)[source]

The response data for a requested list of items.

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

Variables:
  • object (str) – The object type, which is always list. Required. Default value is “list”.

  • data (list[VectorStoreFile]) – The requested list of items. Required.

  • first_id (str) – The first ID represented in this list. Required.

  • last_id (str) – The last ID represented in this list. Required.

  • has_more (bool) – A value indicating whether there are additional values available not captured in this list. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data: List[_models.VectorStoreFile]

The requested list of items. Required.

first_id: str

The first ID represented in this list. Required.

has_more: bool

A value indicating whether there are additional values available not captured in this list. Required.

last_id: str

The last ID represented in this list. Required.

object: Literal['list']

The object type, which is always list. Required. Default value is “list”.

class azure.ai.projects.models.OpenApiAnonymousAuthDetails(*args: Any, **kwargs: Any)[source]

Security details for OpenApi anonymous authentication.

Variables:

type (str or ANONYMOUS) – The object type, which is always ‘anonymous’. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: Literal[OpenApiAuthType.ANONYMOUS]

The object type, which is always ‘anonymous’. Required.

class azure.ai.projects.models.OpenApiAuthDetails(*args: Any, **kwargs: Any)[source]

authentication details for OpenApiFunctionDefinition.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: OpenApiAnonymousAuthDetails, OpenApiConnectionAuthDetails, OpenApiManagedAuthDetails

Variables:

type (str or OpenApiAuthType) – The type of authentication, must be anonymous/connection/managed_identity. Required. Known values are: “anonymous”, “connection”, and “managed_identity”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: str

The type of authentication, must be anonymous/connection/managed_identity. Required. Known values are: “anonymous”, “connection”, and “managed_identity”.

class azure.ai.projects.models.OpenApiAuthType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Authentication type for OpenApi endpoint. Allowed types are:

  • Anonymous (no authentication required)

  • Connection (requires connection_id to endpoint, as setup in AI Foundry)

  • Managed_Identity (requires audience for identity based auth).

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ANONYMOUS = 'anonymous'
CONNECTION = 'connection'
MANAGED_IDENTITY = 'managed_identity'
class azure.ai.projects.models.OpenApiConnectionAuthDetails(*args: Any, **kwargs: Any)[source]

Security details for OpenApi connection authentication.

Variables:
  • type (str or CONNECTION) – The object type, which is always ‘connection’. Required.

  • security_scheme (OpenApiConnectionSecurityScheme) – Connection auth security details. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

security_scheme: _models.OpenApiConnectionSecurityScheme

Connection auth security details. Required.

type: Literal[OpenApiAuthType.CONNECTION]

The object type, which is always ‘connection’. Required.

class azure.ai.projects.models.OpenApiConnectionSecurityScheme(*args: Any, **kwargs: Any)[source]

Security scheme for OpenApi managed_identity authentication.

Variables:

connection_id (str) – Connection id for Connection auth type. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

connection_id: str

Connection id for Connection auth type. Required.

class azure.ai.projects.models.OpenApiFunctionDefinition(*args: Any, **kwargs: Any)[source]

The input definition information for an openapi function.

Variables:
  • name (str) – The name of the function to be called. Required.

  • description (str) – A description of what the function does, used by the model to choose when and how to call the function.

  • spec (any) – The openapi function shape, described as a JSON Schema object. Required.

  • auth (OpenApiAuthDetails) – Open API authentication details. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

auth: _models.OpenApiAuthDetails

Open API authentication details. Required.

description: str | None

A description of what the function does, used by the model to choose when and how to call the function.

name: str

The name of the function to be called. Required.

spec: Any

The openapi function shape, described as a JSON Schema object. Required.

class azure.ai.projects.models.OpenApiManagedAuthDetails(*args: Any, **kwargs: Any)[source]

Security details for OpenApi managed_identity authentication.

Variables:
  • type (str or MANAGED_IDENTITY) – The object type, which is always ‘managed_identity’. Required.

  • security_scheme (OpenApiManagedSecurityScheme) – Connection auth security details. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

security_scheme: _models.OpenApiManagedSecurityScheme

Connection auth security details. Required.

type: Literal[OpenApiAuthType.MANAGED_IDENTITY]

The object type, which is always ‘managed_identity’. Required.

class azure.ai.projects.models.OpenApiManagedSecurityScheme(*args: Any, **kwargs: Any)[source]

Security scheme for OpenApi managed_identity authentication.

Variables:

audience (str) – Authentication scope for managed_identity auth type. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

audience: str

Authentication scope for managed_identity auth type. Required.

class azure.ai.projects.models.OpenApiTool(name: str, description: str, spec: Any, auth: OpenApiAuthDetails)[source]

A tool that retrieves information using OpenAPI specs. Initialized with an initial API definition (name, description, spec, auth), this class also supports adding and removing additional API definitions dynamically.

Constructor initializes the tool with a primary API definition.

Parameters:
  • name – The name of the API.

  • description – The API description.

  • spec – The API specification.

  • auth (OpenApiAuthDetails) – Authentication details for the API.

add_definition(name: str, description: str, spec: Any, auth: OpenApiAuthDetails | None = None) None[source]

Adds a new API definition dynamically. Raises a ValueError if a definition with the same name already exists.

Parameters:
  • name (str) – The name of the API.

  • description (str) – The description of the API.

  • spec (Any) – The API specification.

  • auth (Optional[OpenApiAuthDetails]) – Optional authentication details for this particular API definition. If not provided, the tool’s default authentication details will be used.

Raises:

ValueError – If a definition with the same name exists.

execute(tool_call: Any) None[source]

OpenApiTool does not execute client-side.

Parameters:

tool_call (Any) – The tool call to execute.

remove_definition(name: str) None[source]

Removes an API definition based on its name.

Parameters:

name (str) – The name of the API definition to remove.

Raises:

ValueError – If the definition with the specified name does not exist.

property definitions: List[OpenApiToolDefinition]

Get the list of all API definitions for the tool.

Returns:

A list of OpenAPI tool definitions.

Return type:

List[ToolDefinition]

property resources: ToolResources

Get the tool resources for the agent.

Returns:

An empty ToolResources as OpenApiTool doesn’t have specific resources.

Return type:

ToolResources

class azure.ai.projects.models.OpenApiToolDefinition(*args: Any, **kwargs: Any)[source]

The input definition information for an OpenAPI tool as used to configure an agent.

Variables:
  • type (str) – The object type, which is always ‘openapi’. Required. Default value is “openapi”.

  • openapi (OpenApiFunctionDefinition) – The openapi function definition. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

openapi: _models.OpenApiFunctionDefinition

The openapi function definition. Required.

type: Literal['openapi']

The object type, which is always ‘openapi’. Required. Default value is “openapi”.

class azure.ai.projects.models.RecurrenceSchedule(*args: Any, **kwargs: Any)[source]

RecurrenceSchedule Definition.

Variables:
  • hours (list[int]) – List of hours for the schedule. Required.

  • minutes (list[int]) – List of minutes for the schedule. Required.

  • week_days (list[str or WeekDays]) – List of days for the schedule.

  • month_days (list[int]) – List of month days for the schedule.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

hours: List[int]

List of hours for the schedule. Required.

minutes: List[int]

List of minutes for the schedule. Required.

month_days: List[int] | None

List of month days for the schedule.

week_days: List[str | _models.WeekDays] | None

List of days for the schedule.

class azure.ai.projects.models.RecurrenceTrigger(*args: Any, **kwargs: Any)[source]

Recurrence Trigger Definition.

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

Variables:
  • type (str) – Required. Default value is “Recurrence”.

  • frequency (str or Frequency) – The frequency to trigger schedule. Required. Known values are: “Month”, “Week”, “Day”, “Hour”, and “Minute”.

  • interval (int) – Specifies schedule interval in conjunction with frequency. Required.

  • schedule (RecurrenceSchedule) – The recurrence schedule.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

frequency: str | _models.Frequency

“Month”, “Week”, “Day”, “Hour”, and “Minute”.

Type:

The frequency to trigger schedule. Required. Known values are

interval: int

Specifies schedule interval in conjunction with frequency. Required.

schedule: _models.RecurrenceSchedule | None

The recurrence schedule.

type: Literal['Recurrence']

Required. Default value is “Recurrence”.

class azure.ai.projects.models.RequiredAction(*args: Any, **kwargs: Any)[source]

An abstract representation of a required action for an agent thread run to continue.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: SubmitToolOutputsAction

Variables:

type (str) – The object type. Required. Default value is None.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: str

The object type. Required. Default value is None.

class azure.ai.projects.models.RequiredFunctionToolCall(*args: Any, **kwargs: Any)[source]

A representation of a requested call to a function tool, needed by the model to continue evaluation of a run.

Variables:
  • id (str) – The ID of the tool call. This ID must be referenced when submitting tool outputs. Required.

  • type (str) – The object type of the required tool call. Always ‘function’ for function tools. Required. Default value is “function”.

  • function (RequiredFunctionToolCallDetails) – Detailed information about the function to be executed by the tool that includes name and arguments. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

function: _models.RequiredFunctionToolCallDetails

Detailed information about the function to be executed by the tool that includes name and arguments. Required.

id: str

The ID of the tool call. This ID must be referenced when submitting tool outputs. Required.

type: Literal['function']

The object type of the required tool call. Always ‘function’ for function tools. Required. Default value is “function”.

class azure.ai.projects.models.RequiredFunctionToolCallDetails(*args: Any, **kwargs: Any)[source]

The detailed information for a function invocation, as provided by a required action invoking a function tool, that includes the name of and arguments to the function.

Variables:
  • name (str) – The name of the function. Required.

  • arguments (str) – The arguments to use when invoking the named function, as provided by the model. Arguments are presented as a JSON document that should be validated and parsed for evaluation. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

arguments: str

The arguments to use when invoking the named function, as provided by the model. Arguments are presented as a JSON document that should be validated and parsed for evaluation. Required.

name: str

The name of the function. Required.

class azure.ai.projects.models.RequiredToolCall(*args: Any, **kwargs: Any)[source]

An abstract representation of a tool invocation needed by the model to continue a run.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: RequiredFunctionToolCall

Variables:
  • type (str) – The object type for the required tool call. Required. Default value is None.

  • id (str) – The ID of the tool call. This ID must be referenced when submitting tool outputs. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

id: str

The ID of the tool call. This ID must be referenced when submitting tool outputs. Required.

type: str

The object type for the required tool call. Required. Default value is None.

class azure.ai.projects.models.ResponseFormat(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Possible API response formats.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

JSON_OBJECT = 'json_object'

Using json_object format will limit the usage of ToolCall to only functions.

TEXT = 'text'

text format should be used for requests involving any sort of ToolCall.

class azure.ai.projects.models.ResponseFormatJsonSchema(*args: Any, **kwargs: Any)[source]

A description of what the response format is for, used by the model to determine how to respond in the format.

Variables:
  • description (str) – A description of what the response format is for, used by the model to determine how to respond in the format.

  • name (str) – The name of a schema. Required.

  • schema (any) – The JSON schema object, describing the response format. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

description: str | None

A description of what the response format is for, used by the model to determine how to respond in the format.

name: str

The name of a schema. Required.

schema: Any

The JSON schema object, describing the response format. Required.

class azure.ai.projects.models.ResponseFormatJsonSchemaType(*args: Any, **kwargs: Any)[source]

The type of response format being defined: json_schema.

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

Variables:
  • type (str) – Type. Required. Default value is “json_schema”.

  • json_schema (ResponseFormatJsonSchema) – The JSON schema, describing response format. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

json_schema: _models.ResponseFormatJsonSchema

The JSON schema, describing response format. Required.

type: Literal['json_schema']

Type. Required. Default value is “json_schema”.

class azure.ai.projects.models.RunAdditionalFieldList(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

A list of additional fields to include in the response.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

FILE_SEARCH_CONTENTS = 'step_details.tool_calls[*].file_search.results[*].content'

File search result content.

class azure.ai.projects.models.RunCompletionUsage(*args: Any, **kwargs: Any)[source]

Usage statistics related to the run. This value will be null if the run is not in a terminal state (i.e. in_progress, queued, etc.).

Variables:
  • completion_tokens (int) – Number of completion tokens used over the course of the run. Required.

  • prompt_tokens (int) – Number of prompt tokens used over the course of the run. Required.

  • total_tokens (int) – Total number of tokens used (prompt + completion). Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

completion_tokens: int

Number of completion tokens used over the course of the run. Required.

prompt_tokens: int

Number of prompt tokens used over the course of the run. Required.

total_tokens: int

Total number of tokens used (prompt + completion). Required.

class azure.ai.projects.models.RunError(*args: Any, **kwargs: Any)[source]

The details of an error as encountered by an agent thread run.

Variables:
  • code (str) – The status for the error. Required.

  • message (str) – The human-readable text associated with the error. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

code: str

The status for the error. Required.

message: str

The human-readable text associated with the error. Required.

class azure.ai.projects.models.RunStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Possible values for the status of an agent thread run.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

CANCELLED = 'cancelled'

Represents a run that has been cancelled.

CANCELLING = 'cancelling'

Represents a run that is in the process of cancellation.

COMPLETED = 'completed'

Represents a run that successfully completed.

EXPIRED = 'expired'

Represents a run that expired before it could otherwise finish.

FAILED = 'failed'

Represents a run that failed.

IN_PROGRESS = 'in_progress'

Represents a run that is in progress.

QUEUED = 'queued'

Represents a run that is queued to start.

REQUIRES_ACTION = 'requires_action'

Represents a run that needs another operation, such as tool output submission, to continue.

class azure.ai.projects.models.RunStep(*args: Any, **kwargs: Any)[source]

Detailed information about a single step of an agent thread run.

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

Variables:
  • id (str) – The identifier, which can be referenced in API endpoints. Required.

  • object (str) – The object type, which is always ‘thread.run.step’. Required. Default value is “thread.run.step”.

  • type (str or RunStepType) – The type of run step, which can be either message_creation or tool_calls. Required. Known values are: “message_creation” and “tool_calls”.

  • assistant_id (str) – The ID of the agent associated with the run step. Required.

  • thread_id (str) – The ID of the thread that was run. Required.

  • run_id (str) – The ID of the run that this run step is a part of. Required.

  • status (str or RunStepStatus) – The status of this run step. Required. Known values are: “in_progress”, “cancelled”, “failed”, “completed”, and “expired”.

  • step_details (RunStepDetails) – The details for this run step. Required.

  • last_error (RunStepError) – If applicable, information about the last error encountered by this run step. Required.

  • created_at (datetime) – The Unix timestamp, in seconds, representing when this object was created. Required.

  • expired_at (datetime) – The Unix timestamp, in seconds, representing when this item expired. Required.

  • completed_at (datetime) – The Unix timestamp, in seconds, representing when this completed. Required.

  • cancelled_at (datetime) – The Unix timestamp, in seconds, representing when this was cancelled. Required.

  • failed_at (datetime) – The Unix timestamp, in seconds, representing when this failed. Required.

  • usage (RunStepCompletionUsage) – Usage statistics related to the run step. This value will be null while the run step’s status is in_progress.

  • metadata (dict[str, str]) – A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

assistant_id: str

The ID of the agent associated with the run step. Required.

cancelled_at: datetime

The Unix timestamp, in seconds, representing when this was cancelled. Required.

completed_at: datetime

The Unix timestamp, in seconds, representing when this completed. Required.

created_at: datetime

The Unix timestamp, in seconds, representing when this object was created. Required.

expired_at: datetime

The Unix timestamp, in seconds, representing when this item expired. Required.

failed_at: datetime

The Unix timestamp, in seconds, representing when this failed. Required.

id: str

The identifier, which can be referenced in API endpoints. Required.

last_error: _models.RunStepError

If applicable, information about the last error encountered by this run step. Required.

metadata: Dict[str, str]

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required.

object: Literal['thread.run.step']

The object type, which is always ‘thread.run.step’. Required. Default value is “thread.run.step”.

run_id: str

The ID of the run that this run step is a part of. Required.

status: str | _models.RunStepStatus

“in_progress”, “cancelled”, “failed”, “completed”, and “expired”.

Type:

The status of this run step. Required. Known values are

step_details: _models.RunStepDetails

The details for this run step. Required.

thread_id: str

The ID of the thread that was run. Required.

type: str | _models.RunStepType

The type of run step, which can be either message_creation or tool_calls. Required. Known values are: “message_creation” and “tool_calls”.

usage: _models.RunStepCompletionUsage | None

Usage statistics related to the run step. This value will be null while the run step’s status is in_progress.

class azure.ai.projects.models.RunStepAzureAISearchToolCall(*args: Any, **kwargs: Any)[source]

A record of a call to an Azure AI Search tool, issued by the model in evaluation of a defined tool, that represents executed Azure AI search.

Variables:
  • id (str) – The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

  • type (str) – The object type, which is always ‘azure_ai_search’. Required. Default value is “azure_ai_search”.

  • azure_ai_search (dict[str, str]) – Reserved for future use. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

Reserved for future use. Required.

id: str

The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

type: Literal['azure_ai_search']

The object type, which is always ‘azure_ai_search’. Required. Default value is “azure_ai_search”.

class azure.ai.projects.models.RunStepBingGroundingToolCall(*args: Any, **kwargs: Any)[source]

A record of a call to a bing grounding tool, issued by the model in evaluation of a defined tool, that represents executed search with bing grounding.

Variables:
  • id (str) – The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

  • type (str) – The object type, which is always ‘bing_grounding’. Required. Default value is “bing_grounding”.

  • bing_grounding (dict[str, str]) – Reserved for future use. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

bing_grounding: Dict[str, str]

Reserved for future use. Required.

id: str

The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

type: Literal['bing_grounding']

The object type, which is always ‘bing_grounding’. Required. Default value is “bing_grounding”.

class azure.ai.projects.models.RunStepCodeInterpreterImageOutput(*args: Any, **kwargs: Any)[source]

A representation of an image output emitted by a code interpreter tool in response to a tool call by the model.

Variables:
  • type (str) – The object type, which is always ‘image’. Required. Default value is “image”.

  • image (RunStepCodeInterpreterImageReference) – Referential information for the image associated with this output. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

image: _models.RunStepCodeInterpreterImageReference

Referential information for the image associated with this output. Required.

type: Literal['image']

The object type, which is always ‘image’. Required. Default value is “image”.

class azure.ai.projects.models.RunStepCodeInterpreterImageReference(*args: Any, **kwargs: Any)[source]

An image reference emitted by a code interpreter tool in response to a tool call by the model.

Variables:

file_id (str) – The ID of the file associated with this image. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

file_id: str

The ID of the file associated with this image. Required.

class azure.ai.projects.models.RunStepCodeInterpreterLogOutput(*args: Any, **kwargs: Any)[source]

A representation of a log output emitted by a code interpreter tool in response to a tool call by the model.

Variables:
  • type (str) – The object type, which is always ‘logs’. Required. Default value is “logs”.

  • logs (str) – The serialized log output emitted by the code interpreter. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

logs: str

The serialized log output emitted by the code interpreter. Required.

type: Literal['logs']

The object type, which is always ‘logs’. Required. Default value is “logs”.

class azure.ai.projects.models.RunStepCodeInterpreterToolCall(*args: Any, **kwargs: Any)[source]

A record of a call to a code interpreter tool, issued by the model in evaluation of a defined tool, that represents inputs and outputs consumed and emitted by the code interpreter.

Variables:
  • id (str) – The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

  • type (str) – The object type, which is always ‘code_interpreter’. Required. Default value is “code_interpreter”.

  • code_interpreter (RunStepCodeInterpreterToolCallDetails) – The details of the tool call to the code interpreter tool. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

code_interpreter: _models.RunStepCodeInterpreterToolCallDetails

The details of the tool call to the code interpreter tool. Required.

id: str

The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

type: Literal['code_interpreter']

The object type, which is always ‘code_interpreter’. Required. Default value is “code_interpreter”.

class azure.ai.projects.models.RunStepCodeInterpreterToolCallDetails(*args: Any, **kwargs: Any)[source]

The detailed information about a code interpreter invocation by the model.

Variables:
  • input (str) – The input provided by the model to the code interpreter tool. Required.

  • outputs (list[RunStepCodeInterpreterToolCallOutput]) – The outputs produced by the code interpreter tool back to the model in response to the tool call. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

input: str

The input provided by the model to the code interpreter tool. Required.

outputs: List[_models.RunStepCodeInterpreterToolCallOutput]

The outputs produced by the code interpreter tool back to the model in response to the tool call. Required.

class azure.ai.projects.models.RunStepCodeInterpreterToolCallOutput(*args: Any, **kwargs: Any)[source]

An abstract representation of an emitted output from a code interpreter tool.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: RunStepCodeInterpreterImageOutput, RunStepCodeInterpreterLogOutput

Variables:

type (str) – The object type. Required. Default value is None.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: str

The object type. Required. Default value is None.

class azure.ai.projects.models.RunStepCompletionUsage(*args: Any, **kwargs: Any)[source]

Usage statistics related to the run step.

Variables:
  • completion_tokens (int) – Number of completion tokens used over the course of the run step. Required.

  • prompt_tokens (int) – Number of prompt tokens used over the course of the run step. Required.

  • total_tokens (int) – Total number of tokens used (prompt + completion). Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

completion_tokens: int

Number of completion tokens used over the course of the run step. Required.

prompt_tokens: int

Number of prompt tokens used over the course of the run step. Required.

total_tokens: int

Total number of tokens used (prompt + completion). Required.

class azure.ai.projects.models.RunStepDelta(*args: Any, **kwargs: Any)[source]

Represents the delta payload in a streaming run step delta chunk.

Variables:

step_details (RunStepDeltaDetail) – The details of the run step.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

step_details: _models.RunStepDeltaDetail | None

The details of the run step.

class azure.ai.projects.models.RunStepDeltaChunk(*args: Any, **kwargs: Any)[source]

Represents a run step delta i.e. any changed fields on a run step during streaming.

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

Variables:
  • id (str) – The identifier of the run step, which can be referenced in API endpoints. Required.

  • object (str) – The object type, which is always thread.run.step.delta. Required. Default value is “thread.run.step.delta”.

  • delta (RunStepDelta) – The delta containing the fields that have changed on the run step. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

delta: _models.RunStepDelta

The delta containing the fields that have changed on the run step. Required.

id: str

The identifier of the run step, which can be referenced in API endpoints. Required.

object: Literal['thread.run.step.delta']

The object type, which is always thread.run.step.delta. Required. Default value is “thread.run.step.delta”.

class azure.ai.projects.models.RunStepDeltaCodeInterpreterDetailItemObject(*args: Any, **kwargs: Any)[source]

Represents the Code Interpreter tool call data in a streaming run step’s tool calls.

Variables:
  • input (str) – The input into the Code Interpreter tool call.

  • outputs (list[RunStepDeltaCodeInterpreterOutput]) – The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (logs) or images (image). Each of these are represented by a different object type.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

input: str | None

The input into the Code Interpreter tool call.

outputs: List[_models.RunStepDeltaCodeInterpreterOutput] | None

The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (logs) or images (image). Each of these are represented by a different object type.

class azure.ai.projects.models.RunStepDeltaCodeInterpreterImageOutput(*args: Any, **kwargs: Any)[source]

Represents an image output as produced the Code interpreter tool and as represented in a streaming run step’s delta tool calls collection.

Variables:
  • index (int) – The index of the output in the streaming run step tool call’s Code Interpreter outputs array. Required.

  • type (str) – The object type, which is always “image.”. Required. Default value is “image”.

  • image (RunStepDeltaCodeInterpreterImageOutputObject) – The image data for the Code Interpreter tool call output.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

image: _models.RunStepDeltaCodeInterpreterImageOutputObject | None

The image data for the Code Interpreter tool call output.

index: int

The index of the output in the streaming run step tool call’s Code Interpreter outputs array. Required.

type: Literal['image']

The object type, which is always “image.”. Required. Default value is “image”.

class azure.ai.projects.models.RunStepDeltaCodeInterpreterImageOutputObject(*args: Any, **kwargs: Any)[source]

Represents the data for a streaming run step’s Code Interpreter tool call image output.

Variables:

file_id (str) – The file ID for the image.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

file_id: str | None

The file ID for the image.

class azure.ai.projects.models.RunStepDeltaCodeInterpreterLogOutput(*args: Any, **kwargs: Any)[source]

Represents a log output as produced by the Code Interpreter tool and as represented in a streaming run step’s delta tool calls collection.

Variables:
  • index (int) – The index of the output in the streaming run step tool call’s Code Interpreter outputs array. Required.

  • type (str) – The type of the object, which is always “logs.”. Required. Default value is “logs”.

  • logs (str) – The text output from the Code Interpreter tool call.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

index: int

The index of the output in the streaming run step tool call’s Code Interpreter outputs array. Required.

logs: str | None

The text output from the Code Interpreter tool call.

type: Literal['logs']

The type of the object, which is always “logs.”. Required. Default value is “logs”.

class azure.ai.projects.models.RunStepDeltaCodeInterpreterOutput(*args: Any, **kwargs: Any)[source]

The abstract base representation of a streaming run step tool call’s Code Interpreter tool output.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: RunStepDeltaCodeInterpreterImageOutput, RunStepDeltaCodeInterpreterLogOutput

Variables:
  • index (int) – The index of the output in the streaming run step tool call’s Code Interpreter outputs array. Required.

  • type (str) – The type of the streaming run step tool call’s Code Interpreter output. Required. Default value is None.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

index: int

The index of the output in the streaming run step tool call’s Code Interpreter outputs array. Required.

type: str

The type of the streaming run step tool call’s Code Interpreter output. Required. Default value is None.

class azure.ai.projects.models.RunStepDeltaCodeInterpreterToolCall(*args: Any, **kwargs: Any)[source]

Represents a Code Interpreter tool call within a streaming run step’s tool call details.

Variables:
  • index (int) – The index of the tool call detail in the run step’s tool_calls array. Required.

  • id (str) – The ID of the tool call, used when submitting outputs to the run. Required.

  • type (str) – The object type, which is always “code_interpreter.”. Required. Default value is “code_interpreter”.

  • code_interpreter (RunStepDeltaCodeInterpreterDetailItemObject) – The Code Interpreter data for the tool call.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

code_interpreter: _models.RunStepDeltaCodeInterpreterDetailItemObject | None

The Code Interpreter data for the tool call.

id: str

The ID of the tool call, used when submitting outputs to the run. Required.

index: int

The index of the tool call detail in the run step’s tool_calls array. Required.

type: Literal['code_interpreter']

The object type, which is always “code_interpreter.”. Required. Default value is “code_interpreter”.

class azure.ai.projects.models.RunStepDeltaDetail(*args: Any, **kwargs: Any)[source]

Represents a single run step detail item in a streaming run step’s delta payload.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: RunStepDeltaMessageCreation, RunStepDeltaToolCallObject

Variables:

type (str) – The object type for the run step detail object. Required. Default value is None.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: str

The object type for the run step detail object. Required. Default value is None.

class azure.ai.projects.models.RunStepDeltaFileSearchToolCall(*args: Any, **kwargs: Any)[source]

Represents a file search tool call within a streaming run step’s tool call details.

Variables:
  • index (int) – The index of the tool call detail in the run step’s tool_calls array. Required.

  • id (str) – The ID of the tool call, used when submitting outputs to the run. Required.

  • type (str) – The object type, which is always “file_search.”. Required. Default value is “file_search”.

  • file_search (dict[str, str]) – Reserved for future use.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

Reserved for future use.

id: str

The ID of the tool call, used when submitting outputs to the run. Required.

index: int

The index of the tool call detail in the run step’s tool_calls array. Required.

type: Literal['file_search']

The object type, which is always “file_search.”. Required. Default value is “file_search”.

class azure.ai.projects.models.RunStepDeltaFunction(*args: Any, **kwargs: Any)[source]

Represents the function data in a streaming run step delta’s function tool call.

Variables:
  • name (str) – The name of the function.

  • arguments (str) – The arguments passed to the function as input.

  • output (str) – The output of the function, null if outputs have not yet been submitted.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

arguments: str | None

The arguments passed to the function as input.

name: str | None

The name of the function.

output: str | None

The output of the function, null if outputs have not yet been submitted.

class azure.ai.projects.models.RunStepDeltaFunctionToolCall(*args: Any, **kwargs: Any)[source]

Represents a function tool call within a streaming run step’s tool call details.

Variables:
  • index (int) – The index of the tool call detail in the run step’s tool_calls array. Required.

  • id (str) – The ID of the tool call, used when submitting outputs to the run. Required.

  • type (str) – The object type, which is always “function.”. Required. Default value is “function”.

  • function (RunStepDeltaFunction) – The function data for the tool call.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

function: _models.RunStepDeltaFunction | None

The function data for the tool call.

id: str

The ID of the tool call, used when submitting outputs to the run. Required.

index: int

The index of the tool call detail in the run step’s tool_calls array. Required.

type: Literal['function']

The object type, which is always “function.”. Required. Default value is “function”.

class azure.ai.projects.models.RunStepDeltaMessageCreation(*args: Any, **kwargs: Any)[source]

Represents a message creation within a streaming run step delta.

Variables:
  • type (str) – The object type, which is always “message_creation.”. Required. Default value is “message_creation”.

  • message_creation (RunStepDeltaMessageCreationObject) – The message creation data.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

message_creation: _models.RunStepDeltaMessageCreationObject | None

The message creation data.

type: Literal['message_creation']

The object type, which is always “message_creation.”. Required. Default value is “message_creation”.

class azure.ai.projects.models.RunStepDeltaMessageCreationObject(*args: Any, **kwargs: Any)[source]

Represents the data within a streaming run step message creation response object.

Variables:

message_id (str) – The ID of the newly-created message.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

message_id: str | None

The ID of the newly-created message.

class azure.ai.projects.models.RunStepDeltaToolCall(*args: Any, **kwargs: Any)[source]

The abstract base representation of a single tool call within a streaming run step’s delta tool call details.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: RunStepDeltaCodeInterpreterToolCall, RunStepDeltaFileSearchToolCall, RunStepDeltaFunctionToolCall

Variables:
  • index (int) – The index of the tool call detail in the run step’s tool_calls array. Required.

  • id (str) – The ID of the tool call, used when submitting outputs to the run. Required.

  • type (str) – The type of the tool call detail item in a streaming run step’s details. Required. Default value is None.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

id: str

The ID of the tool call, used when submitting outputs to the run. Required.

index: int

The index of the tool call detail in the run step’s tool_calls array. Required.

type: str

The type of the tool call detail item in a streaming run step’s details. Required. Default value is None.

class azure.ai.projects.models.RunStepDeltaToolCallObject(*args: Any, **kwargs: Any)[source]

Represents an invocation of tool calls as part of a streaming run step.

Variables:
  • type (str) – The object type, which is always “tool_calls.”. Required. Default value is “tool_calls”.

  • tool_calls (list[RunStepDeltaToolCall]) – The collection of tool calls for the tool call detail item.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

tool_calls: List[_models.RunStepDeltaToolCall] | None

The collection of tool calls for the tool call detail item.

type: Literal['tool_calls']

The object type, which is always “tool_calls.”. Required. Default value is “tool_calls”.

class azure.ai.projects.models.RunStepDetails(*args: Any, **kwargs: Any)[source]

An abstract representation of the details for a run step.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: RunStepMessageCreationDetails, RunStepToolCallDetails

Variables:

type (str or RunStepType) – The object type. Required. Known values are: “message_creation” and “tool_calls”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: str

“message_creation” and “tool_calls”.

Type:

The object type. Required. Known values are

class azure.ai.projects.models.RunStepError(*args: Any, **kwargs: Any)[source]

The error information associated with a failed run step.

Variables:
  • code (str or RunStepErrorCode) – The error code for this error. Required. Known values are: “server_error” and “rate_limit_exceeded”.

  • message (str) – The human-readable text associated with this error. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

code: str | _models.RunStepErrorCode

“server_error” and “rate_limit_exceeded”.

Type:

The error code for this error. Required. Known values are

message: str

The human-readable text associated with this error. Required.

class azure.ai.projects.models.RunStepErrorCode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Possible error code values attributable to a failed run step.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

RATE_LIMIT_EXCEEDED = 'rate_limit_exceeded'

Represents an error indicating configured rate limits were exceeded.

SERVER_ERROR = 'server_error'

Represents a server error.

class azure.ai.projects.models.RunStepFileSearchToolCall(*args: Any, **kwargs: Any)[source]

A record of a call to a file search tool, issued by the model in evaluation of a defined tool, that represents executed file search.

Variables:
  • type (str) – The object type, which is always ‘file_search’. Required. Default value is “file_search”.

  • id (str) – The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

  • file_search (RunStepFileSearchToolCallResults) – For now, this is always going to be an empty object. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

For now, this is always going to be an empty object. Required.

id: str

The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

type: Literal['file_search']

The object type, which is always ‘file_search’. Required. Default value is “file_search”.

class azure.ai.projects.models.RunStepFileSearchToolCallResult(*args: Any, **kwargs: Any)[source]

File search tool call result.

Variables:
  • file_id (str) – The ID of the file that result was found in. Required.

  • file_name (str) – The name of the file that result was found in. Required.

  • score (float) – The score of the result. All values must be a floating point number between 0 and 1. Required.

  • content (list[FileSearchToolCallContent]) – The content of the result that was found. The content is only included if requested via the include query parameter.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

content: List[_models.FileSearchToolCallContent] | None

The content of the result that was found. The content is only included if requested via the include query parameter.

file_id: str

The ID of the file that result was found in. Required.

file_name: str

The name of the file that result was found in. Required.

score: float

The score of the result. All values must be a floating point number between 0 and 1. Required.

class azure.ai.projects.models.RunStepFileSearchToolCallResults(*args: Any, **kwargs: Any)[source]

The results of the file search.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

ranking_options: _models.FileSearchRankingOptions | None

Ranking options for file search.

results: List[_models.RunStepFileSearchToolCallResult]

The array of a file search results. Required.

class azure.ai.projects.models.RunStepFunctionToolCall(*args: Any, **kwargs: Any)[source]

A record of a call to a function tool, issued by the model in evaluation of a defined tool, that represents the inputs and output consumed and emitted by the specified function.

Variables:
  • id (str) – The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

  • type (str) – The object type, which is always ‘function’. Required. Default value is “function”.

  • function (RunStepFunctionToolCallDetails) – The detailed information about the function called by the model. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

function: _models.RunStepFunctionToolCallDetails

The detailed information about the function called by the model. Required.

id: str

The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

type: Literal['function']

The object type, which is always ‘function’. Required. Default value is “function”.

class azure.ai.projects.models.RunStepFunctionToolCallDetails(*args: Any, **kwargs: Any)[source]

The detailed information about the function called by the model.

Variables:
  • name (str) – The name of the function. Required.

  • arguments (str) – The arguments that the model requires are provided to the named function. Required.

  • output (str) – The output of the function, only populated for function calls that have already have had their outputs submitted. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

arguments: str

The arguments that the model requires are provided to the named function. Required.

name: str

The name of the function. Required.

output: str

The output of the function, only populated for function calls that have already have had their outputs submitted. Required.

class azure.ai.projects.models.RunStepMessageCreationDetails(*args: Any, **kwargs: Any)[source]

The detailed information associated with a message creation run step.

Variables:
  • type (str or MESSAGE_CREATION) – The object type, which is always ‘message_creation’. Required. Represents a run step to create a message.

  • message_creation (RunStepMessageCreationReference) – Information about the message creation associated with this run step. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

message_creation: _models.RunStepMessageCreationReference

Information about the message creation associated with this run step. Required.

type: Literal[RunStepType.MESSAGE_CREATION]

The object type, which is always ‘message_creation’. Required. Represents a run step to create a message.

class azure.ai.projects.models.RunStepMessageCreationReference(*args: Any, **kwargs: Any)[source]

The details of a message created as a part of a run step.

Variables:

message_id (str) – The ID of the message created by this run step. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

message_id: str

The ID of the message created by this run step. Required.

class azure.ai.projects.models.RunStepMicrosoftFabricToolCall(*args: Any, **kwargs: Any)[source]

A record of a call to a Microsoft Fabric tool, issued by the model in evaluation of a defined tool, that represents executed Microsoft Fabric operations.

Variables:
  • id (str) – The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

  • type (str) – The object type, which is always ‘fabric_aiskill’. Required. Default value is “fabric_aiskill”.

  • microsoft_fabric (dict[str, str]) – Reserved for future use. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

id: str

The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

microsoft_fabric: Dict[str, str]

Reserved for future use. Required.

type: Literal['fabric_aiskill']

The object type, which is always ‘fabric_aiskill’. Required. Default value is “fabric_aiskill”.

class azure.ai.projects.models.RunStepSharepointToolCall(*args: Any, **kwargs: Any)[source]

A record of a call to a SharePoint tool, issued by the model in evaluation of a defined tool, that represents executed SharePoint actions.

Variables:
  • id (str) – The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

  • type (str) – The object type, which is always ‘sharepoint_grounding’. Required. Default value is “sharepoint_grounding”.

  • share_point (dict[str, str]) – Reserved for future use. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

id: str

The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

share_point: Dict[str, str]

Reserved for future use. Required.

type: Literal['sharepoint_grounding']

The object type, which is always ‘sharepoint_grounding’. Required. Default value is “sharepoint_grounding”.

class azure.ai.projects.models.RunStepStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Possible values for the status of a run step.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

CANCELLED = 'cancelled'

Represents a run step that was cancelled.

COMPLETED = 'completed'

Represents a run step that successfully completed.

EXPIRED = 'expired'

Represents a run step that expired before otherwise finishing.

FAILED = 'failed'

Represents a run step that failed.

IN_PROGRESS = 'in_progress'

Represents a run step still in progress.

class azure.ai.projects.models.RunStepStreamEvent(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Run step operation related streaming events.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

THREAD_RUN_STEP_CANCELLED = 'thread.run.step.cancelled'

Event sent when a run step is cancelled. The data of this event is of type RunStep

THREAD_RUN_STEP_COMPLETED = 'thread.run.step.completed'

Event sent when a run step is completed. The data of this event is of type RunStep

THREAD_RUN_STEP_CREATED = 'thread.run.step.created'

Event sent when a new thread run step is created. The data of this event is of type RunStep

THREAD_RUN_STEP_DELTA = 'thread.run.step.delta'

Event sent when a run step is being streamed. The data of this event is of type RunStepDeltaChunk

THREAD_RUN_STEP_EXPIRED = 'thread.run.step.expired'

Event sent when a run step is expired. The data of this event is of type RunStep

THREAD_RUN_STEP_FAILED = 'thread.run.step.failed'

Event sent when a run step fails. The data of this event is of type RunStep

THREAD_RUN_STEP_IN_PROGRESS = 'thread.run.step.in_progress'

Event sent when a run step moves to in_progress status. The data of this event is of type RunStep

class azure.ai.projects.models.RunStepToolCall(*args: Any, **kwargs: Any)[source]

An abstract representation of a detailed tool call as recorded within a run step for an existing run.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: RunStepAzureAISearchToolCall, RunStepBingGroundingToolCall, RunStepCodeInterpreterToolCall, RunStepMicrosoftFabricToolCall, RunStepFileSearchToolCall, RunStepFunctionToolCall, RunStepSharepointToolCall

Variables:
  • type (str) – The object type. Required. Default value is None.

  • id (str) – The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

id: str

The ID of the tool call. This ID must be referenced when you submit tool outputs. Required.

type: str

The object type. Required. Default value is None.

class azure.ai.projects.models.RunStepToolCallDetails(*args: Any, **kwargs: Any)[source]

The detailed information associated with a run step calling tools.

Variables:
  • type (str or TOOL_CALLS) – The object type, which is always ‘tool_calls’. Required. Represents a run step that calls tools.

  • tool_calls (list[RunStepToolCall]) – A list of tool call details for this run step. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

tool_calls: List[_models.RunStepToolCall]

A list of tool call details for this run step. Required.

type: Literal[RunStepType.TOOL_CALLS]

The object type, which is always ‘tool_calls’. Required. Represents a run step that calls tools.

class azure.ai.projects.models.RunStepType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The possible types of run steps.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

MESSAGE_CREATION = 'message_creation'

Represents a run step to create a message.

TOOL_CALLS = 'tool_calls'

Represents a run step that calls tools.

class azure.ai.projects.models.RunStreamEvent(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Run operation related streaming events.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

THREAD_RUN_CANCELLED = 'thread.run.cancelled'

Event sent when a run is cancelled. The data of this event is of type ThreadRun

THREAD_RUN_CANCELLING = 'thread.run.cancelling'

Event sent when a run moves to cancelling status. The data of this event is of type ThreadRun

THREAD_RUN_COMPLETED = 'thread.run.completed'

Event sent when a run is completed. The data of this event is of type ThreadRun

THREAD_RUN_CREATED = 'thread.run.created'

Event sent when a new run is created. The data of this event is of type ThreadRun

THREAD_RUN_EXPIRED = 'thread.run.expired'

Event sent when a run is expired. The data of this event is of type ThreadRun

THREAD_RUN_FAILED = 'thread.run.failed'

Event sent when a run fails. The data of this event is of type ThreadRun

THREAD_RUN_INCOMPLETE = 'thread.run.incomplete'

Event sent when a run ends incomplete. The data of this event is of type ThreadRun

THREAD_RUN_IN_PROGRESS = 'thread.run.in_progress'

Event sent when a run moves to in_progress status. The data of this event is of type ThreadRun

THREAD_RUN_QUEUED = 'thread.run.queued'

Event sent when a run moves to queued status. The data of this event is of type ThreadRun

THREAD_RUN_REQUIRES_ACTION = 'thread.run.requires_action'

Event sent when a run moves to requires_action status. The data of this event is of type ThreadRun

class azure.ai.projects.models.SASTokenCredential(*, sas_token: str, credential: TokenCredential, subscription_id: str, resource_group_name: str, project_name: str, connection_name: str)[source]
get_token(*scopes: str, claims: str | None = None, tenant_id: str | None = None, enable_cae: bool = False, **kwargs: Any) AccessToken[source]

Request an access token for scopes.

Parameters:

scopes (str) – The type of access needed.

Keyword Arguments:
  • claims (str) – Additional claims required in the token, such as those returned in a resource provider’s claims challenge following an authorization failure.

  • tenant_id (str) – Optional tenant to include in the token request.

  • enable_cae (bool) – Indicates whether to enable Continuous Access Evaluation (CAE) for the requested token. Defaults to False.

Return type:

AccessToken

Returns:

An AccessToken instance containing the token string and its expiration time in Unix time.

class azure.ai.projects.models.SharepointTool(connection_id: str)[source]

A tool that searches for information using Sharepoint.

Initialize ConnectionTool with a connection_id.

Parameters:

connection_id – Connection ID used by tool. All connection tools allow only one connection.

execute(tool_call: Any) Any

Execute the tool with the provided tool call.

Parameters:

tool_call (Any) – The tool call to execute.

Returns:

The output of the tool operations.

property definitions: List[SharepointToolDefinition]

Get the Sharepoint tool definitions.

Return type:

List[ToolDefinition]

property resources: ToolResources

Get the connection tool resources.

Return type:

ToolResources

class azure.ai.projects.models.SharepointToolDefinition(*args: Any, **kwargs: Any)[source]

The input definition information for a sharepoint tool as used to configure an agent.

Variables:
  • type (str) – The object type, which is always ‘sharepoint_grounding’. Required. Default value is “sharepoint_grounding”.

  • sharepoint_grounding (ToolConnectionList) – The list of connections used by the SharePoint tool. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

sharepoint_grounding: _models.ToolConnectionList

The list of connections used by the SharePoint tool. Required.

type: Literal['sharepoint_grounding']

The object type, which is always ‘sharepoint_grounding’. Required. Default value is “sharepoint_grounding”.

class azure.ai.projects.models.SubmitToolOutputsAction(*args: Any, **kwargs: Any)[source]

The details for required tool calls that must be submitted for an agent thread run to continue.

Variables:
  • type (str) – The object type, which is always ‘submit_tool_outputs’. Required. Default value is “submit_tool_outputs”.

  • submit_tool_outputs (SubmitToolOutputsDetails) – The details describing tools that should be called to submit tool outputs. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

submit_tool_outputs: _models.SubmitToolOutputsDetails

The details describing tools that should be called to submit tool outputs. Required.

type: Literal['submit_tool_outputs']

The object type, which is always ‘submit_tool_outputs’. Required. Default value is “submit_tool_outputs”.

class azure.ai.projects.models.SubmitToolOutputsDetails(*args: Any, **kwargs: Any)[source]

The details describing tools that should be called to submit tool outputs.

Variables:

tool_calls (list[RequiredToolCall]) – The list of tool calls that must be resolved for the agent thread run to continue. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

tool_calls: List[_models.RequiredToolCall]

The list of tool calls that must be resolved for the agent thread run to continue. Required.

class azure.ai.projects.models.SystemData(*args: Any, **kwargs: Any)[source]

Metadata pertaining to creation and last modification of the resource.

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

Variables:
  • created_at (datetime) – The timestamp the resource was created at.

  • created_by (str) – The identity that created the resource.

  • created_by_type (str) – The identity type that created the resource.

  • last_modified_at (datetime) – The timestamp of resource last modification (UTC).

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

created_at: datetime | None

The timestamp the resource was created at.

created_by: str | None

The identity that created the resource.

created_by_type: str | None

The identity type that created the resource.

last_modified_at: datetime | None

The timestamp of resource last modification (UTC).

class azure.ai.projects.models.ThreadDeletionStatus(*args: Any, **kwargs: Any)[source]

The status of a thread deletion operation.

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

Variables:
  • id (str) – The ID of the resource specified for deletion. Required.

  • deleted (bool) – A value indicating whether deletion was successful. Required.

  • object (str) – The object type, which is always ‘thread.deleted’. Required. Default value is “thread.deleted”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

deleted: bool

A value indicating whether deletion was successful. Required.

id: str

The ID of the resource specified for deletion. Required.

object: Literal['thread.deleted']

The object type, which is always ‘thread.deleted’. Required. Default value is “thread.deleted”.

class azure.ai.projects.models.ThreadMessage(*args: Any, **kwargs: Any)[source]
as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

assistant_id: str

If applicable, the ID of the agent that authored this message. Required.

attachments: List['_models.MessageAttachment']

A list of files attached to the message, and the tools they were added to. Required.

completed_at: datetime.datetime

The Unix timestamp (in seconds) for when the message was completed. Required.

content: List['_models.MessageContent']

The list of content items associated with the agent thread message. Required.

created_at: datetime.datetime

The Unix timestamp, in seconds, representing when this object was created. Required.

property file_citation_annotations: List[MessageTextFileCitationAnnotation]

Returns all file citation annotations from text message annotations in the messages.

Return type:

List[MessageTextFileCitationAnnotation]

property file_path_annotations: List[MessageTextFilePathAnnotation]

Returns all file path annotations from text message annotations in the messages.

Return type:

List[MessageTextFilePathAnnotation]

id: str

The identifier, which can be referenced in API endpoints. Required.

property image_contents: List[MessageImageFileContent]

Returns all image file contents from image message contents in the messages.

Return type:

List[MessageImageFileContent]

incomplete_at: datetime.datetime

The Unix timestamp (in seconds) for when the message was marked as incomplete. Required.

incomplete_details: _models.MessageIncompleteDetails

On an incomplete message, details about why the message is incomplete. Required.

metadata: Dict[str, str]

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required.

object: Literal['thread.message']

The object type, which is always ‘thread.message’. Required. Default value is “thread.message”.

role: str | '_models.MessageRole'

“user” and “assistant”.

Type:

The role associated with the agent thread message. Required. Known values are

run_id: str

If applicable, the ID of the run associated with the authoring of this message. Required.

status: str | '_models.MessageStatus'

“in_progress”, “incomplete”, and “completed”.

Type:

The status of the message. Required. Known values are

property text_messages: List[MessageTextContent]

Returns all text message contents in the messages.

Return type:

List[MessageTextContent]

thread_id: str

The ID of the thread that this message belongs to. Required.

class azure.ai.projects.models.ThreadMessageOptions(*args: Any, **kwargs: Any)[source]

A single message within an agent thread, as provided during that thread’s creation for its initial state.

All required parameters must be populated in order to send to server.

Variables:
  • role (str or MessageRole) –

    The role of the entity that is creating the message. Allowed values include:

    • user: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.

    • assistant: Indicates the message is generated by the agent. Use this value to insert messages from the agent into the conversation. Required. Known values are: “user” and “assistant”.

  • content (str) – The textual content of the initial message. Currently, robust input including images and annotated text may only be provided via a separate call to the create message API. Required.

  • attachments (list[MessageAttachment]) – A list of files attached to the message, and the tools they should be added to.

  • metadata (dict[str, str]) – A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

attachments: List[_models.MessageAttachment] | None

A list of files attached to the message, and the tools they should be added to.

content: str

The textual content of the initial message. Currently, robust input including images and annotated text may only be provided via a separate call to the create message API. Required.

metadata: Dict[str, str] | None

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

role: str | _models.MessageRole

The role of the entity that is creating the message. Allowed values include:

  • user: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.

  • assistant: Indicates the message is generated by the agent. Use this value to insert messages from the agent into the conversation. Required. Known values are: “user” and “assistant”.

class azure.ai.projects.models.ThreadRun(*args: Any, **kwargs: Any)[source]

Data representing a single evaluation run of an agent thread.

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

Variables:
  • id (str) – The identifier, which can be referenced in API endpoints. Required.

  • object (str) – The object type, which is always ‘thread.run’. Required. Default value is “thread.run”.

  • thread_id (str) – The ID of the thread associated with this run. Required.

  • assistant_id (str) – The ID of the agent associated with the thread this run was performed against. Required.

  • status (str or RunStatus) – The status of the agent thread run. Required. Known values are: “queued”, “in_progress”, “requires_action”, “cancelling”, “cancelled”, “failed”, “completed”, and “expired”.

  • required_action (RequiredAction) – The details of the action required for the agent thread run to continue.

  • last_error (RunError) – The last error, if any, encountered by this agent thread run. Required.

  • model (str) – The ID of the model to use. Required.

  • instructions (str) – The overridden system instructions used for this agent thread run. Required.

  • tools (list[ToolDefinition]) – The overridden enabled tools used for this agent thread run. Required.

  • created_at (datetime) – The Unix timestamp, in seconds, representing when this object was created. Required.

  • expires_at (datetime) – The Unix timestamp, in seconds, representing when this item expires. Required.

  • started_at (datetime) – The Unix timestamp, in seconds, representing when this item was started. Required.

  • completed_at (datetime) – The Unix timestamp, in seconds, representing when this completed. Required.

  • cancelled_at (datetime) – The Unix timestamp, in seconds, representing when this was cancelled. Required.

  • failed_at (datetime) – The Unix timestamp, in seconds, representing when this failed. Required.

  • incomplete_details (IncompleteRunDetails) – Details on why the run is incomplete. Will be null if the run is not incomplete. Required.

  • usage (RunCompletionUsage) – Usage statistics related to the run. This value will be null if the run is not in a terminal state (i.e. in_progress, queued, etc.). Required.

  • temperature (float) – The sampling temperature used for this run. If not set, defaults to 1.

  • top_p (float) – The nucleus sampling value used for this run. If not set, defaults to 1.

  • max_prompt_tokens (int) – The maximum number of prompt tokens specified to have been used over the course of the run. Required.

  • max_completion_tokens (int) – The maximum number of completion tokens specified to have been used over the course of the run. Required.

  • truncation_strategy (TruncationObject) – The strategy to use for dropping messages as the context windows moves forward. Required.

  • tool_choice (str or str or AgentsApiToolChoiceOptionMode or AgentsNamedToolChoice) – Controls whether or not and which tool is called by the model. Required. Is one of the following types: str, Union[str, “_models.AgentsApiToolChoiceOptionMode”], AgentsNamedToolChoice

  • response_format (str or str or AgentsApiResponseFormatMode or AgentsApiResponseFormat or ResponseFormatJsonSchemaType) – The response format of the tool calls used in this run. Required. Is one of the following types: str, Union[str, “_models.AgentsApiResponseFormatMode”], AgentsApiResponseFormat, ResponseFormatJsonSchemaType

  • metadata (dict[str, str]) – A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required.

  • tool_resources (UpdateToolResourcesOptions) – Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis.

  • parallel_tool_calls (bool) – Determines if tools can be executed in parallel within the run. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

assistant_id: str

The ID of the agent associated with the thread this run was performed against. Required.

cancelled_at: datetime

The Unix timestamp, in seconds, representing when this was cancelled. Required.

completed_at: datetime

The Unix timestamp, in seconds, representing when this completed. Required.

created_at: datetime

The Unix timestamp, in seconds, representing when this object was created. Required.

expires_at: datetime

The Unix timestamp, in seconds, representing when this item expires. Required.

failed_at: datetime

The Unix timestamp, in seconds, representing when this failed. Required.

id: str

The identifier, which can be referenced in API endpoints. Required.

incomplete_details: _models.IncompleteRunDetails

Details on why the run is incomplete. Will be null if the run is not incomplete. Required.

instructions: str

The overridden system instructions used for this agent thread run. Required.

last_error: _models.RunError

The last error, if any, encountered by this agent thread run. Required.

max_completion_tokens: int

The maximum number of completion tokens specified to have been used over the course of the run. Required.

max_prompt_tokens: int

The maximum number of prompt tokens specified to have been used over the course of the run. Required.

metadata: Dict[str, str]

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required.

model: str

The ID of the model to use. Required.

object: Literal['thread.run']

The object type, which is always ‘thread.run’. Required. Default value is “thread.run”.

parallel_tool_calls: bool

Determines if tools can be executed in parallel within the run. Required.

required_action: _models.RequiredAction | None

The details of the action required for the agent thread run to continue.

response_format: _types.AgentsApiResponseFormatOption

The response format of the tool calls used in this run. Required. Is one of the following types: str, Union[str, “_models.AgentsApiResponseFormatMode”], AgentsApiResponseFormat, ResponseFormatJsonSchemaType

started_at: datetime

The Unix timestamp, in seconds, representing when this item was started. Required.

status: str | _models.RunStatus

“queued”, “in_progress”, “requires_action”, “cancelling”, “cancelled”, “failed”, “completed”, and “expired”.

Type:

The status of the agent thread run. Required. Known values are

temperature: float | None

The sampling temperature used for this run. If not set, defaults to 1.

thread_id: str

The ID of the thread associated with this run. Required.

tool_choice: _types.AgentsApiToolChoiceOption

Controls whether or not and which tool is called by the model. Required. Is one of the following types: str, Union[str, “_models.AgentsApiToolChoiceOptionMode”], AgentsNamedToolChoice

tool_resources: _models.UpdateToolResourcesOptions | None

Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis.

tools: List[_models.ToolDefinition]

The overridden enabled tools used for this agent thread run. Required.

top_p: float | None

The nucleus sampling value used for this run. If not set, defaults to 1.

truncation_strategy: _models.TruncationObject

The strategy to use for dropping messages as the context windows moves forward. Required.

usage: _models.RunCompletionUsage

Usage statistics related to the run. This value will be null if the run is not in a terminal state (i.e. in_progress, queued, etc.). Required.

class azure.ai.projects.models.ThreadStreamEvent(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Thread operation related streaming events.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

THREAD_CREATED = 'thread.created'

Event sent when a new thread is created. The data of this event is of type AgentThread

class azure.ai.projects.models.Tool[source]

An abstract class representing a tool that can be used by an agent.

abstract execute(tool_call: Any) Any[source]

Execute the tool with the provided tool call.

Parameters:

tool_call (Any) – The tool call to execute.

Returns:

The output of the tool operations.

abstract property definitions: List[ToolDefinitionT]

Get the tool definitions.

abstract property resources: ToolResources

Get the tool resources.

class azure.ai.projects.models.ToolConnection(*args: Any, **kwargs: Any)[source]

A connection resource.

Variables:

connection_id (str) – A connection in a ToolConnectionList attached to this tool. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

connection_id: str

A connection in a ToolConnectionList attached to this tool. Required.

class azure.ai.projects.models.ToolConnectionList(*args: Any, **kwargs: Any)[source]

A set of connection resources currently used by either the bing_grounding, fabric_aiskill, or sharepoint_grounding tools.

Variables:

connection_list (list[ToolConnection]) – The connections attached to this tool. There can be a maximum of 1 connection resource attached to the tool.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

connection_list: List[_models.ToolConnection] | None

The connections attached to this tool. There can be a maximum of 1 connection resource attached to the tool.

class azure.ai.projects.models.ToolDefinition(*args: Any, **kwargs: Any)[source]

An abstract representation of an input tool definition that an agent can use.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: AzureAISearchToolDefinition, AzureFunctionToolDefinition, BingGroundingToolDefinition, CodeInterpreterToolDefinition, MicrosoftFabricToolDefinition, FileSearchToolDefinition, FunctionToolDefinition, OpenApiToolDefinition, SharepointToolDefinition

Variables:

type (str) – The object type. Required. Default value is None.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: str

The object type. Required. Default value is None.

class azure.ai.projects.models.ToolOutput(*args: Any, **kwargs: Any)[source]

The data provided during a tool outputs submission to resolve pending tool calls and allow the model to continue.

Variables:
  • tool_call_id (str) – The ID of the tool call being resolved, as provided in the tool calls of a required action from a run.

  • output (str) – The output from the tool to be submitted.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

output: str | None

The output from the tool to be submitted.

tool_call_id: str | None

The ID of the tool call being resolved, as provided in the tool calls of a required action from a run.

class azure.ai.projects.models.ToolResources(*args: Any, **kwargs: Any)[source]

A set of resources that are used by the agent’s tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

Variables:
  • code_interpreter (CodeInterpreterToolResource) – Resources to be used by the code_interpreter tool consisting of file IDs.

  • file_search (FileSearchToolResource) – Resources to be used by the file_search tool consisting of vector store IDs.

  • azure_ai_search (AzureAISearchResource) – Resources to be used by the azure_ai_search tool consisting of index IDs and names.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

Resources to be used by the azure_ai_search tool consisting of index IDs and names.

code_interpreter: _models.CodeInterpreterToolResource | None

Resources to be used by the code_interpreter tool consisting of file IDs.

Resources to be used by the file_search tool consisting of vector store IDs.

class azure.ai.projects.models.ToolSet[source]

A collection of tools that can be used by an synchronize agent.

add(tool: Tool)

Add a tool to the tool set.

Parameters:

tool (Tool) – The tool to add.

Raises:

ValueError – If a tool of the same type already exists.

execute_tool_calls(tool_calls: List[Any]) Any[source]

Execute a tool of the specified type with the provided tool calls.

Parameters:

tool_calls (List[Any]) – A list of tool calls to execute.

Returns:

The output of the tool operations.

Return type:

Any

get_definitions_and_resources() Dict[str, Any]

Get the definitions and resources for all tools in the tool set.

Returns:

A dictionary containing the tool resources and definitions.

Return type:

Dict[str, Any]

get_tool(tool_type: Type[ToolT]) ToolT

Get a tool of the specified type from the tool set.

Parameters:

tool_type (Type[Tool]) – The type of tool to get.

Returns:

The tool of the specified type.

Return type:

Tool

Raises:

ValueError – If a tool of the specified type is not found.

remove(tool_type: Type[Tool]) None

Remove a tool of the specified type from the tool set.

Parameters:

tool_type (Type[Tool]) – The type of tool to remove.

Raises:

ValueError – If a tool of the specified type is not found.

validate_tool_type(tool: Tool) None[source]

Validate the type of the tool.

Parameters:

tool (Tool) – The type of the tool to validate.

Raises:

ValueError – If the tool type is not a subclass of Tool.

property definitions: List[ToolDefinition]

Get the definitions for all tools in the tool set.

Return type:

List[ToolDefinition]

property resources: ToolResources

Get the resources for all tools in the tool set.

Return type:

ToolResources

class azure.ai.projects.models.Trigger(*args: Any, **kwargs: Any)[source]

Abstract data class for input data configuration.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: CronTrigger, RecurrenceTrigger

Variables:

type (str) – Type of the trigger. Required. Default value is None.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: str

Type of the trigger. Required. Default value is None.

class azure.ai.projects.models.TruncationObject(*args: Any, **kwargs: Any)[source]

Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run.

Variables:
  • type (str or TruncationStrategy) – The truncation strategy to use for the thread. The default is auto. If set to last_messages, the thread will be truncated to the lastMessages count most recent messages in the thread. When set to auto, messages in the middle of the thread will be dropped to fit the context length of the model, max_prompt_tokens. Required. Known values are: “auto” and “last_messages”.

  • last_messages (int) – The number of most recent messages from the thread when constructing the context for the run.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

last_messages: int | None

The number of most recent messages from the thread when constructing the context for the run.

type: str | _models.TruncationStrategy

The truncation strategy to use for the thread. The default is auto. If set to last_messages, the thread will be truncated to the lastMessages count most recent messages in the thread. When set to auto, messages in the middle of the thread will be dropped to fit the context length of the model, max_prompt_tokens. Required. Known values are: “auto” and “last_messages”.

class azure.ai.projects.models.TruncationStrategy(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Possible truncation strategies for the thread.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AUTO = 'auto'

Default value. Messages in the middle of the thread will be dropped to fit the context length of the model.

LAST_MESSAGES = 'last_messages'

The thread will truncate to the lastMessages count of recent messages.

class azure.ai.projects.models.UpdateCodeInterpreterToolResourceOptions(*args: Any, **kwargs: Any)[source]

Request object to update code_interpreted tool resources.

Variables:

file_ids (list[str]) – A list of file IDs to override the current list of the agent.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

file_ids: List[str] | None

A list of file IDs to override the current list of the agent.

class azure.ai.projects.models.UpdateFileSearchToolResourceOptions(*args: Any, **kwargs: Any)[source]

Request object to update file_search tool resources.

Variables:

vector_store_ids (list[str]) – A list of vector store IDs to override the current list of the agent.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

vector_store_ids: List[str] | None

A list of vector store IDs to override the current list of the agent.

class azure.ai.projects.models.UpdateToolResourcesOptions(*args: Any, **kwargs: Any)[source]

Request object. A set of resources that are used by the agent’s tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

Variables:
  • code_interpreter (UpdateCodeInterpreterToolResourceOptions) – Overrides the list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.

  • file_search (UpdateFileSearchToolResourceOptions) – Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.

  • azure_ai_search (AzureAISearchResource) – Overrides the resources to be used by the azure_ai_search tool consisting of index IDs and names.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

Overrides the resources to be used by the azure_ai_search tool consisting of index IDs and names.

code_interpreter: _models.UpdateCodeInterpreterToolResourceOptions | None

Overrides the list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.

Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.

class azure.ai.projects.models.VectorStore(*args: Any, **kwargs: Any)[source]

A vector store is a collection of processed files can be used by the file_search tool.

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

Variables:
  • id (str) – The identifier, which can be referenced in API endpoints. Required.

  • object (str) – The object type, which is always vector_store. Required. Default value is “vector_store”.

  • created_at (datetime) – The Unix timestamp (in seconds) for when the vector store was created. Required.

  • name (str) – The name of the vector store. Required.

  • usage_bytes (int) – The total number of bytes used by the files in the vector store. Required.

  • file_counts (VectorStoreFileCount) – Files count grouped by status processed or being processed by this vector store. Required.

  • status (str or VectorStoreStatus) – The status of the vector store, which can be either expired, in_progress, or completed. A status of completed indicates that the vector store is ready for use. Required. Known values are: “expired”, “in_progress”, and “completed”.

  • expires_after (VectorStoreExpirationPolicy) – Details on when this vector store expires.

  • expires_at (datetime) – The Unix timestamp (in seconds) for when the vector store will expire.

  • last_active_at (datetime) – The Unix timestamp (in seconds) for when the vector store was last active. Required.

  • metadata (dict[str, str]) – A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

created_at: datetime

The Unix timestamp (in seconds) for when the vector store was created. Required.

expires_after: _models.VectorStoreExpirationPolicy | None

Details on when this vector store expires.

expires_at: datetime | None

The Unix timestamp (in seconds) for when the vector store will expire.

file_counts: _models.VectorStoreFileCount

Files count grouped by status processed or being processed by this vector store. Required.

id: str

The identifier, which can be referenced in API endpoints. Required.

last_active_at: datetime

The Unix timestamp (in seconds) for when the vector store was last active. Required.

metadata: Dict[str, str]

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. Required.

name: str

The name of the vector store. Required.

object: Literal['vector_store']

The object type, which is always vector_store. Required. Default value is “vector_store”.

status: str | _models.VectorStoreStatus

The status of the vector store, which can be either expired, in_progress, or completed. A status of completed indicates that the vector store is ready for use. Required. Known values are: “expired”, “in_progress”, and “completed”.

usage_bytes: int

The total number of bytes used by the files in the vector store. Required.

class azure.ai.projects.models.VectorStoreAutoChunkingStrategyRequest(*args: Any, **kwargs: Any)[source]

The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400.

All required parameters must be populated in order to send to server.

Variables:

type (str or AUTO) – The object type, which is always ‘auto’. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: Literal[VectorStoreChunkingStrategyRequestType.AUTO]

The object type, which is always ‘auto’. Required.

class azure.ai.projects.models.VectorStoreAutoChunkingStrategyResponse(*args: Any, **kwargs: Any)[source]

This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the chunking_strategy concept was introduced in the API.

Variables:

type (str or OTHER) – The object type, which is always ‘other’. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: Literal[VectorStoreChunkingStrategyResponseType.OTHER]

The object type, which is always ‘other’. Required.

class azure.ai.projects.models.VectorStoreChunkingStrategyRequest(*args: Any, **kwargs: Any)[source]

An abstract representation of a vector store chunking strategy configuration.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: VectorStoreAutoChunkingStrategyRequest, VectorStoreStaticChunkingStrategyRequest

All required parameters must be populated in order to send to server.

Variables:

type (str or VectorStoreChunkingStrategyRequestType) – The object type. Required. Known values are: “auto” and “static”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: str

“auto” and “static”.

Type:

The object type. Required. Known values are

class azure.ai.projects.models.VectorStoreChunkingStrategyRequestType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Type of chunking strategy.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AUTO = 'auto'
STATIC = 'static'
class azure.ai.projects.models.VectorStoreChunkingStrategyResponse(*args: Any, **kwargs: Any)[source]

An abstract representation of a vector store chunking strategy configuration.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: VectorStoreAutoChunkingStrategyResponse, VectorStoreStaticChunkingStrategyResponse

Variables:

type (str or VectorStoreChunkingStrategyResponseType) – The object type. Required. Known values are: “other” and “static”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

type: str

“other” and “static”.

Type:

The object type. Required. Known values are

class azure.ai.projects.models.VectorStoreChunkingStrategyResponseType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Type of chunking strategy.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

OTHER = 'other'
STATIC = 'static'
class azure.ai.projects.models.VectorStoreConfiguration(*args: Any, **kwargs: Any)[source]

Vector storage configuration is the list of data sources, used when multiple files can be used for the enterprise file search.

Variables:

data_sources (list[VectorStoreDataSource]) – Data sources. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

data_sources: List[_models.VectorStoreDataSource]

Data sources. Required.

class azure.ai.projects.models.VectorStoreConfigurations(*args: Any, **kwargs: Any)[source]

The structure, containing the list of vector storage configurations i.e. the list of azure asset IDs.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

store_configuration: _models.VectorStoreConfiguration

Configurations. Required.

store_name: str

Name. Required.

class azure.ai.projects.models.VectorStoreDataSource(*args: Any, **kwargs: Any)[source]

The structure, containing Azure asset URI path and the asset type of the file used as a data source for the enterprise file search.

Variables:
  • asset_identifier (str) – Asset URI. Required.

  • asset_type (str or VectorStoreDataSourceAssetType) – The asset type. Required. Known values are: “uri_asset” and “id_asset”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

asset_identifier: str

Asset URI. Required.

asset_type: str | _models.VectorStoreDataSourceAssetType

“uri_asset” and “id_asset”.

Type:

The asset type. Required. Known values are

class azure.ai.projects.models.VectorStoreDataSourceAssetType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Type of vector storage asset. Asset type may be a uri_asset, in this case it should contain asset URI ID, in the case of id_asset it should contain the data ID.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ID_ASSET = 'id_asset'

The data ID

URI_ASSET = 'uri_asset'

Azure URI

class azure.ai.projects.models.VectorStoreDeletionStatus(*args: Any, **kwargs: Any)[source]

Response object for deleting a vector store.

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

Variables:
  • id (str) – The ID of the resource specified for deletion. Required.

  • deleted (bool) – A value indicating whether deletion was successful. Required.

  • object (str) – The object type, which is always ‘vector_store.deleted’. Required. Default value is “vector_store.deleted”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

deleted: bool

A value indicating whether deletion was successful. Required.

id: str

The ID of the resource specified for deletion. Required.

object: Literal['vector_store.deleted']

The object type, which is always ‘vector_store.deleted’. Required. Default value is “vector_store.deleted”.

class azure.ai.projects.models.VectorStoreExpirationPolicy(*args: Any, **kwargs: Any)[source]

The expiration policy for a vector store.

Variables:
  • anchor (str or VectorStoreExpirationPolicyAnchor) – Anchor timestamp after which the expiration policy applies. Supported anchors: last_active_at. Required. “last_active_at”

  • days (int) – The anchor timestamp after which the expiration policy applies. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

anchor: str | _models.VectorStoreExpirationPolicyAnchor

Anchor timestamp after which the expiration policy applies. Supported anchors: last_active_at. Required. “last_active_at”

days: int

The anchor timestamp after which the expiration policy applies. Required.

class azure.ai.projects.models.VectorStoreExpirationPolicyAnchor(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Describes the relationship between the days and the expiration of this vector store.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

LAST_ACTIVE_AT = 'last_active_at'

The expiration policy is based on the last time the vector store was active.

class azure.ai.projects.models.VectorStoreFile(*args: Any, **kwargs: Any)[source]

Description of a file attached to a vector store.

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

Variables:
  • id (str) – The identifier, which can be referenced in API endpoints. Required.

  • object (str) – The object type, which is always vector_store.file. Required. Default value is “vector_store.file”.

  • usage_bytes (int) – The total vector store usage in bytes. Note that this may be different from the original file size. Required.

  • created_at (datetime) – The Unix timestamp (in seconds) for when the vector store file was created. Required.

  • vector_store_id (str) – The ID of the vector store that the file is attached to. Required.

  • status (str or VectorStoreFileStatus) – The status of the vector store file, which can be either in_progress, completed, cancelled, or failed. The status completed indicates that the vector store file is ready for use. Required. Known values are: “in_progress”, “completed”, “failed”, and “cancelled”.

  • last_error (VectorStoreFileError) – The last error associated with this vector store file. Will be null if there are no errors. Required.

  • chunking_strategy (VectorStoreChunkingStrategyResponse) – The strategy used to chunk the file. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

chunking_strategy: _models.VectorStoreChunkingStrategyResponse

The strategy used to chunk the file. Required.

created_at: datetime

The Unix timestamp (in seconds) for when the vector store file was created. Required.

id: str

The identifier, which can be referenced in API endpoints. Required.

last_error: _models.VectorStoreFileError

The last error associated with this vector store file. Will be null if there are no errors. Required.

object: Literal['vector_store.file']

The object type, which is always vector_store.file. Required. Default value is “vector_store.file”.

status: str | _models.VectorStoreFileStatus

The status of the vector store file, which can be either in_progress, completed, cancelled, or failed. The status completed indicates that the vector store file is ready for use. Required. Known values are: “in_progress”, “completed”, “failed”, and “cancelled”.

usage_bytes: int

The total vector store usage in bytes. Note that this may be different from the original file size. Required.

vector_store_id: str

The ID of the vector store that the file is attached to. Required.

class azure.ai.projects.models.VectorStoreFileBatch(*args: Any, **kwargs: Any)[source]

A batch of files attached to a vector store.

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

Variables:
  • id (str) – The identifier, which can be referenced in API endpoints. Required.

  • object (str) – The object type, which is always vector_store.file_batch. Required. Default value is “vector_store.files_batch”.

  • created_at (datetime) – The Unix timestamp (in seconds) for when the vector store files batch was created. Required.

  • vector_store_id (str) – The ID of the vector store that the file is attached to. Required.

  • status (str or VectorStoreFileBatchStatus) – The status of the vector store files batch, which can be either in_progress, completed, cancelled or failed. Required. Known values are: “in_progress”, “completed”, “cancelled”, and “failed”.

  • file_counts (VectorStoreFileCount) – Files count grouped by status processed or being processed by this vector store. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

created_at: datetime

The Unix timestamp (in seconds) for when the vector store files batch was created. Required.

file_counts: _models.VectorStoreFileCount

Files count grouped by status processed or being processed by this vector store. Required.

id: str

The identifier, which can be referenced in API endpoints. Required.

object: Literal['vector_store.files_batch']

The object type, which is always vector_store.file_batch. Required. Default value is “vector_store.files_batch”.

status: str | _models.VectorStoreFileBatchStatus

The status of the vector store files batch, which can be either in_progress, completed, cancelled or failed. Required. Known values are: “in_progress”, “completed”, “cancelled”, and “failed”.

vector_store_id: str

The ID of the vector store that the file is attached to. Required.

class azure.ai.projects.models.VectorStoreFileBatchStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The status of the vector store file batch.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

CANCELLED = 'cancelled'

The vector store file batch was cancelled.

COMPLETED = 'completed'

the vector store file batch is ready for use.

FAILED = 'failed'

The vector store file batch failed to process.

IN_PROGRESS = 'in_progress'

The vector store is still processing this file batch.

class azure.ai.projects.models.VectorStoreFileCount(*args: Any, **kwargs: Any)[source]

Counts of files processed or being processed by this vector store grouped by status.

Variables:
  • in_progress (int) – The number of files that are currently being processed. Required.

  • completed (int) – The number of files that have been successfully processed. Required.

  • failed (int) – The number of files that have failed to process. Required.

  • cancelled (int) – The number of files that were cancelled. Required.

  • total (int) – The total number of files. Required.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

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

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

cancelled: int

The number of files that were cancelled. Required.

completed: int

The number of files that have been successfully processed. Required.

failed: int

The number of files that have failed to process. Required.

in_progress: int

The number of files that are currently being processed. Required.

total: int

The total number of files. Required.

class azure.ai.projects.models.VectorStoreFileDeletionStatus(*args: Any, **kwargs: Any)[source]

Response object for deleting a vector store file relationship.

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

Variables:
  • id (str) – The ID of the resource specified for deletion. Required.

  • deleted (bool) – A value indicating whether deletion was successful. Required.

  • object (str) – The object type, which is always ‘vector_store.deleted’. Required. Default value is “vector_store.file.deleted”.

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

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

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

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

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

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

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

update(*args: Any, **kwargs: Any) None

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

deleted: bool

A value indicating whether deletion was successful. Required.

id: str

The ID of the resource specified for deletion. Required.

object: Literal['vector_store.file.deleted']

The object type, which is always ‘vector_store.deleted’. Required. Default value is “vector_store.file.deleted”.

class azure.ai.projects.models.VectorStoreFileError(*args: Any, **kwargs: Any)[source]

Details on the error that may have occurred while processing a file for this vector store.

Variables:
  • code (str or VectorStoreFileErrorCode) – One of server_error or rate_limit_exceeded. Required. Known values are: “server_error”, “invalid_file”, and “unsupported_file”.

  • message (str) – A human-readable description of the error. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be turned into json using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

pop(key: str, default: ~typing.Any = <object object>) Any

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

setdefault(key: str, default: ~typing.Any = <object object>) Any

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

update(*args: Any, **kwargs: Any) None

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

code: str | _models.VectorStoreFileErrorCode

One of server_error or rate_limit_exceeded. Required. Known values are: “server_error”, “invalid_file”, and “unsupported_file”.

message: str

A human-readable description of the error. Required.

class azure.ai.projects.models.VectorStoreFileErrorCode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Error code variants for vector store file processing.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

INVALID_FILE = 'invalid_file'

The file is not valid.

SERVER_ERROR = 'server_error'

An server error occurred.

UNSUPPORTED_FILE = 'unsupported_file'

The file is of unsupported type.

class azure.ai.projects.models.VectorStoreFileStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Vector store file status.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

CANCELLED = 'cancelled'

The file was cancelled.

COMPLETED = 'completed'

The file has been successfully processed.

FAILED = 'failed'

The file has failed to process.

IN_PROGRESS = 'in_progress'

The file is currently being processed.

class azure.ai.projects.models.VectorStoreFileStatusFilter(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Query parameter filter for vector store file retrieval endpoint.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

CANCELLED = 'cancelled'

Retrieve only files that were cancelled

COMPLETED = 'completed'

Retrieve only files that have been successfully processed

FAILED = 'failed'

Retrieve only files that have failed to process

IN_PROGRESS = 'in_progress'

Retrieve only files that are currently being processed

class azure.ai.projects.models.VectorStoreStaticChunkingStrategyOptions(*args: Any, **kwargs: Any)[source]

Options to configure a vector store static chunking strategy.

Variables:
  • max_chunk_size_tokens (int) – The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. Required.

  • chunk_overlap_tokens (int) – The number of tokens that overlap between chunks. The default value is 400. Note that the overlap must not exceed half of max_chunk_size_tokens. Required.

as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be turned into json using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

pop(key: str, default: ~typing.Any = <object object>) Any

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

setdefault(key: str, default: ~typing.Any = <object object>) Any

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

update(*args: Any, **kwargs: Any) None

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

chunk_overlap_tokens: int

The number of tokens that overlap between chunks. The default value is 400. Note that the overlap must not exceed half of max_chunk_size_tokens. Required.

max_chunk_size_tokens: int

The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. Required.

class azure.ai.projects.models.VectorStoreStaticChunkingStrategyRequest(*args: Any, **kwargs: Any)[source]

A statically configured chunking strategy.

All required parameters must be populated in order to send to server.

Variables:
as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be turned into json using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

pop(key: str, default: ~typing.Any = <object object>) Any

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

setdefault(key: str, default: ~typing.Any = <object object>) Any

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

update(*args: Any, **kwargs: Any) None

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

static: _models.VectorStoreStaticChunkingStrategyOptions

The options for the static chunking strategy. Required.

type: Literal[VectorStoreChunkingStrategyRequestType.STATIC]

The object type, which is always ‘static’. Required.

class azure.ai.projects.models.VectorStoreStaticChunkingStrategyResponse(*args: Any, **kwargs: Any)[source]

A statically configured chunking strategy.

Variables:
as_dict(*, exclude_readonly: bool = False) Dict[str, Any]

Return a dict that can be turned into json using json.dump.

Keyword Arguments:

exclude_readonly (bool) – Whether to remove the readonly properties.

Returns:

A dict JSON compatible object

Return type:

dict

clear() None

Remove all items from D.

copy() Model
get(key: str, default: Any = None) Any

Get the value for key if key is in the dictionary, else default. :param str key: The key to look up. :param any default: The value to return if key is not in the dictionary. Defaults to None :returns: D[k] if k in D, else d. :rtype: any

items() ItemsView[str, Any]
Returns:

set-like object providing a view on D’s items

Return type:

ItemsView

keys() KeysView[str]
Returns:

a set-like object providing a view on D’s keys

Return type:

KeysView

pop(key: str, default: ~typing.Any = <object object>) Any

Removes specified key and return the corresponding value. :param str key: The key to pop. :param any default: The value to return if key is not in the dictionary :returns: The value corresponding to the key. :rtype: any :raises KeyError: If key is not found and default is not given.

popitem() Tuple[str, Any]

Removes and returns some (key, value) pair :returns: The (key, value) pair. :rtype: tuple :raises KeyError: if D is empty.

setdefault(key: str, default: ~typing.Any = <object object>) Any

Same as calling D.get(k, d), and setting D[k]=d if k not found :param str key: The key to look up. :param any default: The value to set if key is not in the dictionary :returns: D[k] if k in D, else d. :rtype: any

update(*args: Any, **kwargs: Any) None

Updates D from mapping/iterable E and F. :param any args: Either a mapping object or an iterable of key-value pairs.

values() ValuesView[Any]
Returns:

an object providing a view on D’s values

Return type:

ValuesView

static: _models.VectorStoreStaticChunkingStrategyOptions

The options for the static chunking strategy. Required.

type: Literal[VectorStoreChunkingStrategyResponseType.STATIC]

The object type, which is always ‘static’. Required.

class azure.ai.projects.models.VectorStoreStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Vector store possible status.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

COMPLETED = 'completed'

completed status indicates that this vector store is ready for use.

EXPIRED = 'expired'

expired status indicates that this vector store has expired and is no longer available for use.

IN_PROGRESS = 'in_progress'

in_progress status indicates that this vector store is still processing files.

class azure.ai.projects.models.WeekDays(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

WeekDay of the schedule - Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

FRIDAY = 'Friday'
MONDAY = 'Monday'
SATURDAY = 'Saturday'
SUNDAY = 'Sunday'
THURSDAY = 'Thursday'
TUESDAY = 'Tuesday'
WEDNESDAY = 'Wednesday'