shaped 2.0.2__py3-none-any.whl → 2.0.4__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.
Files changed (294) hide show
  1. shaped/__init__.py +47 -42
  2. shaped/autogen/__init__.py +37 -51
  3. shaped/autogen/api/engine_api.py +1 -1
  4. shaped/autogen/api/query_api.py +8 -68
  5. shaped/autogen/api/table_api.py +1 -1
  6. shaped/autogen/api/view_api.py +1 -1
  7. shaped/autogen/api_client.py +4 -4
  8. shaped/autogen/configuration.py +5 -3
  9. shaped/autogen/exceptions.py +7 -4
  10. shaped/autogen/models/__init__.py +19 -26
  11. shaped/autogen/models/ai_enrichment_view_config.py +1 -1
  12. shaped/autogen/models/algorithm.py +1 -1
  13. shaped/autogen/models/amplitude_table_config.py +1 -1
  14. shaped/autogen/models/ascending.py +29 -17
  15. shaped/autogen/models/attn_dropout_prob.py +1 -1
  16. shaped/autogen/models/attribute_journey.py +1 -1
  17. shaped/autogen/models/attribute_value.py +1 -1
  18. shaped/autogen/models/autoscaling_config.py +1 -1
  19. shaped/autogen/models/aws_pinpoint_table_config.py +1 -1
  20. shaped/autogen/models/batch_size.py +1 -1
  21. shaped/autogen/models/batch_size1.py +1 -1
  22. shaped/autogen/models/batch_size2.py +1 -1
  23. shaped/autogen/models/big_query_table_config.py +1 -1
  24. shaped/autogen/models/bm25.py +1 -1
  25. shaped/autogen/models/boosted_reorder_step.py +1 -1
  26. shaped/autogen/models/canary_rollout.py +1 -1
  27. shaped/autogen/models/candidate_attributes_retrieve_step.py +1 -14
  28. shaped/autogen/models/candidate_ids_retrieve_step.py +1 -1
  29. shaped/autogen/models/candidate_retrieval_strategy.py +1 -1
  30. shaped/autogen/models/clickhouse_table_config.py +1 -1
  31. shaped/autogen/models/column_order_retrieve_step.py +1 -1
  32. shaped/autogen/models/column_ordering.py +1 -1
  33. shaped/autogen/models/create_table_response.py +1 -1
  34. shaped/autogen/models/create_view_response.py +1 -1
  35. shaped/autogen/models/custom_table_config.py +1 -1
  36. shaped/autogen/models/data_compute_config.py +1 -1
  37. shaped/autogen/models/data_config.py +1 -1
  38. shaped/autogen/models/data_config_interaction_table.py +1 -1
  39. shaped/autogen/models/data_split_config.py +1 -1
  40. shaped/autogen/models/data_split_strategy.py +1 -1
  41. shaped/autogen/models/data_tier.py +1 -1
  42. shaped/autogen/models/default.py +1 -1
  43. shaped/autogen/models/delete_engine_response.py +1 -1
  44. shaped/autogen/models/delete_table_response.py +1 -1
  45. shaped/autogen/models/delete_view_response.py +1 -1
  46. shaped/autogen/models/deployment_config.py +2 -8
  47. shaped/autogen/models/distance_function.py +5 -5
  48. shaped/autogen/models/diversity_reorder_step.py +1 -1
  49. shaped/autogen/models/dropout_rate.py +1 -1
  50. shaped/autogen/models/dynamo_db_table_config.py +1 -1
  51. shaped/autogen/models/dynamo_db_table_config_scan_kwargs_value.py +1 -1
  52. shaped/autogen/models/embedder_batch_size.py +1 -1
  53. shaped/autogen/models/embedding_config.py +1 -1
  54. shaped/autogen/models/embedding_dim.py +1 -1
  55. shaped/autogen/models/embedding_dims.py +1 -1
  56. shaped/autogen/models/embedding_size.py +1 -1
  57. shaped/autogen/models/encoder.py +1 -1
  58. shaped/autogen/models/encoding_pooling_strategy.py +5 -5
  59. shaped/autogen/models/engine.py +1 -1
  60. shaped/autogen/models/engine_config_v2.py +1 -1
  61. shaped/autogen/models/engine_details_response.py +1 -1
  62. shaped/autogen/models/engine_schema.py +8 -8
  63. shaped/autogen/models/engine_schema_user_inner.py +30 -18
  64. shaped/autogen/models/entity_config.py +1 -1
  65. shaped/autogen/models/entity_journey.py +28 -19
  66. shaped/autogen/models/entity_type.py +1 -1
  67. shaped/autogen/models/evaluation_config.py +1 -1
  68. shaped/autogen/models/exploration_reorder_step.py +1 -1
  69. shaped/autogen/models/expression_filter_step.py +1 -1
  70. shaped/autogen/models/factors.py +1 -1
  71. shaped/autogen/models/factors1.py +1 -1
  72. shaped/autogen/models/feature.py +1 -1
  73. shaped/autogen/models/feature_type.py +1 -1
  74. shaped/autogen/models/file_table_config.py +1 -1
  75. shaped/autogen/models/filter_config.py +14 -14
  76. shaped/autogen/models/filter_dataset.py +47 -23
  77. shaped/autogen/models/filter_index_type.py +1 -1
  78. shaped/autogen/models/filter_retrieve_step.py +1 -1
  79. shaped/autogen/models/filter_step_explanation.py +165 -0
  80. shaped/autogen/models/filter_table.py +140 -0
  81. shaped/autogen/models/filter_type.py +134 -0
  82. shaped/autogen/models/global_filter.py +1 -1
  83. shaped/autogen/models/hidden_dropout_prob.py +1 -1
  84. shaped/autogen/models/hidden_size.py +1 -1
  85. shaped/autogen/models/hidden_size1.py +1 -1
  86. shaped/autogen/models/http_problem_response.py +1 -1
  87. shaped/autogen/models/http_validation_error.py +1 -1
  88. shaped/autogen/models/hugging_face_encoder.py +6 -4
  89. shaped/autogen/models/iceberg_table_config.py +1 -1
  90. shaped/autogen/models/index_config.py +1 -1
  91. shaped/autogen/models/inner_entity_id.py +144 -0
  92. shaped/autogen/models/inner_size.py +1 -1
  93. shaped/autogen/models/inner_size1.py +1 -1
  94. shaped/autogen/models/inner_uid.py +144 -0
  95. shaped/autogen/models/interaction_config.py +1 -1
  96. shaped/autogen/models/interaction_pooling_encoder.py +1 -1
  97. shaped/autogen/models/interaction_round_robin_encoder.py +1 -1
  98. shaped/autogen/models/item_attribute_pooling_encoder.py +1 -14
  99. shaped/autogen/models/journey.py +1 -1
  100. shaped/autogen/models/kafka_table_config.py +1 -1
  101. shaped/autogen/models/kinesis_table_config.py +1 -1
  102. shaped/autogen/models/kinesis_table_config_column_schema_value.py +1 -1
  103. shaped/autogen/models/label.py +1 -1
  104. shaped/autogen/models/label_type.py +1 -2
  105. shaped/autogen/models/laplace_smoothing.py +1 -1
  106. shaped/autogen/models/latency_scaling_policy.py +1 -1
  107. shaped/autogen/models/learning_rate.py +1 -1
  108. shaped/autogen/models/learning_rate1.py +1 -1
  109. shaped/autogen/models/learning_rate2.py +1 -1
  110. shaped/autogen/models/learning_rate3.py +1 -1
  111. shaped/autogen/models/lexical_search_mode.py +3 -3
  112. shaped/autogen/models/list_engines_response.py +1 -1
  113. shaped/autogen/models/list_tables_response.py +1 -1
  114. shaped/autogen/models/list_views_response.py +1 -1
  115. shaped/autogen/models/location_inner.py +138 -0
  116. shaped/autogen/models/loss_types.py +1 -1
  117. shaped/autogen/models/lr.py +1 -1
  118. shaped/autogen/models/lr1.py +1 -1
  119. shaped/autogen/models/lr2.py +1 -1
  120. shaped/autogen/models/max_depth.py +1 -1
  121. shaped/autogen/models/max_leaves.py +1 -1
  122. shaped/autogen/models/max_seq_length.py +1 -1
  123. shaped/autogen/models/max_seq_length1.py +1 -1
  124. shaped/autogen/models/max_seq_length2.py +1 -1
  125. shaped/autogen/models/mode.py +1 -1
  126. shaped/autogen/models/mode1.py +20 -18
  127. shaped/autogen/models/mode2.py +32 -18
  128. shaped/autogen/models/models_inner.py +308 -0
  129. shaped/autogen/models/mongo_db_table_config.py +1 -1
  130. shaped/autogen/models/mssql_table_config.py +1 -1
  131. shaped/autogen/models/my_sql_table_config.py +1 -1
  132. shaped/autogen/models/n_epochs.py +1 -1
  133. shaped/autogen/models/n_epochs1.py +1 -1
  134. shaped/autogen/models/n_epochs2.py +1 -1
  135. shaped/autogen/models/n_estimators.py +1 -1
  136. shaped/autogen/models/n_heads.py +1 -1
  137. shaped/autogen/models/n_layers.py +1 -1
  138. shaped/autogen/models/neg_per_positive.py +1 -1
  139. shaped/autogen/models/negative_samples_count.py +1 -1
  140. shaped/autogen/models/ngram_tokenizer.py +1 -1
  141. shaped/autogen/models/no_op_config.py +1 -1
  142. shaped/autogen/models/num_blocks.py +1 -1
  143. shaped/autogen/models/num_heads.py +1 -1
  144. shaped/autogen/models/num_leaves.py +1 -1
  145. shaped/autogen/models/objective.py +1 -1
  146. shaped/autogen/models/objective1.py +1 -1
  147. shaped/autogen/models/online_store_config.py +1 -1
  148. shaped/autogen/models/pagination_config.py +1 -1
  149. shaped/autogen/models/parameter_definition.py +1 -1
  150. shaped/autogen/models/parameters_value.py +1 -1
  151. shaped/autogen/models/passthrough_score.py +1 -1
  152. shaped/autogen/models/personal_filter.py +1 -1
  153. shaped/autogen/models/pipeline_stage_explanation.py +4 -4
  154. shaped/autogen/models/policy.py +1 -1
  155. shaped/autogen/models/pool_fn.py +39 -21
  156. shaped/autogen/models/pooling_function.py +1 -1
  157. shaped/autogen/models/postgres_table_config.py +1 -1
  158. shaped/autogen/models/posthog_table_config.py +1 -1
  159. shaped/autogen/models/prebuilt_filter_step.py +1 -1
  160. shaped/autogen/models/precomputed_item_embedding.py +1 -1
  161. shaped/autogen/models/precomputed_user_embedding.py +1 -1
  162. shaped/autogen/models/query.py +15 -15
  163. shaped/autogen/models/query1.py +15 -15
  164. shaped/autogen/models/query_any_of.py +58 -26
  165. shaped/autogen/models/query_config.py +140 -0
  166. shaped/autogen/models/query_definition.py +1 -1
  167. shaped/autogen/models/query_encoder.py +1 -1
  168. shaped/autogen/models/query_explanation.py +7 -3
  169. shaped/autogen/models/query_request.py +1 -1
  170. shaped/autogen/models/query_result.py +1 -1
  171. shaped/autogen/models/query_table_config.py +1 -1
  172. shaped/autogen/models/rank_item_attribute_values_query_config.py +1 -1
  173. shaped/autogen/models/rank_query_config.py +7 -7
  174. shaped/autogen/models/rank_query_config_filter_inner.py +1 -1
  175. shaped/autogen/models/rank_query_config_reorder_inner.py +62 -25
  176. shaped/autogen/models/rank_query_config_retrieve_inner.py +100 -31
  177. shaped/autogen/models/recreate_rollout.py +1 -1
  178. shaped/autogen/models/redshift_table_config.py +1 -1
  179. shaped/autogen/models/reference_table_config.py +1 -1
  180. shaped/autogen/models/regularization.py +1 -1
  181. shaped/autogen/models/reorder_inner.py +149 -0
  182. shaped/autogen/models/reorder_step_explanation.py +207 -0
  183. shaped/autogen/models/request.py +1 -1
  184. shaped/autogen/models/request1.py +1 -1
  185. shaped/autogen/models/requests_per_second_scaling_policy.py +1 -1
  186. shaped/autogen/models/resource_config.py +100 -0
  187. shaped/autogen/models/response_get_view_details_views_view_name_get.py +1 -1
  188. shaped/autogen/models/result.py +1 -14
  189. shaped/autogen/models/result_embeddings_value.py +1 -1
  190. shaped/autogen/models/retrieval_scores_value.py +127 -0
  191. shaped/autogen/models/retrieve_inner.py +196 -0
  192. shaped/autogen/models/retrieve_step_explanation.py +172 -0
  193. shaped/autogen/models/retriever.py +1 -1
  194. shaped/autogen/models/retriever1.py +1 -1
  195. shaped/autogen/models/rollout_config.py +1 -1
  196. shaped/autogen/models/rudderstack_table_config.py +1 -1
  197. shaped/autogen/models/sampling_strategy.py +1 -1
  198. shaped/autogen/models/saved_query_info_response.py +18 -4
  199. shaped/autogen/models/saved_query_list_response.py +1 -1
  200. shaped/autogen/models/saved_query_request.py +1 -1
  201. shaped/autogen/models/schema_config.py +1 -1
  202. shaped/autogen/models/score.py +1 -1
  203. shaped/autogen/models/score_ensemble.py +1 -14
  204. shaped/autogen/models/score_ensemble_policy_config.py +49 -25
  205. shaped/autogen/models/score_ensemble_policy_config_policies_inner.py +456 -123
  206. shaped/autogen/models/score_step_explanation.py +224 -0
  207. shaped/autogen/models/search_config.py +1 -1
  208. shaped/autogen/models/segment_table_config.py +1 -1
  209. shaped/autogen/models/sequence_length.py +1 -1
  210. shaped/autogen/models/server_config.py +14 -1
  211. shaped/autogen/models/setup_engine_response.py +1 -1
  212. shaped/autogen/models/shaped_internal_recsys_policies_als_model_policy_als_model_policy_config.py +9 -3
  213. shaped/autogen/models/shaped_internal_recsys_policies_beeformer_model_policy_beeformer_model_policy_beeformer_model_policy_config.py +9 -3
  214. shaped/autogen/models/shaped_internal_recsys_policies_bert_model_policy_bert_model_policy_bert_model_policy_config.py +10 -4
  215. shaped/autogen/models/shaped_internal_recsys_policies_chronological_model_policy_chronological_model_policy_config.py +46 -27
  216. shaped/autogen/models/shaped_internal_recsys_policies_elsa_model_policy_elsa_model_policy_elsa_model_policy_config.py +6 -4
  217. shaped/autogen/models/shaped_internal_recsys_policies_gsasrec_model_policy_gsasrec_model_policy_gsas_rec_model_policy_config.py +9 -3
  218. shaped/autogen/models/shaped_internal_recsys_policies_item2vec_model_policy_item2_vec_model_policy_config.py +1 -1
  219. shaped/autogen/models/shaped_internal_recsys_policies_item_content_similarity_model_policy_item_content_similarity_model_policy_config.py +77 -34
  220. shaped/autogen/models/shaped_internal_recsys_policies_lightgbm_model_policy_lightgbm_model_policy_light_gbm_model_policy_config.py +9 -3
  221. shaped/autogen/models/shaped_internal_recsys_policies_ngram_model_policy_ngram_model_policy_config.py +1 -1
  222. shaped/autogen/models/shaped_internal_recsys_policies_popular_model_policy_popular_model_policy_config.py +52 -28
  223. shaped/autogen/models/shaped_internal_recsys_policies_random_model_policy_random_model_policy_config.py +21 -17
  224. shaped/autogen/models/shaped_internal_recsys_policies_recently_popular_policy_recently_popular_policy_config.py +36 -23
  225. shaped/autogen/models/shaped_internal_recsys_policies_rising_popular_policy_rising_popular_policy_config.py +1 -1
  226. shaped/autogen/models/shaped_internal_recsys_policies_sasrec_model_policy_sasrec_model_policy_sas_rec_model_policy_config.py +9 -3
  227. shaped/autogen/models/shaped_internal_recsys_policies_svd_model_policy_svd_model_policy_config.py +1 -1
  228. shaped/autogen/models/shaped_internal_recsys_policies_two_tower_model_policy_two_tower_model_policy_two_tower_model_policy_config.py +9 -3
  229. shaped/autogen/models/shaped_internal_recsys_policies_user_item_content_similarity_model_policy_user_item_content_similarity_model_policy_config.py +53 -31
  230. shaped/autogen/models/shaped_internal_recsys_policies_widedeep_model_policy_wide_deep_model_policy_config.py +10 -4
  231. shaped/autogen/models/shaped_internal_recsys_policies_xgboost_model_policy_xg_boost_model_policy_config.py +12 -6
  232. shaped/autogen/models/shopify_table_config.py +1 -1
  233. shaped/autogen/models/similarity_retrieve_step.py +6 -4
  234. shaped/autogen/models/snowflake_table_config.py +1 -1
  235. shaped/autogen/models/sql_transform_type.py +1 -1
  236. shaped/autogen/models/sql_view_config.py +1 -1
  237. shaped/autogen/models/stemmer_tokenizer.py +1 -1
  238. shaped/autogen/models/step_explanation.py +1 -1
  239. shaped/autogen/models/steps_inner.py +179 -0
  240. shaped/autogen/models/strategy.py +1 -1
  241. shaped/autogen/models/table.py +1 -1
  242. shaped/autogen/models/table_deployment_type.py +1 -1
  243. shaped/autogen/models/table_insert_arguments.py +3 -3
  244. shaped/autogen/models/table_insert_response.py +1 -1
  245. shaped/autogen/models/text_encoding.py +29 -17
  246. shaped/autogen/models/text_search_retrieve_step.py +1 -1
  247. shaped/autogen/models/time_frequency.py +1 -1
  248. shaped/autogen/models/time_window.py +1 -1
  249. shaped/autogen/models/time_window_in_days.py +29 -17
  250. shaped/autogen/models/tokenizer.py +1 -1
  251. shaped/autogen/models/trained_model_encoder.py +1 -1
  252. shaped/autogen/models/training_compute_config.py +4 -4
  253. shaped/autogen/models/training_config.py +4 -4
  254. shaped/autogen/models/training_config_models_inner.py +325 -93
  255. shaped/autogen/models/training_strategy.py +1 -1
  256. shaped/autogen/models/transform_status.py +41 -0
  257. shaped/autogen/models/trending_mode.py +4 -4
  258. shaped/autogen/models/truncate_filter_step.py +1 -1
  259. shaped/autogen/models/tunable_bool.py +1 -1
  260. shaped/autogen/models/tunable_float.py +1 -1
  261. shaped/autogen/models/tunable_int.py +1 -1
  262. shaped/autogen/models/tunable_int_categorical.py +1 -1
  263. shaped/autogen/models/tunable_string.py +1 -1
  264. shaped/autogen/models/tuning_config.py +1 -1
  265. shaped/autogen/models/type.py +36 -20
  266. shaped/autogen/models/update_table_response.py +1 -1
  267. shaped/autogen/models/update_view_response.py +1 -1
  268. shaped/autogen/models/user_attribute_pooling_encoder.py +1 -1
  269. shaped/autogen/models/user_inner.py +134 -0
  270. shaped/autogen/models/val_split.py +1 -1
  271. shaped/autogen/models/validation_error.py +4 -4
  272. shaped/autogen/models/validation_error_loc_inner.py +28 -16
  273. shaped/autogen/models/value_type.py +1 -1
  274. shaped/autogen/models/vector_search_mode.py +6 -4
  275. shaped/autogen/models/view.py +4 -4
  276. shaped/autogen/models/view_details_ai.py +6 -6
  277. shaped/autogen/models/view_details_ai_schema_value.py +1 -1
  278. shaped/autogen/models/view_details_sql.py +6 -6
  279. shaped/autogen/models/view_status.py +8 -8
  280. shaped/autogen/models/weight_decay.py +1 -1
  281. shaped/autogen/models/whitespace_tokenizer.py +1 -1
  282. shaped/autogen/models/window_size.py +1 -1
  283. shaped/autogen/rest.py +9 -9
  284. shaped/cli/shaped_cli.py +152 -29
  285. shaped/client.py +50 -43
  286. shaped/config_builders.py +110 -100
  287. shaped/query_builder.py +56 -49
  288. {shaped-2.0.2.dist-info → shaped-2.0.4.dist-info}/METADATA +2 -2
  289. shaped-2.0.4.dist-info/RECORD +296 -0
  290. {shaped-2.0.2.dist-info → shaped-2.0.4.dist-info}/WHEEL +1 -1
  291. shaped-2.0.2.dist-info/RECORD +0 -278
  292. {shaped-2.0.2.dist-info → shaped-2.0.4.dist-info}/entry_points.txt +0 -0
  293. {shaped-2.0.2.dist-info → shaped-2.0.4.dist-info}/top_level.txt +0 -0
  294. {shaped-2.0.2.dist-info → shaped-2.0.4.dist-info}/zip-safe +0 -0
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -66,8 +66,11 @@ class ShapedInternalRecsysPoliciesSasrecModelPolicySasrecModelPolicySASRecModelP
66
66
  sample_ratio: Optional[Union[StrictFloat, StrictInt]] = 0.8
