arize 8.0.0b4__py3-none-any.whl → 8.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,7 @@ __all__ = [
21
21
  "DatasetsApi",
22
22
  "ExperimentsApi",
23
23
  "ProjectsApi",
24
+ "PromptsApi",
24
25
  "ApiResponse",
25
26
  "ApiClient",
26
27
  "Configuration",
@@ -50,12 +51,15 @@ __all__ = [
50
51
  "Project",
51
52
  "ProjectsCreateRequest",
52
53
  "ProjectsList200Response",
54
+ "Prompt",
55
+ "PromptsList200Response",
53
56
  ]
54
57
 
55
58
  # import apis into sdk package
56
59
  from arize._generated.api_client.api.datasets_api import DatasetsApi as DatasetsApi
57
60
  from arize._generated.api_client.api.experiments_api import ExperimentsApi as ExperimentsApi
58
61
  from arize._generated.api_client.api.projects_api import ProjectsApi as ProjectsApi
62
+ from arize._generated.api_client.api.prompts_api import PromptsApi as PromptsApi
59
63
 
60
64
  # import ApiClient
61
65
  from arize._generated.api_client.api_response import ApiResponse as ApiResponse
@@ -89,4 +93,6 @@ from arize._generated.api_client.models.problem import Problem as Problem
89
93
  from arize._generated.api_client.models.project import Project as Project
90
94
  from arize._generated.api_client.models.projects_create_request import ProjectsCreateRequest as ProjectsCreateRequest
91
95
  from arize._generated.api_client.models.projects_list200_response import ProjectsList200Response as ProjectsList200Response
96
+ from arize._generated.api_client.models.prompt import Prompt as Prompt
97
+ from arize._generated.api_client.models.prompts_list200_response import PromptsList200Response as PromptsList200Response
92
98
 
@@ -4,4 +4,5 @@
4
4
  from arize._generated.api_client.api.datasets_api import DatasetsApi
5
5
  from arize._generated.api_client.api.experiments_api import ExperimentsApi
6
6
  from arize._generated.api_client.api.projects_api import ProjectsApi
7
+ from arize._generated.api_client.api.prompts_api import PromptsApi
7
8
 
@@ -0,0 +1,349 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Arize REST API
5
+
6
+ API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from arize._generated.api_client.models.prompts_list200_response import PromptsList200Response
23
+
24
+ from arize._generated.api_client.api_client import ApiClient, RequestSerialized
25
+ from arize._generated.api_client.api_response import ApiResponse
26
+ from arize._generated.api_client.rest import RESTResponseType
27
+
28
+
29
+ class PromptsApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def prompts_list(
44
+ self,
45
+ space_id: Annotated[Optional[StrictStr], Field(description="Filter search results to a particular space ID")] = None,
46
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
47
+ cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it. ")] = None,
48
+ _request_timeout: Union[
49
+ None,
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Tuple[
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Annotated[StrictFloat, Field(gt=0)]
54
+ ]
55
+ ] = None,
56
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
+ _content_type: Optional[StrictStr] = None,
58
+ _headers: Optional[Dict[StrictStr, Any]] = None,
59
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
+ ) -> PromptsList200Response:
61
+ """List prompts
62
+
63
+ List prompts the user has access to. The prompts are sorted by update date, with the most recently updated prompts coming first. <Warning>This endpoint is in alpha, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Warning>
64
+
65
+ :param space_id: Filter search results to a particular space ID
66
+ :type space_id: str
67
+ :param limit: Maximum items to return
68
+ :type limit: int
69
+ :param cursor: Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it.
70
+ :type cursor: str
71
+ :param _request_timeout: timeout setting for this request. If one
72
+ number provided, it will be total request
73
+ timeout. It can also be a pair (tuple) of
74
+ (connection, read) timeouts.
75
+ :type _request_timeout: int, tuple(int, int), optional
76
+ :param _request_auth: set to override the auth_settings for an a single
77
+ request; this effectively ignores the
78
+ authentication in the spec for a single request.
79
+ :type _request_auth: dict, optional
80
+ :param _content_type: force content-type for the request.
81
+ :type _content_type: str, Optional
82
+ :param _headers: set to override the headers for a single
83
+ request; this effectively ignores the headers
84
+ in the spec for a single request.
85
+ :type _headers: dict, optional
86
+ :param _host_index: set to override the host_index for a single
87
+ request; this effectively ignores the host_index
88
+ in the spec for a single request.
89
+ :type _host_index: int, optional
90
+ :return: Returns the result object.
91
+ """ # noqa: E501
92
+
93
+ _param = self._prompts_list_serialize(
94
+ space_id=space_id,
95
+ limit=limit,
96
+ cursor=cursor,
97
+ _request_auth=_request_auth,
98
+ _content_type=_content_type,
99
+ _headers=_headers,
100
+ _host_index=_host_index
101
+ )
102
+
103
+ _response_types_map: Dict[str, Optional[str]] = {
104
+ '200': "PromptsList200Response",
105
+ '400': "Problem",
106
+ '401': "Problem",
107
+ '403': "Problem",
108
+ '429': "Problem",
109
+ }
110
+ response_data = self.api_client.call_api(
111
+ *_param,
112
+ _request_timeout=_request_timeout
113
+ )
114
+ response_data.read()
115
+ return self.api_client.response_deserialize(
116
+ response_data=response_data,
117
+ response_types_map=_response_types_map,
118
+ ).data
119
+
120
+
121
+ @validate_call
122
+ def prompts_list_with_http_info(
123
+ self,
124
+ space_id: Annotated[Optional[StrictStr], Field(description="Filter search results to a particular space ID")] = None,
125
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
126
+ cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it. ")] = None,
127
+ _request_timeout: Union[
128
+ None,
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Tuple[
131
+ Annotated[StrictFloat, Field(gt=0)],
132
+ Annotated[StrictFloat, Field(gt=0)]
133
+ ]
134
+ ] = None,
135
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
136
+ _content_type: Optional[StrictStr] = None,
137
+ _headers: Optional[Dict[StrictStr, Any]] = None,
138
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
139
+ ) -> ApiResponse[PromptsList200Response]:
140
+ """List prompts
141
+
142
+ List prompts the user has access to. The prompts are sorted by update date, with the most recently updated prompts coming first. <Warning>This endpoint is in alpha, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Warning>
143
+
144
+ :param space_id: Filter search results to a particular space ID
145
+ :type space_id: str
146
+ :param limit: Maximum items to return
147
+ :type limit: int
148
+ :param cursor: Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it.
149
+ :type cursor: str
150
+ :param _request_timeout: timeout setting for this request. If one
151
+ number provided, it will be total request
152
+ timeout. It can also be a pair (tuple) of
153
+ (connection, read) timeouts.
154
+ :type _request_timeout: int, tuple(int, int), optional
155
+ :param _request_auth: set to override the auth_settings for an a single
156
+ request; this effectively ignores the
157
+ authentication in the spec for a single request.
158
+ :type _request_auth: dict, optional
159
+ :param _content_type: force content-type for the request.
160
+ :type _content_type: str, Optional
161
+ :param _headers: set to override the headers for a single
162
+ request; this effectively ignores the headers
163
+ in the spec for a single request.
164
+ :type _headers: dict, optional
165
+ :param _host_index: set to override the host_index for a single
166
+ request; this effectively ignores the host_index
167
+ in the spec for a single request.
168
+ :type _host_index: int, optional
169
+ :return: Returns the result object.
170
+ """ # noqa: E501
171
+
172
+ _param = self._prompts_list_serialize(
173
+ space_id=space_id,
174
+ limit=limit,
175
+ cursor=cursor,
176
+ _request_auth=_request_auth,
177
+ _content_type=_content_type,
178
+ _headers=_headers,
179
+ _host_index=_host_index
180
+ )
181
+
182
+ _response_types_map: Dict[str, Optional[str]] = {
183
+ '200': "PromptsList200Response",
184
+ '400': "Problem",
185
+ '401': "Problem",
186
+ '403': "Problem",
187
+ '429': "Problem",
188
+ }
189
+ response_data = self.api_client.call_api(
190
+ *_param,
191
+ _request_timeout=_request_timeout
192
+ )
193
+ response_data.read()
194
+ return self.api_client.response_deserialize(
195
+ response_data=response_data,
196
+ response_types_map=_response_types_map,
197
+ )
198
+
199
+
200
+ @validate_call
201
+ def prompts_list_without_preload_content(
202
+ self,
203
+ space_id: Annotated[Optional[StrictStr], Field(description="Filter search results to a particular space ID")] = None,
204
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
205
+ cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it. ")] = None,
206
+ _request_timeout: Union[
207
+ None,
208
+ Annotated[StrictFloat, Field(gt=0)],
209
+ Tuple[
210
+ Annotated[StrictFloat, Field(gt=0)],
211
+ Annotated[StrictFloat, Field(gt=0)]
212
+ ]
213
+ ] = None,
214
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
215
+ _content_type: Optional[StrictStr] = None,
216
+ _headers: Optional[Dict[StrictStr, Any]] = None,
217
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
218
+ ) -> RESTResponseType:
219
+ """List prompts
220
+
221
+ List prompts the user has access to. The prompts are sorted by update date, with the most recently updated prompts coming first. <Warning>This endpoint is in alpha, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Warning>
222
+
223
+ :param space_id: Filter search results to a particular space ID
224
+ :type space_id: str
225
+ :param limit: Maximum items to return
226
+ :type limit: int
227
+ :param cursor: Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it.
228
+ :type cursor: str
229
+ :param _request_timeout: timeout setting for this request. If one
230
+ number provided, it will be total request
231
+ timeout. It can also be a pair (tuple) of
232
+ (connection, read) timeouts.
233
+ :type _request_timeout: int, tuple(int, int), optional
234
+ :param _request_auth: set to override the auth_settings for an a single
235
+ request; this effectively ignores the
236
+ authentication in the spec for a single request.
237
+ :type _request_auth: dict, optional
238
+ :param _content_type: force content-type for the request.
239
+ :type _content_type: str, Optional
240
+ :param _headers: set to override the headers for a single
241
+ request; this effectively ignores the headers
242
+ in the spec for a single request.
243
+ :type _headers: dict, optional
244
+ :param _host_index: set to override the host_index for a single
245
+ request; this effectively ignores the host_index
246
+ in the spec for a single request.
247
+ :type _host_index: int, optional
248
+ :return: Returns the result object.
249
+ """ # noqa: E501
250
+
251
+ _param = self._prompts_list_serialize(
252
+ space_id=space_id,
253
+ limit=limit,
254
+ cursor=cursor,
255
+ _request_auth=_request_auth,
256
+ _content_type=_content_type,
257
+ _headers=_headers,
258
+ _host_index=_host_index
259
+ )
260
+
261
+ _response_types_map: Dict[str, Optional[str]] = {
262
+ '200': "PromptsList200Response",
263
+ '400': "Problem",
264
+ '401': "Problem",
265
+ '403': "Problem",
266
+ '429': "Problem",
267
+ }
268
+ response_data = self.api_client.call_api(
269
+ *_param,
270
+ _request_timeout=_request_timeout
271
+ )
272
+ return response_data.response
273
+
274
+
275
+ def _prompts_list_serialize(
276
+ self,
277
+ space_id,
278
+ limit,
279
+ cursor,
280
+ _request_auth,
281
+ _content_type,
282
+ _headers,
283
+ _host_index,
284
+ ) -> RequestSerialized:
285
+
286
+ _host = None
287
+
288
+ _collection_formats: Dict[str, str] = {
289
+ }
290
+
291
+ _path_params: Dict[str, str] = {}
292
+ _query_params: List[Tuple[str, str]] = []
293
+ _header_params: Dict[str, Optional[str]] = _headers or {}
294
+ _form_params: List[Tuple[str, str]] = []
295
+ _files: Dict[
296
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
297
+ ] = {}
298
+ _body_params: Optional[bytes] = None
299
+
300
+ # process the path parameters
301
+ # process the query parameters
302
+ if space_id is not None:
303
+
304
+ _query_params.append(('space_id', space_id))
305
+
306
+ if limit is not None:
307
+
308
+ _query_params.append(('limit', limit))
309
+
310
+ if cursor is not None:
311
+
312
+ _query_params.append(('cursor', cursor))
313
+
314
+ # process the header parameters
315
+ # process the form parameters
316
+ # process the body parameter
317
+
318
+
319
+ # set the HTTP header `Accept`
320
+ if 'Accept' not in _header_params:
321
+ _header_params['Accept'] = self.api_client.select_header_accept(
322
+ [
323
+ 'application/json',
324
+ 'application/problem+json'
325
+ ]
326
+ )
327
+
328
+
329
+ # authentication setting
330
+ _auth_settings: List[str] = [
331
+ 'bearerAuth'
332
+ ]
333
+
334
+ return self.api_client.param_serialize(
335
+ method='GET',
336
+ resource_path='/v2/prompts',
337
+ path_params=_path_params,
338
+ query_params=_query_params,
339
+ header_params=_header_params,
340
+ body=_body_params,
341
+ post_params=_form_params,
342
+ files=_files,
343
+ auth_settings=_auth_settings,
344
+ collection_formats=_collection_formats,
345
+ _host=_host,
346
+ _request_auth=_request_auth
347
+ )
348
+
349
+
@@ -33,4 +33,6 @@ from arize._generated.api_client.models.problem import Problem
33
33
  from arize._generated.api_client.models.project import Project
34
34
  from arize._generated.api_client.models.projects_create_request import ProjectsCreateRequest
35
35
  from arize._generated.api_client.models.projects_list200_response import ProjectsList200Response
36
+ from arize._generated.api_client.models.prompt import Prompt
37
+ from arize._generated.api_client.models.prompts_list200_response import PromptsList200Response
36
38
 
@@ -0,0 +1,112 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Arize REST API
5
+
6
+ API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class Prompt(BaseModel):
27
+ """
28
+ A prompt is a reusable template for LLM interactions. Prompts can be versioned and labeled to track changes over time. Use prompts to standardize how you interact with LLMs across your application.
29
+ """ # noqa: E501
30
+ id: StrictStr = Field(description="The prompt ID")
31
+ name: StrictStr = Field(description="The prompt name")
32
+ description: Optional[StrictStr] = Field(default=None, description="The prompt description")
33
+ space_id: StrictStr = Field(description="The space ID the prompt belongs to")
34
+ created_at: datetime = Field(description="When the prompt was created")
35
+ updated_at: datetime = Field(description="When the prompt was last updated")
36
+ created_by_user_id: StrictStr = Field(description="The user ID of the user who created the prompt")
37
+ tags: Optional[List[StrictStr]] = Field(default=None, description="The tags associated with the prompt")
38
+ __properties: ClassVar[List[str]] = ["id", "name", "description", "space_id", "created_at", "updated_at", "created_by_user_id", "tags"]
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> Optional[Self]:
58
+ """Create an instance of Prompt from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self) -> Dict[str, Any]:
62
+ """Return the dictionary representation of the model using alias.
63
+
64
+ This has the following differences from calling pydantic's
65
+ `self.model_dump(by_alias=True)`:
66
+
67
+ * `None` is only added to the output dict for nullable fields that
68
+ were set at model initialization. Other fields with value `None`
69
+ are ignored.
70
+ """
71
+ excluded_fields: Set[str] = set([
72
+ ])
73
+
74
+ _dict = self.model_dump(
75
+ by_alias=True,
76
+ exclude=excluded_fields,
77
+ exclude_none=True,
78
+ )
79
+ # set to None if description (nullable) is None
80
+ # and model_fields_set contains the field
81
+ if self.description is None and "description" in self.model_fields_set:
82
+ _dict['description'] = None
83
+
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of Prompt from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ # raise errors for additional fields in the input
96
+ for _key in obj.keys():
97
+ if _key not in cls.__properties:
98
+ raise ValueError("Error due to additional fields (not defined in Prompt) in the input: " + _key)
99
+
100
+ _obj = cls.model_validate({
101
+ "id": obj.get("id"),
102
+ "name": obj.get("name"),
103
+ "description": obj.get("description"),
104
+ "space_id": obj.get("space_id"),
105
+ "created_at": obj.get("created_at"),
106
+ "updated_at": obj.get("updated_at"),
107
+ "created_by_user_id": obj.get("created_by_user_id"),
108
+ "tags": obj.get("tags")
109
+ })
110
+ return _obj
111
+
112
+
@@ -0,0 +1,106 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Arize REST API
5
+
6
+ API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field
21
+ from typing import Any, ClassVar, Dict, List
22
+ from arize._generated.api_client.models.pagination_metadata import PaginationMetadata
23
+ from arize._generated.api_client.models.prompt import Prompt
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class PromptsList200Response(BaseModel):
28
+ """
29
+ PromptsList200Response
30
+ """ # noqa: E501
31
+ prompts: List[Prompt] = Field(description="A list of prompts")
32
+ pagination: PaginationMetadata
33
+ __properties: ClassVar[List[str]] = ["prompts", "pagination"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of PromptsList200Response from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of each item in prompts (list)
75
+ _items = []
76
+ if self.prompts:
77
+ for _item_prompts in self.prompts:
78
+ if _item_prompts:
79
+ _items.append(_item_prompts.to_dict())
80
+ _dict['prompts'] = _items
81
+ # override the default output from pydantic by calling `to_dict()` of pagination
82
+ if self.pagination:
83
+ _dict['pagination'] = self.pagination.to_dict()
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of PromptsList200Response from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ # raise errors for additional fields in the input
96
+ for _key in obj.keys():
97
+ if _key not in cls.__properties:
98
+ raise ValueError("Error due to additional fields (not defined in PromptsList200Response) in the input: " + _key)
99
+
100
+ _obj = cls.model_validate({
101
+ "prompts": [Prompt.from_dict(_item) for _item in obj["prompts"]] if obj.get("prompts") is not None else None,
102
+ "pagination": PaginationMetadata.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None
103
+ })
104
+ return _obj
105
+
106
+
@@ -0,0 +1,66 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Arize REST API
5
+
6
+ API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import unittest
16
+
17
+ from arize._generated.api_client.models.prompt import Prompt
18
+
19
+ class TestPrompt(unittest.TestCase):
20
+ """Prompt unit test stubs"""
21
+
22
+ def setUp(self):
23
+ pass
24
+
25
+ def tearDown(self):
26
+ pass
27
+
28
+ def make_instance(self, include_optional) -> Prompt:
29
+ """Test Prompt
30
+ include_optional is a boolean, when False only required
31
+ params are included, when True both required and
32
+ optional params are included """
33
+ # uncomment below to create an instance of `Prompt`
34
+ """
35
+ model = Prompt()
36
+ if include_optional:
37
+ return Prompt(
38
+ id = '',
39
+ name = '',
40
+ description = '',
41
+ space_id = '',
42
+ created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
43
+ updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
44
+ created_by_user_id = '',
45
+ tags = [
46
+ ''
47
+ ]
48
+ )
49
+ else:
50
+ return Prompt(
51
+ id = '',
52
+ name = '',
53
+ space_id = '',
54
+ created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
55
+ updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
56
+ created_by_user_id = '',
57
+ )
58
+ """
59
+
60
+ def testPrompt(self):
61
+ """Test Prompt"""
62
+ # inst_req_only = self.make_instance(include_optional=False)
63
+ # inst_req_and_optional = self.make_instance(include_optional=True)
64
+
65
+ if __name__ == '__main__':
66
+ unittest.main()
@@ -0,0 +1,38 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Arize REST API
5
+
6
+ API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import unittest
16
+
17
+ from arize._generated.api_client.api.prompts_api import PromptsApi
18
+
19
+
20
+ class TestPromptsApi(unittest.TestCase):
21
+ """PromptsApi unit test stubs"""
22
+
23
+ def setUp(self) -> None:
24
+ self.api = PromptsApi()
25
+
26
+ def tearDown(self) -> None:
27
+ pass
28
+
29
+ def test_prompts_list(self) -> None:
30
+ """Test case for prompts_list
31
+
32
+ List prompts
33
+ """
34
+ pass
35
+
36
+
37
+ if __name__ == '__main__':
38
+ unittest.main()
@@ -0,0 +1,82 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Arize REST API
5
+
6
+ API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import unittest
16
+
17
+ from arize._generated.api_client.models.prompts_list200_response import PromptsList200Response
18
+
19
+ class TestPromptsList200Response(unittest.TestCase):
20
+ """PromptsList200Response unit test stubs"""
21
+
22
+ def setUp(self):
23
+ pass
24
+
25
+ def tearDown(self):
26
+ pass
27
+
28
+ def make_instance(self, include_optional) -> PromptsList200Response:
29
+ """Test PromptsList200Response
30
+ include_optional is a boolean, when False only required
31
+ params are included, when True both required and
32
+ optional params are included """
33
+ # uncomment below to create an instance of `PromptsList200Response`
34
+ """
35
+ model = PromptsList200Response()
36
+ if include_optional:
37
+ return PromptsList200Response(
38
+ prompts = [
39
+ arize._generated.api_client.models.prompt.Prompt(
40
+ id = '',
41
+ name = '',
42
+ description = '',
43
+ space_id = '',
44
+ created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
45
+ updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
46
+ created_by_user_id = '',
47
+ tags = [
48
+ ''
49
+ ], )
50
+ ],
51
+ pagination = arize._generated.api_client.models.pagination_metadata.PaginationMetadata(
52
+ next_cursor = '',
53
+ has_more = True, )
54
+ )
55
+ else:
56
+ return PromptsList200Response(
57
+ prompts = [
58
+ arize._generated.api_client.models.prompt.Prompt(
59
+ id = '',
60
+ name = '',
61
+ description = '',
62
+ space_id = '',
63
+ created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
64
+ updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
65
+ created_by_user_id = '',
66
+ tags = [
67
+ ''
68
+ ], )
69
+ ],
70
+ pagination = arize._generated.api_client.models.pagination_metadata.PaginationMetadata(
71
+ next_cursor = '',
72
+ has_more = True, ),
73
+ )
74
+ """
75
+
76
+ def testPromptsList200Response(self):
77
+ """Test PromptsList200Response"""
78
+ # inst_req_only = self.make_instance(include_optional=False)
79
+ # inst_req_and_optional = self.make_instance(include_optional=True)
80
+
81
+ if __name__ == '__main__':
82
+ unittest.main()
@@ -89,6 +89,7 @@ Class | Method | HTTP request | Description
89
89
  *ProjectsApi* | [**projects_delete**](arize/_generated/api_client/docs/ProjectsApi.md#projects_delete) | **DELETE** /v2/projects/{project_id} | Delete a project
90
90
  *ProjectsApi* | [**projects_get**](arize/_generated/api_client/docs/ProjectsApi.md#projects_get) | **GET** /v2/projects/{project_id} | Get a project
91
91
  *ProjectsApi* | [**projects_list**](arize/_generated/api_client/docs/ProjectsApi.md#projects_list) | **GET** /v2/projects | List projects
92
+ *PromptsApi* | [**prompts_list**](arize/_generated/api_client/docs/PromptsApi.md#prompts_list) | **GET** /v2/prompts | List prompts
92
93
 
93
94
 
94
95
  ## Documentation For Models
@@ -113,6 +114,8 @@ Class | Method | HTTP request | Description
113
114
  - [Project](arize/_generated/api_client/docs/Project.md)
114
115
  - [ProjectsCreateRequest](arize/_generated/api_client/docs/ProjectsCreateRequest.md)
115
116
  - [ProjectsList200Response](arize/_generated/api_client/docs/ProjectsList200Response.md)
117
+ - [Prompt](arize/_generated/api_client/docs/Prompt.md)
118
+ - [PromptsList200Response](arize/_generated/api_client/docs/PromptsList200Response.md)
116
119
 
117
120
 
118
121
  <a id="documentation-for-authorization"></a>
arize/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Version information for the Arize SDK."""
2
2
 
3
- __version__ = "8.0.0b4"
3
+ __version__ = "8.0.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arize
3
- Version: 8.0.0b4
3
+ Version: 8.0.2
4
4
  Summary: A helper library to interact with Arize AI APIs
5
5
  Project-URL: Homepage, https://arize.com
6
6
  Project-URL: Documentation, https://docs.arize.com/arize
@@ -33,7 +33,7 @@ Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.38.0
33
33
  Requires-Dist: opentelemetry-sdk>=1.38.0
34
34
  Requires-Dist: opentelemetry-semantic-conventions<1,>=0.43b0
35
35
  Requires-Dist: pandas<3,>=2.0.0
36
- Requires-Dist: protobuf<6,>=4.21.0
36
+ Requires-Dist: protobuf<7,>=4.21.0
37
37
  Requires-Dist: pyarrow>=0.15.0
38
38
  Requires-Dist: pydantic<3,>=2
39
39
  Requires-Dist: python-dateutil<3,>=2.8.2
@@ -54,6 +54,13 @@ Requires-Dist: types-python-dateutil>=2.9.0; extra == 'dev'
54
54
  Requires-Dist: types-requests>=2.31.0; extra == 'dev'
55
55
  Requires-Dist: types-tabulate>=0.9.0; extra == 'dev'
56
56
  Requires-Dist: types-tqdm>=4.66.0; extra == 'dev'
57
+ Provides-Extra: docs
58
+ Requires-Dist: myst-parser>=2.0.0; extra == 'docs'
59
+ Requires-Dist: pydata-sphinx-theme>=0.15.0; extra == 'docs'
60
+ Requires-Dist: sphinx-autobuild>=2024.0.0; extra == 'docs'
61
+ Requires-Dist: sphinx-copybutton>=0.5.0; extra == 'docs'
62
+ Requires-Dist: sphinx-design>=0.5.0; extra == 'docs'
63
+ Requires-Dist: sphinx<8.0.0,>=7.0.0; extra == 'docs'
57
64
  Provides-Extra: embeddings
58
65
  Requires-Dist: datasets!=2.14.*,<3,>=2.8; extra == 'embeddings'
59
66
  Requires-Dist: pillow<11,>=8.4.0; extra == 'embeddings'
@@ -7,7 +7,7 @@ arize/logging.py,sha256=2xtvrTtKerJXXfIh2eqTbn1l7esziyspSZHMKdvwJr0,9484
7
7
  arize/pre_releases.py,sha256=-4AjE75DKyyZ9_O-wd7_KrOYNRU6guy-Pgdm8WLEeDc,1391
8
8
  arize/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  arize/regions.py,sha256=nW-CAkWZVVW8VNYU5tui5A-54qc4ntQWZycvFuUeh-M,1049
10
- arize/version.py,sha256=3u9IQWGmE9RcDgxeDe_5OB7RvXJcDcBXGvKXKM27VJo,70
10
+ arize/version.py,sha256=mBCJL04c8iJDQ4SdEd-LztN1eCkmkiDAJ1hGW_iODz8,68
11
11
  arize/_exporter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  arize/_exporter/client.py,sha256=NsvwD_4kmacF20fawYi6hXgZ-o1XinMB5Z7eWjpCbsA,16460
13
13
  arize/_exporter/validation.py,sha256=7fM9RKtB2JsbeRPhYVOs5Xjn0EfuRrGIuQfp0CQUT5E,1038
@@ -17,18 +17,19 @@ arize/_flight/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  arize/_flight/client.py,sha256=mjMB73_jCIeCPcSgMEWw7toVGqbv8SaXXJIOo8gT7UA,21258
18
18
  arize/_flight/types.py,sha256=GB_4dQu2ElIrcDGAcqhG7oI4g-b0ZdSlbrQkf0TFzVE,194
19
19
  arize/_generated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
- arize/_generated/api_client_README.md,sha256=9UxtVJdMFIdV-_9NqUwg2ox3Many_5LIyXz7ZqYOdU0,7379
21
- arize/_generated/api_client/__init__.py,sha256=QjXl6DlavvyG5VRCT_-U2_eS_JeFIUVoMIWr19vroK8,4554
20
+ arize/_generated/api_client_README.md,sha256=4cVbxenCoW5miAFfidQ-2vfVm70b7UfrI5Ga-a8ER9w,7655
21
+ arize/_generated/api_client/__init__.py,sha256=lqkiIbl6syX0-_EsUzIXMYWd6xdtW5NVzH4LIkBC0-Y,4889
22
22
  arize/_generated/api_client/api_client.py,sha256=Cr9leKLpAJYQmL_U1hAPsMNFdaSO6Ti1X52jvGp2WsQ,27899
23
23
  arize/_generated/api_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
24
24
  arize/_generated/api_client/configuration.py,sha256=EJ6DkTKzHWqjN0BwMEHQ1D9pEDdClOsM72EcffquZ9I,19406
25
25
  arize/_generated/api_client/exceptions.py,sha256=EAN7PugiYwsF3Puj8S1iWGqptP6kheYykxvZLPEk4rw,6502
26
26
  arize/_generated/api_client/rest.py,sha256=OXfGpi__G1f4q3Edgbj4njQNBstouwHUIwrPLJBsVVE,9512
27
- arize/_generated/api_client/api/__init__.py,sha256=ycVTd-FBlPyFX82wbCQiuCTbj78pZbVv17kX9U3s5j0,261
27
+ arize/_generated/api_client/api/__init__.py,sha256=XFdFxv_aYbnA4PT4naVoJ-eL0ZMXUtI72-xB1Q5TFPU,328
28
28
  arize/_generated/api_client/api/datasets_api.py,sha256=ShqYTqw8Tf4LjyfeGoYtoe9SevseeoCiJO8fzYqSpmg,102861
29
29
  arize/_generated/api_client/api/experiments_api.py,sha256=FyiudsxPl-ytJlEPTKV83BKxwgF6nGI_j2Fj6ovtkW4,65305
30
30
  arize/_generated/api_client/api/projects_api.py,sha256=f0RKWOXUC5dAv0uALYkOpIwaoWQ6ar7F5De9UoVnPdU,48820
31
- arize/_generated/api_client/models/__init__.py,sha256=_kbyaJU4uC0Gdnc87FsdBDfb-QcH8LKID7YNsk11JSk,2183
31
+ arize/_generated/api_client/api/prompts_api.py,sha256=O0NmE70Vb609Yb_wcO9Jzk7pHZOdnXROUtDgxKSuF2I,14930
32
+ arize/_generated/api_client/models/__init__.py,sha256=a323wQF9F5XIC_GKgPbGnTUxC7iF48lsnTIY5l_5Uqo,2339
32
33
  arize/_generated/api_client/models/dataset.py,sha256=eStUwLDPU7j3kMTdSO7RqMCScsGU9rOZtU41xnSXUUs,4332
33
34
  arize/_generated/api_client/models/dataset_example.py,sha256=avmtSuitMruY7Yphw5gDpPbfkx_GKDhePBSoG6S_sc0,3825
34
35
  arize/_generated/api_client/models/dataset_example_update.py,sha256=DMV1_IkN74tQJrnWFPsJ-7Yj9d-tBaF2rVZZlktprpo,3290
@@ -49,6 +50,8 @@ arize/_generated/api_client/models/problem.py,sha256=mbAAHZAC8mKYC0r902SGE4QcLCU
49
50
  arize/_generated/api_client/models/project.py,sha256=w4OT222655N-dd8IHauiDobgUyMnol4xzZ80Rniv3ts,3636
50
51
  arize/_generated/api_client/models/projects_create_request.py,sha256=hnnerivgBpJ4BNcdE1hfZ8EoIawtmxsx1iv8NVoHkw4,3024
51
52
  arize/_generated/api_client/models/projects_list200_response.py,sha256=ibz4CJNTDX5Y6eiEY2_j2R-L_rTWsTTzaRVCN3iWRDI,3777
53
+ arize/_generated/api_client/models/prompt.py,sha256=oby5UnZSY1n_Veb7FTI0mykk9aF9s_lH8iQLIJ_Dsr4,4249
54
+ arize/_generated/api_client/models/prompts_list200_response.py,sha256=7A1m_bkGXPHEGmmoXR9O_tsrVqS0MZNK4uQne1bYL9E,3755
52
55
  arize/_generated/api_client/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
56
  arize/_generated/api_client/test/test_dataset.py,sha256=ZVNd_Nt8qkcelrpCuX3mYx8JP5q23EBbudWR8m3OR5U,2391
54
57
  arize/_generated/api_client/test/test_dataset_example.py,sha256=musVzDrorF1yf5ozlAnntPyMad9QQPgxoldJjxb7lAc,1876
@@ -73,6 +76,9 @@ arize/_generated/api_client/test/test_project.py,sha256=89LB5u8gUqrNBGWt9UfC47A9
73
76
  arize/_generated/api_client/test/test_projects_api.py,sha256=oFZh9KZlPpc-Jaf5IQ1NhLOHJf0sJBHAJIrvPACYmXI,1207
74
77
  arize/_generated/api_client/test/test_projects_create_request.py,sha256=fhmr9HTlcn9khjeiLGm5zMfCtPvXIiRu1Wb3bbcWOj4,1599
75
78
  arize/_generated/api_client/test/test_projects_list200_response.py,sha256=l0yfAWNkYNRQn7d3ziANxtz-OlqGGWVlyqaxlyEBJeE,2575
79
+ arize/_generated/api_client/test/test_prompt.py,sha256=dw8TLlRX_wO-YSU6xVj8CQVvaTxgeoHyPnNvVltznSY,2082
80
+ arize/_generated/api_client/test/test_prompts_api.py,sha256=DtW3UOEMKe7OOJwjdroPsGy3nKp-2J_-HxXvHjE-21Y,797
81
+ arize/_generated/api_client/test/test_prompts_list200_response.py,sha256=qLzjL9uiS-5UILp_iBO0HM_7cx5Gnt9hFqP62dxGr2U,3167
76
82
  arize/_generated/protocol/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
83
  arize/_generated/protocol/flight/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
78
84
  arize/_generated/protocol/flight/flight_pb2.py,sha256=buKnlVPQSFpynK8AYJTfHRjfIFsfwf7khjOhyTjv4gk,27790
@@ -169,8 +175,8 @@ arize/utils/size.py,sha256=qIjUYYg-NttqK25ObX17_32MzkAepLJDDv8N7YxJwAo,805
169
175
  arize/utils/types.py,sha256=mjdP7J3vxNiUNfMlh5Mre9SESvXDGrWWwssISAI82K8,2962
170
176
  arize/utils/online_tasks/__init__.py,sha256=T7778_bgutP0U7h8e9NRPYfwBQSmHOi859M1K2fjpjw,213
171
177
  arize/utils/online_tasks/dataframe_preprocessor.py,sha256=g9ZR2HbiO3RI2I3GHbV5MvpN3beI_uP4K20r3mcbEGE,9688
172
- arize-8.0.0b4.dist-info/METADATA,sha256=PtU4ai1HmsGWn0Vr6X9xJu1XGYWPHj4-OqHKFnignXw,29110
173
- arize-8.0.0b4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
174
- arize-8.0.0b4.dist-info/licenses/LICENSE,sha256=Yseh419WQGiW16p8pS0MwNJyrAIrXSeW59aQXbijY2o,9723
175
- arize-8.0.0b4.dist-info/licenses/NOTICE,sha256=V9Mdpy_w2tgo5GxgjpsZFTu2WcltLQIh6wBVFwBnJuY,550
176
- arize-8.0.0b4.dist-info/RECORD,,
178
+ arize-8.0.2.dist-info/METADATA,sha256=5mCRvAUBpd33ZUkJEAFm2nhzqoRLvbS_yvAjthpaREc,29462
179
+ arize-8.0.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
180
+ arize-8.0.2.dist-info/licenses/LICENSE,sha256=Yseh419WQGiW16p8pS0MwNJyrAIrXSeW59aQXbijY2o,9723
181
+ arize-8.0.2.dist-info/licenses/NOTICE,sha256=V9Mdpy_w2tgo5GxgjpsZFTu2WcltLQIh6wBVFwBnJuY,550
182
+ arize-8.0.2.dist-info/RECORD,,
File without changes