1
- # pylint: disable=line-too-long,useless-suppression,too-many-lines
1
+ # pylint: disable=line-too-long,useless-suppression,too-many-lines
2
2
# ------------------------------------
3
3
# Copyright (c) Microsoft Corporation.
4
4
# Licensed under the MIT License.
@@ -140,7 +140,7 @@ def create_agent( # pylint: disable=arguments-differ
140
140
:keyword response_format: Specifies the format for the responses, particularly for tool calls.
141
141
Can be a string, response format mode, or structured response format object that defines how
142
142
the agent should structure its outputs.
143
- :type response_format: Optional[Union[str,
143
+ :paramtype response_format: Optional[Union[str,
144
144
~azure.ai.agents.models.AgentsApiResponseFormatMode,
145
145
~azure.ai.agents.models.AgentsApiResponseFormat,
146
146
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
@@ -205,7 +205,7 @@ def create_agent( # pylint: disable=arguments-differ
205
205
:keyword response_format: Specifies the format for the responses, particularly for tool calls.
206
206
Can be a string, response format mode, or structured response format object that defines how
207
207
the agent should structure its outputs.
208
- :type response_format: Optional[Union[str,
208
+ :paramtype response_format: Optional[Union[str,
209
209
~azure.ai.agents.models.AgentsApiResponseFormatMode,
210
210
~azure.ai.agents.models.AgentsApiResponseFormat,
211
211
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
@@ -295,7 +295,7 @@ def create_agent(
295
295
:keyword response_format: Specifies the format for the responses, particularly for tool calls.
296
296
Can be a string, response format mode, or structured response format object that defines how
297
297
the agent should structure its outputs.
298
- :type response_format: Optional[Union[str,
298
+ :paramtype response_format: Optional[Union[str,
299
299
~azure.ai.agents.models.AgentsApiResponseFormatMode,
300
300
~azure.ai.agents.models.AgentsApiResponseFormat,
301
301
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
@@ -392,7 +392,7 @@ def update_agent( # pylint: disable=arguments-differ
392
392
:keyword response_format: Specifies the format for the responses, particularly for tool calls.
393
393
Can be a string, response format mode, or structured response format object that defines how
394
394
the agent should structure its outputs.
395
- :type response_format: Optional[Union[str,
395
+ :paramtype response_format: Optional[Union[str,
396
396
~azure.ai.agents.models.AgentsApiResponseFormatMode,
397
397
~azure.ai.agents.models.AgentsApiResponseFormat,
398
398
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
@@ -458,7 +458,7 @@ def update_agent( # pylint: disable=arguments-differ
458
458
:keyword response_format: Specifies the format for the responses, particularly for tool calls.
459
459
Can be a string, response format mode, or structured response format object that defines how
460
460
the agent should structure its outputs.
461
- :type response_format: Optional[Union[str,
461
+ :paramtype response_format: Optional[Union[str,
462
462
~azure.ai.agents.models.AgentsApiResponseFormatMode,
463
463
~azure.ai.agents.models.AgentsApiResponseFormat,
464
464
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
@@ -569,7 +569,7 @@ def update_agent(
569
569
:keyword response_format: Specifies the format for the responses, particularly for tool calls.
570
570
Can be a string, response format mode, or structured response format object that defines how
571
571
the agent should structure its outputs.
572
- :type response_format: Optional[Union[str,
572
+ :paramtype response_format: Optional[Union[str,
573
573
~azure.ai.agents.models.AgentsApiResponseFormatMode,
574
574
~azure.ai.agents.models.AgentsApiResponseFormat,
575
575
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
@@ -701,45 +701,45 @@ def create_thread_and_run(
701
701
Creates a new agent thread and immediately starts a run using that new thread.
702
702
703
703
:keyword agent_id: The ID of the agent for which the thread should be created. Required.
704
- :type agent_id: str
704
+ :paramtype agent_id: str
705
705
:keyword content_type: Body Parameter content-type for JSON body. Default is "application/json".
706
- :type content_type: str
706
+ :paramtype content_type: str
707
707
:keyword thread: The details used to create the new thread. If none provided, an empty thread is
708
708
created.
709
- :type thread: ~azure.ai.agents.models.AgentThreadCreationOptions
709
+ :paramtype thread: ~azure.ai.agents.models.AgentThreadCreationOptions
710
710
:keyword model: Override the model the agent uses for this run.
711
- :type model: str
711
+ :paramtype model: str
712
712
:keyword instructions: Override the system instructions for this run.
713
- :type instructions: str
713
+ :paramtype instructions: str
714
714
:keyword tools: Override the list of enabled tools for this run.
715
- :type tools: list[~azure.ai.agents.models.ToolDefinition]
715
+ :paramtype tools: list[~azure.ai.agents.models.ToolDefinition]
716
716
:keyword tool_resources: Override the tools the agent can use for this run.
717
- :type tool_resources: ~azure.ai.agents.models.ToolResources
717
+ :paramtype tool_resources: ~azure.ai.agents.models.ToolResources
718
718
:keyword temperature: Sampling temperature between 0 and 2. Higher = more random.
719
- :type temperature: float
719
+ :paramtype temperature: float
720
720
:keyword top_p: Nucleus sampling parameter between 0 and 1.
721
- :type top_p: float
721
+ :paramtype top_p: float
722
722
:keyword max_prompt_tokens: Max prompt tokens to use across the run.
723
- :type max_prompt_tokens: int
723
+ :paramtype max_prompt_tokens: int
724
724
:keyword max_completion_tokens: Max completion tokens to use across the run.
725
- :type max_completion_tokens: int
725
+ :paramtype max_completion_tokens: int
726
726
:keyword truncation_strategy: Strategy for dropping old messages as context grows.
727
- :type truncation_strategy: ~azure.ai.agents.models.TruncationObject
727
+ :paramtype truncation_strategy: ~azure.ai.agents.models.TruncationObject
728
728
:keyword tool_choice: Controls which tool the model will call.
729
- :type tool_choice: str or
729
+ :paramtype tool_choice: str or
730
730
~azure.ai.agents.models.AgentsToolChoiceOptionMode or
731
731
~azure.ai.agents.models.AgentsNamedToolChoice
732
732
:keyword response_format: Specifies the format for the responses, particularly for tool calls.
733
733
Can be a string, response format mode, or structured response format object that defines how
734
734
the agent should structure its outputs.
735
- :type response_format: Optional[Union[str,
735
+ :paramtype response_format: Optional[Union[str,
736
736
~azure.ai.agents.models.AgentsApiResponseFormatMode,
737
737
~azure.ai.agents.models.AgentsApiResponseFormat,
738
738
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
739
739
:keyword parallel_tool_calls: If True, tools will be invoked in parallel.
740
- :type parallel_tool_calls: bool
740
+ :paramtype parallel_tool_calls: bool
741
741
:keyword metadata: Up to 16 key/value pairs for structured metadata on the run.
742
- :type metadata: dict[str, str]
742
+ :paramtype metadata: dict[str, str]
743
743
:return: ThreadRun. The ThreadRun is compatible with MutableMapping.
744
744
:rtype: ~azure.ai.agents.models.ThreadRun
745
745
:raises ~azure.core.exceptions.HttpResponseError:
@@ -755,7 +755,7 @@ def create_thread_and_run(
755
755
:param body: The request payload as a JSON-serializable dict.
756
756
:type body: JSON
757
757
:keyword content_type: Body Parameter content-type for JSON body. Default is "application/json".
758
- :type content_type: str
758
+ :paramtype content_type: str
759
759
:return: ThreadRun. The ThreadRun is compatible with MutableMapping.
760
760
:rtype: ~azure.ai.agents.models.ThreadRun
761
761
:raises ~azure.core.exceptions.HttpResponseError:
@@ -771,7 +771,7 @@ def create_thread_and_run(
771
771
:param body: The request payload as a byte-stream.
772
772
:type body: IO[bytes]
773
773
:keyword content_type: Body Parameter content-type for binary body. Default is "application/json".
774
- :type content_type: str
774
+ :paramtype content_type: str
775
775
:return: ThreadRun. The ThreadRun is compatible with MutableMapping.
776
776
:rtype: ~azure.ai.agents.models.ThreadRun
777
777
:raises ~azure.core.exceptions.HttpResponseError:
@@ -807,43 +807,43 @@ def create_thread_and_run( # type: ignore
807
807
:type body: JSON or IO[bytes]
808
808
:keyword agent_id: The ID of the agent for which the thread should be created.
809
809
Required when not using the JSON/body overload.
810
- :type agent_id: str
810
+ :paramtype agent_id: str
811
811
:keyword thread: The details used to create the new thread. If none provided, an empty thread is
812
812
created.
813
- :type thread: ~azure.ai.agents.models.AgentThreadCreationOptions
813
+ :paramtype thread: ~azure.ai.agents.models.AgentThreadCreationOptions
814
814
:keyword model: Override the model the agent uses for this run.
815
- :type model: str
815
+ :paramtype model: str
816
816
:keyword instructions: Override the system instructions for this run.
817
- :type instructions: str
817
+ :paramtype instructions: str
818
818
:keyword tools: Override the list of enabled tools for this run.
819
- :type tools: list[~azure.ai.agents.models.ToolDefinition]
819
+ :paramtype tools: list[~azure.ai.agents.models.ToolDefinition]
820
820
:keyword tool_resources: Override the tools the agent can use for this run.
821
- :type tool_resources: ~azure.ai.agents.models.ToolResources
821
+ :paramtype tool_resources: ~azure.ai.agents.models.ToolResources
822
822
:keyword temperature: Sampling temperature between 0 and 2. Higher = more random.
823
- :type temperature: float
823
+ :paramtype temperature: float
824
824
:keyword top_p: Nucleus sampling parameter between 0 and 1.
825
- :type top_p: float
825
+ :paramtype top_p: float
826
826
:keyword max_prompt_tokens: Max prompt tokens to use across the run.
827
- :type max_prompt_tokens: int
827
+ :paramtype max_prompt_tokens: int
828
828
:keyword max_completion_tokens: Max completion tokens to use across the run.
829
- :type max_completion_tokens: int
829
+ :paramtype max_completion_tokens: int
830
830
:keyword truncation_strategy: Strategy for dropping old messages as context grows.
831
- :type truncation_strategy: ~azure.ai.agents.models.TruncationObject
831
+ :paramtype truncation_strategy: ~azure.ai.agents.models.TruncationObject
832
832
:keyword tool_choice: Controls which tool the model will call.
833
- :type tool_choice: str or
833
+ :paramtype tool_choice: str or
834
834
~azure.ai.agents.models.AgentsToolChoiceOptionMode or
835
835
~azure.ai.agents.models.AgentsNamedToolChoice
836
836
:keyword response_format: Specifies the format for the responses, particularly for tool calls.
837
837
Can be a string, response format mode, or structured response format object that defines how
838
838
the agent should structure its outputs.
839
- :type response_format: Optional[Union[str,
839
+ :paramtype response_format: Optional[Union[str,
840
840
~azure.ai.agents.models.AgentsApiResponseFormatMode,
841
841
~azure.ai.agents.models.AgentsApiResponseFormat,
842
842
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
843
843
:keyword parallel_tool_calls: If True, tools will be invoked in parallel.
844
- :type parallel_tool_calls: bool
844
+ :paramtype parallel_tool_calls: bool
845
845
:keyword metadata: Up to 16 key/value pairs for structured metadata on the run.
846
- :type metadata: dict[str, str]
846
+ :paramtype metadata: dict[str, str]
847
847
:return: ThreadRun. The ThreadRun is compatible with MutableMapping.
848
848
:rtype: ~azure.ai.agents.models.ThreadRun
849
849
:raises ValueError: If the combination of arguments is invalid.
@@ -913,41 +913,41 @@ def create_thread_and_process_run(
913
913
state, executing any required tool calls via the provided ToolSet.
914
914
915
915
:keyword agent_id: The unique identifier of the agent to run. Required if `body` is unset.
916
- :type agent_id: str
916
+ :paramtype agent_id: str
917
917
:keyword thread: Options for creating the new thread (initial messages, metadata, tool resources).
918
- :type thread: ~azure.ai.agents.models.AgentThreadCreationOptions
918
+ :paramtype thread: ~azure.ai.agents.models.AgentThreadCreationOptions
919
919
:keyword model: Optional override of the model deployment name to use for this run.
920
- :type model: str, optional
920
+ :paramtype model: str, optional
921
921
:keyword instructions: Optional override of the system instructions for this run.
922
- :type instructions: str, optional
922
+ :paramtype instructions: str, optional
923
923
:keyword toolset: A ToolSet instance containing both `.definitions` and `.resources` for tools.
924
924
If provided, its definitions/resources are used; otherwise no tools are passed.
925
- :type toolset: azure.ai.agents._tools.ToolSet, optional
925
+ :paramtype toolset: azure.ai.agents._tools.ToolSet, optional
926
926
:keyword temperature: Sampling temperature for the model (0.0-2.0), higher is more random.
927
- :type temperature: float, optional
927
+ :paramtype temperature: float, optional
928
928
:keyword top_p: Nucleus sampling value (0.0-1.0), alternative to temperature.
929
- :type top_p: float, optional
929
+ :paramtype top_p: float, optional
930
930
:keyword max_prompt_tokens: Maximum total prompt tokens across turns; run ends “incomplete” if exceeded.
931
- :type max_prompt_tokens: int, optional
931
+ :paramtype max_prompt_tokens: int, optional
932
932
:keyword max_completion_tokens: Maximum total completion tokens across turns; run ends “incomplete” if exceeded.
933
- :type max_completion_tokens: int, optional
933
+ :paramtype max_completion_tokens: int, optional
934
934
:keyword truncation_strategy: Strategy for dropping old messages when context window overflows.
935
- :type truncation_strategy: ~azure.ai.agents.models.TruncationObject, optional
935
+ :paramtype truncation_strategy: ~azure.ai.agents.models.TruncationObject, optional
936
936
:keyword tool_choice: Controls which tool (if any) the model is allowed to call.
937
- :type tool_choice: str or ~azure.ai.agents.models.AgentsToolChoiceOption, optional
937
+ :paramtype tool_choice: str or ~azure.ai.agents.models.AgentsToolChoiceOption, optional
938
938
:keyword response_format: Specifies the format for the responses, particularly for tool calls.
939
939
Can be a string, response format mode, or structured response format object that defines how
940
940
the agent should structure its outputs.
941
- :type response_format: Optional[Union[str,
941
+ :paramtype response_format: Optional[Union[str,
942
942
~azure.ai.agents.models.AgentsApiResponseFormatMode,
943
943
~azure.ai.agents.models.AgentsApiResponseFormat,
944
944
~azure.ai.agents.models.ResponseFormatJsonSchemaType]]
945
945
:keyword parallel_tool_calls: If True, allows tool calls to be executed in parallel.
946
- :type parallel_tool_calls: bool, optional
946
+ :paramtype parallel_tool_calls: bool, optional
947
947
:keyword metadata: Optional metadata (up to 16 key/value pairs) to attach to the run.
948
- :type metadata: dict[str, str], optional
948
+ :paramtype metadata: dict[str, str], optional
949
949
:keyword polling_interval: Seconds to wait between polling attempts for run status. Default is 1.
950
- :type polling_interval: int, optional
950
+ :paramtype polling_interval: int, optional
951
951
:return: The final ThreadRun object, in a terminal state (succeeded, failed, or cancelled).
952
952
:rtype: ~azure.ai.agents.models.ThreadRun
953
953
:raises ~azure.core.exceptions.HttpResponseError:
0 commit comments