67
67
  eval_step: Optional[StrictInt] = 1
68
68
  early_stopping_step: Optional[StrictInt] = 5
69
+ normalize_numerical_features: Optional[StrictBool] = Field(default=True, description="Enable NormalizeNumerical transform for entity features.")
70
+ use_derived_timestamp_features: Optional[StrictBool] = Field(default=True, description="Enable TimestampSinCosEncoder and TimestampCountEncoder for entity features.")
71
+ balance_labels: Optional[StrictBool] = Field(default=True, description="Enable BalanceLabel transform for interactions.")
69
72
  additional_properties: Dict[str, Any] = {}
70
- __properties: ClassVar[List[str]] = ["policy_type", "name", "event_values", "batch_size", "eval_batch_size", "n_epochs", "negative_samples_count", "device", "hidden_size", "inner_size", "learning_rate", "attn_dropout_prob", "hidden_act", "hidden_dropout_prob", "n_heads", "n_layers", "layer_norm_eps", "initializer_range", "mask_rate", "loss_type", "max_seq_length", "sample_strategy", "append_item_features", "append_item_embeddings", "use_candidate_embeddings", "sample_seed", "sample_ratio", "eval_step", "early_stopping_step"]
73
+ __properties: ClassVar[List[str]] = ["policy_type", "name", "event_values", "batch_size", "eval_batch_size", "n_epochs", "negative_samples_count", "device", "hidden_size", "inner_size", "learning_rate", "attn_dropout_prob", "hidden_act", "hidden_dropout_prob", "n_heads", "n_layers", "layer_norm_eps", "initializer_range", "mask_rate", "loss_type", "max_seq_length", "sample_strategy", "append_item_features", "append_item_embeddings", "use_candidate_embeddings", "sample_seed", "sample_ratio", "eval_step", "early_stopping_step", "normalize_numerical_features", "use_derived_timestamp_features", "balance_labels"]
71
74
 
