77# --------------------------------------------------------------------------
88
99from copy import deepcopy
10- import sys
11- from typing import Any , Optional , TYPE_CHECKING
10+ from typing import Any , TYPE_CHECKING
11+ from typing_extensions import Self
1212
1313from azure .core import PipelineClient
1414from azure .core .pipeline import policies
1515from azure .core .rest import HttpRequest , HttpResponse
1616
17- from ._configuration import AIProjectClientConfiguration
17+ from ._configuration import AgentsClientConfiguration
1818from ._utils .serialization import Deserializer , Serializer
1919from .operations import (
20- AgentsOperations ,
21- BetaOperations ,
22- ConnectionsOperations ,
23- DatasetsOperations ,
24- DeploymentsOperations ,
25- EvaluationRulesOperations ,
26- IndexesOperations ,
27- _AIProjectClientOperationsMixin ,
20+ FilesOperations ,
21+ MessagesOperations ,
22+ RunStepsOperations ,
23+ RunsOperations ,
24+ ThreadsOperations ,
25+ VectorStoreFileBatchesOperations ,
26+ VectorStoreFilesOperations ,
27+ VectorStoresOperations ,
28+ _AgentsClientOperationsMixin ,
2829)
2930
30- if sys .version_info >= (3 , 11 ):
31- from typing import Self
32- else :
33- from typing_extensions import Self # type: ignore
34-
3531if TYPE_CHECKING :
3632 from azure .core .credentials import TokenCredential
3733
3834
39- class AIProjectClient (_AIProjectClientOperationsMixin ): # pylint: disable=too-many-instance-attributes
40- """AIProjectClient.
41-
42- :ivar beta: BetaOperations operations
43- :vartype beta: azure.ai.agents.operations.BetaOperations
44- :ivar agents: AgentsOperations operations
45- :vartype agents: azure.ai.agents.operations.AgentsOperations
46- :ivar evaluation_rules: EvaluationRulesOperations operations
47- :vartype evaluation_rules: azure.ai.agents.operations.EvaluationRulesOperations
48- :ivar connections: ConnectionsOperations operations
49- :vartype connections: azure.ai.agents.operations.ConnectionsOperations
50- :ivar datasets: DatasetsOperations operations
51- :vartype datasets: azure.ai.agents.operations.DatasetsOperations
52- :ivar deployments: DeploymentsOperations operations
53- :vartype deployments: azure.ai.agents.operations.DeploymentsOperations
54- :ivar indexes: IndexesOperations operations
55- :vartype indexes: azure.ai.agents.operations.IndexesOperations
56- :param endpoint: Foundry Project endpoint in the form
57- "https://{ai-services-account-name}.services.ai.azure.com/api/projects/{project-name}". If you
58- only have one Project in your Foundry Hub, or to target the default Project in your Hub, use
59- the form "https://{ai-services-account-name}.services.ai.azure.com/api/projects/_project".
60- Required.
35+ class AgentsClient (_AgentsClientOperationsMixin ): # pylint: disable=too-many-instance-attributes
36+ """AgentsClient.
37+
38+ :ivar threads: ThreadsOperations operations
39+ :vartype threads: azure.ai.agents.operations.ThreadsOperations
40+ :ivar messages: MessagesOperations operations
41+ :vartype messages: azure.ai.agents.operations.MessagesOperations
42+ :ivar runs: RunsOperations operations
43+ :vartype runs: azure.ai.agents.operations.RunsOperations
44+ :ivar run_steps: RunStepsOperations operations
45+ :vartype run_steps: azure.ai.agents.operations.RunStepsOperations
46+ :ivar files: FilesOperations operations
47+ :vartype files: azure.ai.agents.operations.FilesOperations
48+ :ivar vector_stores: VectorStoresOperations operations
49+ :vartype vector_stores: azure.ai.agents.operations.VectorStoresOperations
50+ :ivar vector_store_files: VectorStoreFilesOperations operations
51+ :vartype vector_store_files: azure.ai.agents.operations.VectorStoreFilesOperations
52+ :ivar vector_store_file_batches: VectorStoreFileBatchesOperations operations
53+ :vartype vector_store_file_batches: azure.ai.agents.operations.VectorStoreFileBatchesOperations
54+ :param endpoint: Project endpoint in the form of:
55+ https://<aiservices-id>.services.ai.azure.com/api/projects/<project-name>. Required.
6156 :type endpoint: str
6257 :param credential: Credential used to authenticate requests to the service. Required.
6358 :type credential: ~azure.core.credentials.TokenCredential
64- :param allow_preview: Whether to enable preview features. Must be specified and set to True to
65- enable preview features. Default value is None.
66- :type allow_preview: bool
67- :keyword api_version: The API version to use for this operation. Known values are "v1" and
68- None. Default value is None. If not set, the operation's default API version will be used. Note
69- that overriding this default value may result in unsupported behavior.
59+ :keyword api_version: The API version to use for this operation. Default value is
60+ "2025-05-15-preview". Note that overriding this default value may result in unsupported
61+ behavior.
7062 :paramtype api_version: str
7163 """
7264
73- def __init__ (
74- self , endpoint : str , credential : "TokenCredential" , allow_preview : Optional [bool ] = None , ** kwargs : Any
75- ) -> None :
65+ def __init__ (self , endpoint : str , credential : "TokenCredential" , ** kwargs : Any ) -> None :
7666 _endpoint = "{endpoint}"
77- self ._config = AIProjectClientConfiguration (
78- endpoint = endpoint , credential = credential , allow_preview = allow_preview , ** kwargs
79- )
67+ self ._config = AgentsClientConfiguration (endpoint = endpoint , credential = credential , ** kwargs )
8068
8169 _policies = kwargs .pop ("policies" , None )
8270 if _policies is None :
@@ -100,15 +88,18 @@ def __init__(
10088 self ._serialize = Serializer ()
10189 self ._deserialize = Deserializer ()
10290 self ._serialize .client_side_validation = False
103- self .beta = BetaOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
104- self .agents = AgentsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
105- self .evaluation_rules = EvaluationRulesOperations (
91+ self .threads = ThreadsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
92+ self .messages = MessagesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
93+ self .runs = RunsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
94+ self .run_steps = RunStepsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
95+ self .files = FilesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
96+ self .vector_stores = VectorStoresOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
97+ self .vector_store_files = VectorStoreFilesOperations (
98+ self ._client , self ._config , self ._serialize , self ._deserialize
99+ )
100+ self .vector_store_file_batches = VectorStoreFileBatchesOperations (
106101 self ._client , self ._config , self ._serialize , self ._deserialize
107102 )
108- self .connections = ConnectionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
109- self .datasets = DatasetsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
110- self .deployments = DeploymentsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
111- self .indexes = IndexesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
112103
113104 def send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
114105 """Runs the network request through the client's chained policies.
0 commit comments