shaped 0.14.0__tar.gz → 1.0.1__tar.gz
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.
- {shaped-0.14.0 → shaped-1.0.1}/PKG-INFO +25 -7
- {shaped-0.14.0 → shaped-1.0.1}/README.md +23 -5
- {shaped-0.14.0 → shaped-1.0.1}/pyproject.toml +3 -2
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/__init__.py +1 -1
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/__init__.py +1 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/api/dataset_api.py +12 -4
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/api/model_inference_api.py +33 -14
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/api/model_management_api.py +15 -5
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/api_client.py +19 -3
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/configuration.py +152 -37
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/__init__.py +1 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/complement_items_request.py +4 -2
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/create_model_arguments.py +3 -3
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/http_validation_error.py +3 -3
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/list_datasets_response.py +3 -3
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/list_models_response.py +3 -3
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/post_rank_request.py +3 -3
- shaped-1.0.1/python/shaped/autogen/models/retrieve_response.py +91 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/retriever_top_k_override.py +3 -3
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/similar_item_request.py +3 -1
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/similar_users_request.py +3 -1
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/rest.py +1 -1
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/client.py +6 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped.egg-info/PKG-INFO +25 -7
- shaped-1.0.1/python/shaped.egg-info/SOURCES.txt +77 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped.egg-info/requires.txt +1 -1
- {shaped-0.14.0 → shaped-1.0.1}/setup.py +6 -6
- shaped-0.14.0/sdk/python/shaped.egg-info/SOURCES.txt +0 -76
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/api/__init__.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/api_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/exceptions.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/amplitude_dataset_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/aws_pinpoint_dataset_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/big_query_dataset_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/complement_items_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/connectors_inner.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/create_dataset_arguments.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/create_embedding_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/create_item_embedding_request.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/create_model_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/create_user_embedding_request.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/custom_dataset_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/dataset_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/dataset_schema_type.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/datasets_inner.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/delete_model_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/fetch_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/file_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/file_source_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/inference_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/insert_model_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/interaction.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/model_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/model_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/mongo_db_dataset_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/my_sql_dataset_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/path.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/postgres_dataset_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/rank_attribute_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/rank_grid_attribute_request.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/rank_grid_attribute_request1.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/rank_grid_attribute_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/rank_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/redshift_dataset_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/retrieve_request.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/rudder_stack_dataset_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/segment_dataset_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/similar_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/snowflake_dataset_config.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/successful_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/validation_error.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/value_type.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/autogen/models/view_model_response.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/cli/__init__.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped/cli/shaped_cli.py +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped.egg-info/dependency_links.txt +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped.egg-info/entry_points.txt +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped.egg-info/top_level.txt +0 -0
- {shaped-0.14.0/sdk → shaped-1.0.1}/python/shaped.egg-info/zip-safe +0 -0
- {shaped-0.14.0 → shaped-1.0.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: shaped
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: CLI and SDK tools for interacting with the Shaped API.
|
|
5
5
|
Home-page: https://github.com/shaped-ai/shaped-cli
|
|
6
6
|
Author: Shaped Team
|
|
@@ -26,11 +26,21 @@ Requires-Dist: numpy==1.26.4
|
|
|
26
26
|
Requires-Dist: urllib3<2.1.0,>=1.25.3
|
|
27
27
|
Requires-Dist: python-dateutil
|
|
28
28
|
Requires-Dist: typing-extensions>=4.7.1
|
|
29
|
-
Requires-Dist: pytest
|
|
29
|
+
Requires-Dist: pytest>=6.2.5
|
|
30
30
|
Requires-Dist: pytest-mock==3.14.0
|
|
31
31
|
|
|
32
32
|
# Python SDK
|
|
33
33
|
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
### Local Development
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
pip install -e .
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Pip Installation
|
|
43
|
+
|
|
34
44
|
```sh
|
|
35
45
|
pip install shaped
|
|
36
46
|
```
|
|
@@ -112,16 +122,24 @@ print(api_response)
|
|
|
112
122
|
To recreate the autogenerated code:
|
|
113
123
|
|
|
114
124
|
1. `brew install openapi-generator`
|
|
115
|
-
2. Copy across `openapi.yaml` from the `shaped-docs` repository to
|
|
116
|
-
|
|
125
|
+
2. Copy across `openapi.yaml` from the `shaped-docs` repository to `~`
|
|
126
|
+
1. Change `-g python` to the language you want to generate
|
|
127
|
+
1. Change `-o python/` to the directory you want to output to
|
|
128
|
+
3. Navigate to `~` and run the command:
|
|
117
129
|
|
|
118
|
-
|
|
130
|
+
### Python
|
|
131
|
+
```bash
|
|
119
132
|
openapi-generator generate -g python -i openapi.yaml -o python/ -p packageName=shaped.autogen --global-property models,apis,apiDocs=false,modelDocs=false,modelTests=false,apiTests=false,supportingFiles=api_client.py:api_response.py:configuration.py:exceptions.py:rest.py:__init__.py
|
|
120
133
|
```
|
|
121
134
|
|
|
122
|
-
|
|
123
|
-
|
|
135
|
+
### Node.js
|
|
136
|
+
```bash
|
|
137
|
+
openapi-generator generate -i openapi.yaml -g javascript -o nodejs/src -c config.yaml --global-property models,apis,apiDocs=false,modelDocs=false,modelTests=false,apiTests=false,supportingFiles=ApiClient.js
|
|
138
|
+
```
|
|
124
139
|
|
|
140
|
+
## Testing
|
|
141
|
+
`pytest python/tests/test_rank.py --api-key 'api_key'`
|
|
142
|
+
`npm test`
|
|
125
143
|
---
|
|
126
144
|
|
|
127
145
|
# Shaped CLI
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Python SDK
|
|
2
2
|
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
### Local Development
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pip install -e .
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Pip Installation
|
|
12
|
+
|
|
3
13
|
```sh
|
|
4
14
|
pip install shaped
|
|
5
15
|
```
|
|
@@ -81,16 +91,24 @@ print(api_response)
|
|
|
81
91
|
To recreate the autogenerated code:
|
|
82
92
|
|
|
83
93
|
1. `brew install openapi-generator`
|
|
84
|
-
2. Copy across `openapi.yaml` from the `shaped-docs` repository to
|
|
85
|
-
|
|
94
|
+
2. Copy across `openapi.yaml` from the `shaped-docs` repository to `~`
|
|
95
|
+
1. Change `-g python` to the language you want to generate
|
|
96
|
+
1. Change `-o python/` to the directory you want to output to
|
|
97
|
+
3. Navigate to `~` and run the command:
|
|
86
98
|
|
|
87
|
-
|
|
99
|
+
### Python
|
|
100
|
+
```bash
|
|
88
101
|
openapi-generator generate -g python -i openapi.yaml -o python/ -p packageName=shaped.autogen --global-property models,apis,apiDocs=false,modelDocs=false,modelTests=false,apiTests=false,supportingFiles=api_client.py:api_response.py:configuration.py:exceptions.py:rest.py:__init__.py
|
|
89
102
|
```
|
|
90
103
|
|
|
91
|
-
|
|
92
|
-
|
|
104
|
+
### Node.js
|
|
105
|
+
```bash
|
|
106
|
+
openapi-generator generate -i openapi.yaml -g javascript -o nodejs/src -c config.yaml --global-property models,apis,apiDocs=false,modelDocs=false,modelTests=false,apiTests=false,supportingFiles=ApiClient.js
|
|
107
|
+
```
|
|
93
108
|
|
|
109
|
+
## Testing
|
|
110
|
+
`pytest python/tests/test_rank.py --api-key 'api_key'`
|
|
111
|
+
`npm test`
|
|
94
112
|
---
|
|
95
113
|
|
|
96
114
|
# Shaped CLI
|
|
@@ -73,6 +73,7 @@ from shaped.autogen.models.rank_grid_attribute_response import RankGridAttribute
|
|
|
73
73
|
from shaped.autogen.models.rank_response import RankResponse
|
|
74
74
|
from shaped.autogen.models.redshift_dataset_config import RedshiftDatasetConfig
|
|
75
75
|
from shaped.autogen.models.retrieve_request import RetrieveRequest
|
|
76
|
+
from shaped.autogen.models.retrieve_response import RetrieveResponse
|
|
76
77
|
from shaped.autogen.models.retriever_top_k_override import RetrieverTopKOverride
|
|
77
78
|
from shaped.autogen.models.rudder_stack_dataset_config import RudderStackDatasetConfig
|
|
78
79
|
from shaped.autogen.models.segment_dataset_config import SegmentDatasetConfig
|
|
@@ -272,7 +272,9 @@ class DatasetApi:
|
|
|
272
272
|
_query_params: List[Tuple[str, str]] = []
|
|
273
273
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
274
274
|
_form_params: List[Tuple[str, str]] = []
|
|
275
|
-
_files: Dict[
|
|
275
|
+
_files: Dict[
|
|
276
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
277
|
+
] = {}
|
|
276
278
|
_body_params: Optional[bytes] = None
|
|
277
279
|
|
|
278
280
|
# process the path parameters
|
|
@@ -561,7 +563,9 @@ class DatasetApi:
|
|
|
561
563
|
_query_params: List[Tuple[str, str]] = []
|
|
562
564
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
563
565
|
_form_params: List[Tuple[str, str]] = []
|
|
564
|
-
_files: Dict[
|
|
566
|
+
_files: Dict[
|
|
567
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
568
|
+
] = {}
|
|
565
569
|
_body_params: Optional[bytes] = None
|
|
566
570
|
|
|
567
571
|
# process the path parameters
|
|
@@ -837,7 +841,9 @@ class DatasetApi:
|
|
|
837
841
|
_query_params: List[Tuple[str, str]] = []
|
|
838
842
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
839
843
|
_form_params: List[Tuple[str, str]] = []
|
|
840
|
-
_files: Dict[
|
|
844
|
+
_files: Dict[
|
|
845
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
846
|
+
] = {}
|
|
841
847
|
_body_params: Optional[bytes] = None
|
|
842
848
|
|
|
843
849
|
# process the path parameters
|
|
@@ -1100,7 +1106,9 @@ class DatasetApi:
|
|
|
1100
1106
|
_query_params: List[Tuple[str, str]] = []
|
|
1101
1107
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1102
1108
|
_form_params: List[Tuple[str, str]] = []
|
|
1103
|
-
_files: Dict[
|
|
1109
|
+
_files: Dict[
|
|
1110
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1111
|
+
] = {}
|
|
1104
1112
|
_body_params: Optional[bytes] = None
|
|
1105
1113
|
|
|
1106
1114
|
# process the path parameters
|
|
@@ -31,6 +31,7 @@ from shaped.autogen.models.rank_grid_attribute_request1 import RankGridAttribute
|
|
|
31
31
|
from shaped.autogen.models.rank_grid_attribute_response import RankGridAttributeResponse
|
|
32
32
|
from shaped.autogen.models.rank_response import RankResponse
|
|
33
33
|
from shaped.autogen.models.retrieve_request import RetrieveRequest
|
|
34
|
+
from shaped.autogen.models.retrieve_response import RetrieveResponse
|
|
34
35
|
from shaped.autogen.models.similar_item_request import SimilarItemRequest
|
|
35
36
|
from shaped.autogen.models.similar_response import SimilarResponse
|
|
36
37
|
from shaped.autogen.models.similar_users_request import SimilarUsersRequest
|
|
@@ -297,7 +298,9 @@ class ModelInferenceApi:
|
|
|
297
298
|
_query_params: List[Tuple[str, str]] = []
|
|
298
299
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
299
300
|
_form_params: List[Tuple[str, str]] = []
|
|
300
|
-
_files: Dict[
|
|
301
|
+
_files: Dict[
|
|
302
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
303
|
+
] = {}
|
|
301
304
|
_body_params: Optional[bytes] = None
|
|
302
305
|
|
|
303
306
|
# process the path parameters
|
|
@@ -601,7 +604,9 @@ class ModelInferenceApi:
|
|
|
601
604
|
_query_params: List[Tuple[str, str]] = []
|
|
602
605
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
603
606
|
_form_params: List[Tuple[str, str]] = []
|
|
604
|
-
_files: Dict[
|
|
607
|
+
_files: Dict[
|
|
608
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
609
|
+
] = {}
|
|
605
610
|
_body_params: Optional[bytes] = None
|
|
606
611
|
|
|
607
612
|
# process the path parameters
|
|
@@ -905,7 +910,9 @@ class ModelInferenceApi:
|
|
|
905
910
|
_query_params: List[Tuple[str, str]] = []
|
|
906
911
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
907
912
|
_form_params: List[Tuple[str, str]] = []
|
|
908
|
-
_files: Dict[
|
|
913
|
+
_files: Dict[
|
|
914
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
915
|
+
] = {}
|
|
909
916
|
_body_params: Optional[bytes] = None
|
|
910
917
|
|
|
911
918
|
# process the path parameters
|
|
@@ -1209,7 +1216,9 @@ class ModelInferenceApi:
|
|
|
1209
1216
|
_query_params: List[Tuple[str, str]] = []
|
|
1210
1217
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1211
1218
|
_form_params: List[Tuple[str, str]] = []
|
|
1212
|
-
_files: Dict[
|
|
1219
|
+
_files: Dict[
|
|
1220
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1221
|
+
] = {}
|
|
1213
1222
|
_body_params: Optional[bytes] = None
|
|
1214
1223
|
|
|
1215
1224
|
# process the path parameters
|
|
@@ -1513,7 +1522,9 @@ class ModelInferenceApi:
|
|
|
1513
1522
|
_query_params: List[Tuple[str, str]] = []
|
|
1514
1523
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1515
1524
|
_form_params: List[Tuple[str, str]] = []
|
|
1516
|
-
_files: Dict[
|
|
1525
|
+
_files: Dict[
|
|
1526
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1527
|
+
] = {}
|
|
1517
1528
|
_body_params: Optional[bytes] = None
|
|
1518
1529
|
|
|
1519
1530
|
# process the path parameters
|
|
@@ -1817,7 +1828,9 @@ class ModelInferenceApi:
|
|
|
1817
1828
|
_query_params: List[Tuple[str, str]] = []
|
|
1818
1829
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1819
1830
|
_form_params: List[Tuple[str, str]] = []
|
|
1820
|
-
_files: Dict[
|
|
1831
|
+
_files: Dict[
|
|
1832
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1833
|
+
] = {}
|
|
1821
1834
|
_body_params: Optional[bytes] = None
|
|
1822
1835
|
|
|
1823
1836
|
# process the path parameters
|
|
@@ -1895,7 +1908,7 @@ class ModelInferenceApi:
|
|
|
1895
1908
|
_content_type: Optional[StrictStr] = None,
|
|
1896
1909
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1897
1910
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1898
|
-
) ->
|
|
1911
|
+
) -> RetrieveResponse:
|
|
1899
1912
|
"""Retrieve
|
|
1900
1913
|
|
|
1901
1914
|
Retrieve returns relevant item_ids for the given input text or user query. It can be used instead of rank if the filtering, scoring and ordering stages aren't needed for the final ranking. Typically people use this endpoint over rank if they want to reduce latency and complexity of the ranking pipeline and only need a subset of the functionality, e.g. just search but without personalization.
|
|
@@ -1939,7 +1952,7 @@ class ModelInferenceApi:
|
|
|
1939
1952
|
)
|
|
1940
1953
|
|
|
1941
1954
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1942
|
-
'200': "
|
|
1955
|
+
'200': "RetrieveResponse",
|
|
1943
1956
|
'422': "HTTPValidationError",
|
|
1944
1957
|
}
|
|
1945
1958
|
response_data = self.api_client.call_api(
|
|
@@ -1971,7 +1984,7 @@ class ModelInferenceApi:
|
|
|
1971
1984
|
_content_type: Optional[StrictStr] = None,
|
|
1972
1985
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1973
1986
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1974
|
-
) -> ApiResponse[
|
|
1987
|
+
) -> ApiResponse[RetrieveResponse]:
|
|
1975
1988
|
"""Retrieve
|
|
1976
1989
|
|
|
1977
1990
|
Retrieve returns relevant item_ids for the given input text or user query. It can be used instead of rank if the filtering, scoring and ordering stages aren't needed for the final ranking. Typically people use this endpoint over rank if they want to reduce latency and complexity of the ranking pipeline and only need a subset of the functionality, e.g. just search but without personalization.
|
|
@@ -2015,7 +2028,7 @@ class ModelInferenceApi:
|
|
|
2015
2028
|
)
|
|
2016
2029
|
|
|
2017
2030
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2018
|
-
'200': "
|
|
2031
|
+
'200': "RetrieveResponse",
|
|
2019
2032
|
'422': "HTTPValidationError",
|
|
2020
2033
|
}
|
|
2021
2034
|
response_data = self.api_client.call_api(
|
|
@@ -2091,7 +2104,7 @@ class ModelInferenceApi:
|
|
|
2091
2104
|
)
|
|
2092
2105
|
|
|
2093
2106
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2094
|
-
'200': "
|
|
2107
|
+
'200': "RetrieveResponse",
|
|
2095
2108
|
'422': "HTTPValidationError",
|
|
2096
2109
|
}
|
|
2097
2110
|
response_data = self.api_client.call_api(
|
|
@@ -2121,7 +2134,9 @@ class ModelInferenceApi:
|
|
|
2121
2134
|
_query_params: List[Tuple[str, str]] = []
|
|
2122
2135
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2123
2136
|
_form_params: List[Tuple[str, str]] = []
|
|
2124
|
-
_files: Dict[
|
|
2137
|
+
_files: Dict[
|
|
2138
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2139
|
+
] = {}
|
|
2125
2140
|
_body_params: Optional[bytes] = None
|
|
2126
2141
|
|
|
2127
2142
|
# process the path parameters
|
|
@@ -2425,7 +2440,9 @@ class ModelInferenceApi:
|
|
|
2425
2440
|
_query_params: List[Tuple[str, str]] = []
|
|
2426
2441
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2427
2442
|
_form_params: List[Tuple[str, str]] = []
|
|
2428
|
-
_files: Dict[
|
|
2443
|
+
_files: Dict[
|
|
2444
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2445
|
+
] = {}
|
|
2429
2446
|
_body_params: Optional[bytes] = None
|
|
2430
2447
|
|
|
2431
2448
|
# process the path parameters
|
|
@@ -2742,7 +2759,9 @@ class ModelInferenceApi:
|
|
|
2742
2759
|
_query_params: List[Tuple[str, str]] = []
|
|
2743
2760
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2744
2761
|
_form_params: List[Tuple[str, str]] = []
|
|
2745
|
-
_files: Dict[
|
|
2762
|
+
_files: Dict[
|
|
2763
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2764
|
+
] = {}
|
|
2746
2765
|
_body_params: Optional[bytes] = None
|
|
2747
2766
|
|
|
2748
2767
|
# process the path parameters
|
|
@@ -273,7 +273,9 @@ class ModelManagementApi:
|
|
|
273
273
|
_query_params: List[Tuple[str, str]] = []
|
|
274
274
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
275
275
|
_form_params: List[Tuple[str, str]] = []
|
|
276
|
-
_files: Dict[
|
|
276
|
+
_files: Dict[
|
|
277
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
278
|
+
] = {}
|
|
277
279
|
_body_params: Optional[bytes] = None
|
|
278
280
|
|
|
279
281
|
# process the path parameters
|
|
@@ -549,7 +551,9 @@ class ModelManagementApi:
|
|
|
549
551
|
_query_params: List[Tuple[str, str]] = []
|
|
550
552
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
551
553
|
_form_params: List[Tuple[str, str]] = []
|
|
552
|
-
_files: Dict[
|
|
554
|
+
_files: Dict[
|
|
555
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
556
|
+
] = {}
|
|
553
557
|
_body_params: Optional[bytes] = None
|
|
554
558
|
|
|
555
559
|
# process the path parameters
|
|
@@ -812,7 +816,9 @@ class ModelManagementApi:
|
|
|
812
816
|
_query_params: List[Tuple[str, str]] = []
|
|
813
817
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
814
818
|
_form_params: List[Tuple[str, str]] = []
|
|
815
|
-
_files: Dict[
|
|
819
|
+
_files: Dict[
|
|
820
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
821
|
+
] = {}
|
|
816
822
|
_body_params: Optional[bytes] = None
|
|
817
823
|
|
|
818
824
|
# process the path parameters
|
|
@@ -1086,7 +1092,9 @@ class ModelManagementApi:
|
|
|
1086
1092
|
_query_params: List[Tuple[str, str]] = []
|
|
1087
1093
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1088
1094
|
_form_params: List[Tuple[str, str]] = []
|
|
1089
|
-
_files: Dict[
|
|
1095
|
+
_files: Dict[
|
|
1096
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1097
|
+
] = {}
|
|
1090
1098
|
_body_params: Optional[bytes] = None
|
|
1091
1099
|
|
|
1092
1100
|
# process the path parameters
|
|
@@ -1375,7 +1383,9 @@ class ModelManagementApi:
|
|
|
1375
1383
|
_query_params: List[Tuple[str, str]] = []
|
|
1376
1384
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1377
1385
|
_form_params: List[Tuple[str, str]] = []
|
|
1378
|
-
_files: Dict[
|
|
1386
|
+
_files: Dict[
|
|
1387
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1388
|
+
] = {}
|
|
1379
1389
|
_body_params: Optional[bytes] = None
|
|
1380
1390
|
|
|
1381
1391
|
# process the path parameters
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import datetime
|
|
16
16
|
from dateutil.parser import parse
|
|
17
17
|
from enum import Enum
|
|
18
|
+
import decimal
|
|
18
19
|
import json
|
|
19
20
|
import mimetypes
|
|
20
21
|
import os
|
|
@@ -66,6 +67,7 @@ class ApiClient:
|
|
|
66
67
|
'bool': bool,
|
|
67
68
|
'date': datetime.date,
|
|
68
69
|
'datetime': datetime.datetime,
|
|
70
|
+
'decimal': decimal.Decimal,
|
|
69
71
|
'object': object,
|
|
70
72
|
}
|
|
71
73
|
_pool = None
|
|
@@ -338,6 +340,7 @@ class ApiClient:
|
|
|
338
340
|
If obj is str, int, long, float, bool, return directly.
|
|
339
341
|
If obj is datetime.datetime, datetime.date
|
|
340
342
|
convert to string in iso8601 format.
|
|
343
|
+
If obj is decimal.Decimal return string representation.
|
|
341
344
|
If obj is list, sanitize each element in the list.
|
|
342
345
|
If obj is dict, return the dict.
|
|
343
346
|
If obj is OpenAPI model, return the properties dict.
|
|
@@ -363,6 +366,8 @@ class ApiClient:
|
|
|
363
366
|
)
|
|
364
367
|
elif isinstance(obj, (datetime.datetime, datetime.date)):
|
|
365
368
|
return obj.isoformat()
|
|
369
|
+
elif isinstance(obj, decimal.Decimal):
|
|
370
|
+
return str(obj)
|
|
366
371
|
|
|
367
372
|
elif isinstance(obj, dict):
|
|
368
373
|
obj_dict = obj
|
|
@@ -399,12 +404,12 @@ class ApiClient:
|
|
|
399
404
|
data = json.loads(response_text)
|
|
400
405
|
except ValueError:
|
|
401
406
|
data = response_text
|
|
402
|
-
elif
|
|
407
|
+
elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
|
|
403
408
|
if response_text == "":
|
|
404
409
|
data = ""
|
|
405
410
|
else:
|
|
406
411
|
data = json.loads(response_text)
|
|
407
|
-
elif
|
|
412
|
+
elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE):
|
|
408
413
|
data = response_text
|
|
409
414
|
else:
|
|
410
415
|
raise ApiException(
|
|
@@ -454,6 +459,8 @@ class ApiClient:
|
|
|
454
459
|
return self.__deserialize_date(data)
|
|
455
460
|
elif klass == datetime.datetime:
|
|
456
461
|
return self.__deserialize_datetime(data)
|
|
462
|
+
elif klass == decimal.Decimal:
|
|
463
|
+
return decimal.Decimal(data)
|
|
457
464
|
elif issubclass(klass, Enum):
|
|
458
465
|
return self.__deserialize_enum(data, klass)
|
|
459
466
|
else:
|
|
@@ -528,7 +535,10 @@ class ApiClient:
|
|
|
528
535
|
|
|
529
536
|
return "&".join(["=".join(map(str, item)) for item in new_params])
|
|
530
537
|
|
|
531
|
-
def files_parameters(
|
|
538
|
+
def files_parameters(
|
|
539
|
+
self,
|
|
540
|
+
files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]],
|
|
541
|
+
):
|
|
532
542
|
"""Builds form parameters.
|
|
533
543
|
|
|
534
544
|
:param files: File parameters.
|
|
@@ -543,6 +553,12 @@ class ApiClient:
|
|
|
543
553
|
elif isinstance(v, bytes):
|
|
544
554
|
filename = k
|
|
545
555
|
filedata = v
|
|
556
|
+
elif isinstance(v, tuple):
|
|
557
|
+
filename, filedata = v
|
|
558
|
+
elif isinstance(v, list):
|
|
559
|
+
for file_param in v:
|
|
560
|
+
params.extend(self.files_parameters({k: file_param}))
|
|
561
|
+
continue
|
|
546
562
|
else:
|
|
547
563
|
raise ValueError("Unsupported file value")
|
|
548
564
|
mimetype = (
|