72
75
  @field_validator('policy_type')
73
76
  def policy_type_validate_enum(cls, value):
@@ -212,7 +215,10 @@ class ShapedInternalRecsysPoliciesSasrecModelPolicySasrecModelPolicySASRecModelP
212
215
  "sample_seed": obj.get("sample_seed") if obj.get("sample_seed") is not None else 42,
213
216
  "sample_ratio": obj.get("sample_ratio") if obj.get("sample_ratio") is not None else 0.8,
214
217
  "eval_step": obj.get("eval_step") if obj.get("eval_step") is not None else 1,
215
- "early_stopping_step": obj.get("early_stopping_step") if obj.get("early_stopping_step") is not None else 5
218
+ "early_stopping_step": obj.get("early_stopping_step") if obj.get("early_stopping_step") is not None else 5,
219
+ "normalize_numerical_features": obj.get("normalize_numerical_features") if obj.get("normalize_numerical_features") is not None else True,
220
+ "use_derived_timestamp_features": obj.get("use_derived_timestamp_features") if obj.get("use_derived_timestamp_features") is not None else True,
221
+ "balance_labels": obj.get("balance_labels") if obj.get("balance_labels") is not None else True
216
222
  })
217
223
  # store additional fields in additional_properties
218
224
  for _key in obj.keys():
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -46,7 +46,10 @@ class ShapedInternalRecsysPoliciesTwoTowerModelPolicyTwoTowerModelPolicyTwoTower
46
46
  strategy: Optional[TrainingStrategy] = None
47
47
  patience: Optional[StrictInt] = Field(default=5, description="Number of epochs to wait without improvement before early stopping.")
48
48
  num_workers: Optional[StrictInt] = 0
49
- __properties: ClassVar[List[str]] = ["policy_type", "name", "event_values", "batch_size", "n_epochs", "device", "negative_samples_count", "embedding_dims", "lr", "weight_decay", "use_item_ids_as_features", "strategy", "patience", "num_workers"]
49
+ normalize_numerical_features: Optional[StrictBool] = Field(default=True, description="Enable NormalizeNumerical transform for entity features.")
50
+ use_derived_timestamp_features: Optional[StrictBool] = Field(default=True, description="Enable TimestampSinCosEncoder and TimestampCountEncoder for entity features.")
51
+ balance_labels: Optional[StrictBool] = Field(default=True, description="Enable BalanceLabel transform for interactions.")
52
+ __properties: ClassVar[List[str]] = ["policy_type", "name", "event_values", "batch_size", "n_epochs", "device", "negative_samples_count", "embedding_dims", "lr", "weight_decay", "use_item_ids_as_features", "strategy", "patience", "num_workers", "normalize_numerical_features", "use_derived_timestamp_features", "balance_labels"]
50
53
 
51
54
  @field_validator('policy_type')
52
55
  def policy_type_validate_enum(cls, value):
@@ -152,7 +155,10 @@ class ShapedInternalRecsysPoliciesTwoTowerModelPolicyTwoTowerModelPolicyTwoTower
152
155
  "use_item_ids_as_features": obj.get("use_item_ids_as_features") if obj.get("use_item_ids_as_features") is not None else True,
153
156
  "strategy": obj.get("strategy"),
154
157
  "patience": obj.get("patience") if obj.get("patience") is not None else 5,
155
- "num_workers": obj.get("num_workers") if obj.get("num_workers") is not None else 0
158
+ "num_workers": obj.get("num_workers") if obj.get("num_workers") is not None else 0,
159
+ "normalize_numerical_features": obj.get("normalize_numerical_features") if obj.get("normalize_numerical_features") is not None else True,
160
+ "use_derived_timestamp_features": obj.get("use_derived_timestamp_features") if obj.get("use_derived_timestamp_features") is not None else True,
161
+ "balance_labels": obj.get("balance_labels") if obj.get("balance_labels") is not None else True
156
162
  })
157
163
  return _obj
158
164
 
@@ -13,38 +13,52 @@
13
13
 
14
14
 
15
15
  from __future__ import annotations
16
+
17
+ import json
16
18
  import pprint
17
19
  import re # noqa: F401
18
- import json
20
+ from typing import Any, ClassVar, Dict, List, Optional, Set
19
21
 
20
22
  from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
21
- from typing import Any, ClassVar, Dict, List, Optional
22
23
  from shaped.autogen.models.distance_function import DistanceFunction
23
24
  from shaped.autogen.models.encoding_pooling_strategy import EncodingPoolingStrategy
24
- from typing import Optional, Set
25
25
  from typing_extensions import Self
26
26
 
27
- class ShapedInternalRecsysPoliciesUserItemContentSimilarityModelPolicyUserItemContentSimilarityModelPolicyConfig(BaseModel):
27
+
28
+ class ShapedInternalRecsysPoliciesUserItemContentSimilarityModelPolicyUserItemContentSimilarityModelPolicyConfig(
29
+ BaseModel
30
+ ):
28
31
  """
29
32
  ShapedInternalRecsysPoliciesUserItemContentSimilarityModelPolicyUserItemContentSimilarityModelPolicyConfig
30
- """ # noqa: E501
31
- policy_type: Optional[StrictStr] = 'user-item-content-similarity'
33
+ """ # noqa: E501
34
+
35
+ policy_type: Optional[StrictStr] = "user-item-content-similarity"
32
36
  name: Optional[StrictStr] = None
33
37
  event_values: Optional[List[StrictStr]] = None
34
38
  pool_fn: Optional[EncodingPoolingStrategy] = None
35
39
  distance_fn: Optional[DistanceFunction] = None
36
40
  item_feature_names: Optional[List[StrictStr]] = None
37
41
  user_feature_names: Optional[List[StrictStr]] = None
38
- __properties: ClassVar[List[str]] = ["policy_type", "name", "event_values", "pool_fn", "distance_fn", "item_feature_names", "user_feature_names"]
39
-
40
- @field_validator('policy_type')
42
+ __properties: ClassVar[List[str]] = [
43
+ "policy_type",
44
+ "name",
45
+ "event_values",
46
+ "pool_fn",
47
+ "distance_fn",
48
+ "item_feature_names",
49
+ "user_feature_names",
50
+ ]
51
+
52
+ @field_validator("policy_type")
41
53
  def policy_type_validate_enum(cls, value):
42
54
  """Validates the enum"""
43
55
  if value is None:
44
56
  return value
45
57
 
46
- if value not in set(['user-item-content-similarity']):
47
- raise ValueError("must be one of enum values ('user-item-content-similarity')")
58
+ if value not in set(["user-item-content-similarity"]):
59
+ raise ValueError(
60
+ "must be one of enum values ('user-item-content-similarity')"
61
+ )
48
62
  return value
49
63
 
50
64
  model_config = ConfigDict(
@@ -53,7 +67,6 @@ class ShapedInternalRecsysPoliciesUserItemContentSimilarityModelPolicyUserItemCo
53
67
  protected_namespaces=(),
54
68
  )
55
69
 
56
-
57
70
  def to_str(self) -> str:
58
71
  """Returns the string representation of the model using alias"""
59
72
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -78,8 +91,7 @@ class ShapedInternalRecsysPoliciesUserItemContentSimilarityModelPolicyUserItemCo
78
91
  were set at model initialization. Other fields with value `None`
79
92
  are ignored.
80
93
  """
81
- excluded_fields: Set[str] = set([
82
- ])
94
+ excluded_fields: Set[str] = set([])
83
95
 
84
96
  _dict = self.model_dump(
85
97
  by_alias=True,
@@ -89,22 +101,28 @@ class ShapedInternalRecsysPoliciesUserItemContentSimilarityModelPolicyUserItemCo
89
101
  # set to None if name (nullable) is None
90
102
  # and model_fields_set contains the field
91
103
  if self.name is None and "name" in self.model_fields_set:
92
- _dict['name'] = None
104
+ _dict["name"] = None
93
105
 
94
106
  # set to None if event_values (nullable) is None
95
107
  # and model_fields_set contains the field
96
108
  if self.event_values is None and "event_values" in self.model_fields_set:
97
- _dict['event_values'] = None
109
+ _dict["event_values"] = None
98
110
 
99
111
  # set to None if item_feature_names (nullable) is None
100
112
  # and model_fields_set contains the field
101
- if self.item_feature_names is None and "item_feature_names" in self.model_fields_set:
102
- _dict['item_feature_names'] = None
113
+ if (
114
+ self.item_feature_names is None
115
+ and "item_feature_names" in self.model_fields_set
116
+ ):
117
+ _dict["item_feature_names"] = None
103
118
 
104
119
  # set to None if user_feature_names (nullable) is None
105
120
  # and model_fields_set contains the field
106
- if self.user_feature_names is None and "user_feature_names" in self.model_fields_set:
107
- _dict['user_feature_names'] = None
121
+ if (
122
+ self.user_feature_names is None
123
+ and "user_feature_names" in self.model_fields_set
124
+ ):
125
+ _dict["user_feature_names"] = None
108
126
 
109
127
  return _dict
110
128
 
@@ -117,15 +135,19 @@ class ShapedInternalRecsysPoliciesUserItemContentSimilarityModelPolicyUserItemCo
117
135
  if not isinstance(obj, dict):
118
136
  return cls.model_validate(obj)
119
137
 
120
- _obj = cls.model_validate({
121
- "policy_type": obj.get("policy_type") if obj.get("policy_type") is not None else 'user-item-content-similarity',
122
- "name": obj.get("name"),
123
- "event_values": obj.get("event_values"),
124
- "pool_fn": obj.get("pool_fn"),
125
- "distance_fn": obj.get("distance_fn"),
126
- "item_feature_names": obj.get("item_feature_names"),
127
- "user_feature_names": obj.get("user_feature_names")
128
- })
138
+ _obj = cls.model_validate(
139
+ {
140
+ "policy_type": (
141
+ obj.get("policy_type")
142
+ if obj.get("policy_type") is not None
143
+ else "user-item-content-similarity"
144
+ ),
145
+ "name": obj.get("name"),
146
+ "event_values": obj.get("event_values"),
147
+ "pool_fn": obj.get("pool_fn"),
148
+ "distance_fn": obj.get("distance_fn"),
149
+ "item_feature_names": obj.get("item_feature_names"),
150
+ "user_feature_names": obj.get("user_feature_names"),
151
+ }
152
+ )
129
153
  return _obj
130
-
131
-
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from shaped.autogen.models.n_epochs2 import NEpochs2
23
23
  from shaped.autogen.models.val_split import ValSplit
@@ -33,8 +33,11 @@ class ShapedInternalRecsysPoliciesWidedeepModelPolicyWideDeepModelPolicyConfig(B
33
33
  val_split: Optional[ValSplit] = None
34
34
  n_epochs: Optional[NEpochs2] = None
35
35
  num_workers: Optional[StrictInt] = 0
36
+ normalize_numerical_features: Optional[StrictBool] = Field(default=True, description="Enable NormalizeNumerical transform for entity features.")
37
+ use_derived_timestamp_features: Optional[StrictBool] = Field(default=True, description="Enable TimestampSinCosEncoder and TimestampCountEncoder for entity features.")
38
+ balance_labels: Optional[StrictBool] = Field(default=True, description="Enable BalanceLabel transform for interactions.")
36
39
  additional_properties: Dict[str, Any] = {}
37
- __properties: ClassVar[List[str]] = ["policy_type", "name", "val_split", "n_epochs", "num_workers"]
40
+ __properties: ClassVar[List[str]] = ["policy_type", "name", "val_split", "n_epochs", "num_workers", "normalize_numerical_features", "use_derived_timestamp_features", "balance_labels"]
38
41
 
39
42
  @field_validator('policy_type')
40
43
  def policy_type_validate_enum(cls, value):
@@ -119,7 +122,10 @@ class ShapedInternalRecsysPoliciesWidedeepModelPolicyWideDeepModelPolicyConfig(B
119
122
  "name": obj.get("name"),
120
123
  "val_split": ValSplit.from_dict(obj["val_split"]) if obj.get("val_split") is not None else None,
121
124
  "n_epochs": NEpochs2.from_dict(obj["n_epochs"]) if obj.get("n_epochs") is not None else None,
122
- "num_workers": obj.get("num_workers") if obj.get("num_workers") is not None else 0
125
+ "num_workers": obj.get("num_workers") if obj.get("num_workers") is not None else 0,
126
+ "normalize_numerical_features": obj.get("normalize_numerical_features") if obj.get("normalize_numerical_features") is not None else True,
127
+ "use_derived_timestamp_features": obj.get("use_derived_timestamp_features") if obj.get("use_derived_timestamp_features") is not None else True,
128
+ "balance_labels": obj.get("balance_labels") if obj.get("balance_labels") is not None else True
123
129
  })
124
130
  # store additional fields in additional_properties
125
131
  for _key in obj.keys():
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -22,7 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional
22
22
  from shaped.autogen.models.learning_rate3 import LearningRate3
23
23
  from shaped.autogen.models.max_depth import MaxDepth
24
24
  from shaped.autogen.models.max_leaves import MaxLeaves
25
- from shaped.autogen.models.mode2 import Mode2
25
+ from shaped.autogen.models.mode1 import Mode1
26
26
  from shaped.autogen.models.n_estimators import NEstimators
27
27
  from typing import Optional, Set
28
28
  from typing_extensions import Self
@@ -34,7 +34,7 @@ class ShapedInternalRecsysPoliciesXgboostModelPolicyXGBoostModelPolicyConfig(Bas
34
34
  policy_type: Optional[StrictStr] = 'xgboost'
35
35
  name: Optional[StrictStr] = None
36
36
  event_values: Optional[List[StrictStr]] = None
37
- mode: Optional[Mode2] = None
37
+ mode: Optional[Mode1] = None
38
38
  n_estimators: Optional[NEstimators] = None
39
39
  max_depth: Optional[MaxDepth] = None
40
40
  max_leaves: Optional[MaxLeaves] = None
@@ -43,7 +43,10 @@ class ShapedInternalRecsysPoliciesXgboostModelPolicyXGBoostModelPolicyConfig(Bas
43
43
  min_child_weight: Optional[StrictInt] = Field(default=1, description="Minimum sum of instance weight needed in a child node.")
44
44
  use_user_ids_as_features: Optional[StrictBool] = True
45
45
  use_item_ids_as_features: Optional[StrictBool] = True
46
- __properties: ClassVar[List[str]] = ["policy_type", "name", "event_values", "mode", "n_estimators", "max_depth", "max_leaves", "n_jobs", "learning_rate", "min_child_weight", "use_user_ids_as_features", "use_item_ids_as_features"]
46
+ normalize_numerical_features: Optional[StrictBool] = Field(default=True, description="Enable NormalizeNumerical transform for entity features.")
47
+ use_derived_timestamp_features: Optional[StrictBool] = Field(default=True, description="Enable TimestampSinCosEncoder and TimestampCountEncoder for entity features.")
48
+ balance_labels: Optional[StrictBool] = Field(default=True, description="Enable BalanceLabel transform for interactions.")
49
+ __properties: ClassVar[List[str]] = ["policy_type", "name", "event_values", "mode", "n_estimators", "max_depth", "max_leaves", "n_jobs", "learning_rate", "min_child_weight", "use_user_ids_as_features", "use_item_ids_as_features", "normalize_numerical_features", "use_derived_timestamp_features", "balance_labels"]
47
50
 
48
51
  @field_validator('policy_type')
49
52
  def policy_type_validate_enum(cls, value):
@@ -134,7 +137,7 @@ class ShapedInternalRecsysPoliciesXgboostModelPolicyXGBoostModelPolicyConfig(Bas
134
137
  "policy_type": obj.get("policy_type") if obj.get("policy_type") is not None else 'xgboost',
135
138
  "name": obj.get("name"),
136
139
  "event_values": obj.get("event_values"),
137
- "mode": Mode2.from_dict(obj["mode"]) if obj.get("mode") is not None else None,
140
+ "mode": Mode1.from_dict(obj["mode"]) if obj.get("mode") is not None else None,
138
141
  "n_estimators": NEstimators.from_dict(obj["n_estimators"]) if obj.get("n_estimators") is not None else None,
139
142
  "max_depth": MaxDepth.from_dict(obj["max_depth"]) if obj.get("max_depth") is not None else None,
140
143
  "max_leaves": MaxLeaves.from_dict(obj["max_leaves"]) if obj.get("max_leaves") is not None else None,
@@ -142,7 +145,10 @@ class ShapedInternalRecsysPoliciesXgboostModelPolicyXGBoostModelPolicyConfig(Bas
142
145
  "learning_rate": LearningRate3.from_dict(obj["learning_rate"]) if obj.get("learning_rate") is not None else None,
143
146
  "min_child_weight": obj.get("min_child_weight") if obj.get("min_child_weight") is not None else 1,
144
147
  "use_user_ids_as_features": obj.get("use_user_ids_as_features") if obj.get("use_user_ids_as_features") is not None else True,
145
- "use_item_ids_as_features": obj.get("use_item_ids_as_features") if obj.get("use_item_ids_as_features") is not None else True
148
+ "use_item_ids_as_features": obj.get("use_item_ids_as_features") if obj.get("use_item_ids_as_features") is not None else True,
149
+ "normalize_numerical_features": obj.get("normalize_numerical_features") if obj.get("normalize_numerical_features") is not None else True,
150
+ "use_derived_timestamp_features": obj.get("use_derived_timestamp_features") if obj.get("use_derived_timestamp_features") is not None else True,
151
+ "balance_labels": obj.get("balance_labels") if obj.get("balance_labels") is not None else True
146
152
  })
147
153
  return _obj
148
154
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from shaped.autogen.models.query_encoder import QueryEncoder
23
23
  from typing import Optional, Set
@@ -33,7 +33,8 @@ class SimilarityRetrieveStep(BaseModel):
33
33
  limit: Optional[StrictInt] = Field(default=100, description="Maximum number of candidates to retrieve.")
34
34
  name: Optional[StrictStr] = None
35
35
  type: Optional[StrictStr] = Field(default='similarity', description="Retrieve step type discriminator.")
36
- __properties: ClassVar[List[str]] = ["embedding_ref", "query_encoder", "where", "limit", "name", "type"]
36
+ use_exact_search: Optional[StrictBool] = Field(default=False, description="If True, forces brute-force search, bypassing any index. This can improve recall but is slower.")
37
+ __properties: ClassVar[List[str]] = ["embedding_ref", "query_encoder", "where", "limit", "name", "type", "use_exact_search"]
37
38
 
38
39
  @field_validator('type')
39
40
  def type_validate_enum(cls, value):
@@ -114,7 +115,8 @@ class SimilarityRetrieveStep(BaseModel):
114
115
  "where": obj.get("where"),
115
116
  "limit": obj.get("limit") if obj.get("limit") is not None else 100,
116
117
  "name": obj.get("name"),
117
- "type": obj.get("type") if obj.get("type") is not None else 'similarity'
118
+ "type": obj.get("type") if obj.get("type") is not None else 'similarity',
119
+ "use_exact_search": obj.get("use_exact_search") if obj.get("use_exact_search") is not None else False
118
120
  })
119
121
  return _obj
120
122
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Welcome to Shaped's API reference docs. These provide a detailed view of the endpoints and CLI commands that Shaped provides and brief explanations of how they should be used. The Shaped API has four main endpoints: **Tables** - Provision and manage batch and real-time data connectors. **Views** - Configure SQL transformations and AI enrichment on your input data. Use SQL to combine multiple data sources or use an LLM to add new categories, extract specific attributes from descriptions, etc. **Engines** - Deploy and manage your relevance engines. The Engine API exposes configuration for indexing logic, input datasets, externam embeddings, and more. **Query** - Execute queries against your engines, to return data based on an input query or rerank an existing list. The Query API exposes the retrieve, filter, score, and ranking steps of the 4-stage ranking architecture. The base URL for each endpoint is: `https://api.shaped.ai/v2`
7
7
 
8
- The version of the OpenAPI document: 2.0.0
8
+ The version of the OpenAPI document: 2.0.4
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.