shaped 2.0.1__tar.gz → 2.0.2__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.
Files changed (338) hide show
  1. {shaped-2.0.1 → shaped-2.0.2}/PKG-INFO +140 -5
  2. shaped-2.0.2/README.md +361 -0
  3. shaped-2.0.2/python/shaped/__init__.py +54 -0
  4. shaped-2.0.2/python/shaped/autogen/__init__.py +562 -0
  5. shaped-2.0.2/python/shaped/autogen/api/__init__.py +8 -0
  6. shaped-2.0.2/python/shaped/autogen/api/engine_api.py +1467 -0
  7. shaped-2.0.1/python/shaped/autogen/api/dataset_api.py → shaped-2.0.2/python/shaped/autogen/api/query_api.py +219 -194
  8. shaped-2.0.2/python/shaped/autogen/api/table_api.py +1494 -0
  9. shaped-2.0.1/python/shaped/autogen/api/model_management_api.py → shaped-2.0.2/python/shaped/autogen/api/view_api.py +179 -181
  10. {shaped-2.0.1 → shaped-2.0.2}/python/shaped/autogen/api_client.py +15 -8
  11. {shaped-2.0.1 → shaped-2.0.2}/python/shaped/autogen/configuration.py +20 -9
  12. {shaped-2.0.1 → shaped-2.0.2}/python/shaped/autogen/exceptions.py +19 -2
  13. shaped-2.0.2/python/shaped/autogen/models/__init__.py +270 -0
  14. shaped-2.0.2/python/shaped/autogen/models/ai_enrichment_view_config.py +123 -0
  15. shaped-2.0.1/python/shaped/autogen/models/path.py → shaped-2.0.2/python/shaped/autogen/models/algorithm.py +19 -19
  16. shaped-2.0.2/python/shaped/autogen/models/amplitude_table_config.py +106 -0
  17. shaped-2.0.2/python/shaped/autogen/models/ascending.py +136 -0
  18. shaped-2.0.2/python/shaped/autogen/models/attn_dropout_prob.py +136 -0
  19. shaped-2.0.2/python/shaped/autogen/models/attribute_journey.py +124 -0
  20. shaped-2.0.2/python/shaped/autogen/models/attribute_value.py +178 -0
  21. shaped-2.0.2/python/shaped/autogen/models/autoscaling_config.py +95 -0
  22. shaped-2.0.2/python/shaped/autogen/models/aws_pinpoint_table_config.py +108 -0
  23. shaped-2.0.2/python/shaped/autogen/models/batch_size.py +136 -0
  24. shaped-2.0.2/python/shaped/autogen/models/batch_size1.py +136 -0
  25. shaped-2.0.2/python/shaped/autogen/models/batch_size2.py +136 -0
  26. shaped-2.0.2/python/shaped/autogen/models/big_query_table_config.py +147 -0
  27. shaped-2.0.2/python/shaped/autogen/models/bm25.py +136 -0
  28. shaped-2.0.2/python/shaped/autogen/models/boosted_reorder_step.py +125 -0
  29. shaped-2.0.2/python/shaped/autogen/models/canary_rollout.py +99 -0
  30. shaped-2.0.2/python/shaped/autogen/models/candidate_attributes_retrieve_step.py +126 -0
  31. shaped-2.0.2/python/shaped/autogen/models/candidate_ids_retrieve_step.py +113 -0
  32. shaped-2.0.2/python/shaped/autogen/models/candidate_retrieval_strategy.py +41 -0
  33. shaped-2.0.2/python/shaped/autogen/models/clickhouse_table_config.py +146 -0
  34. shaped-2.0.2/python/shaped/autogen/models/column_order_retrieve_step.py +123 -0
  35. shaped-2.0.2/python/shaped/autogen/models/column_ordering.py +91 -0
  36. shaped-2.0.2/python/shaped/autogen/models/create_table_response.py +87 -0
  37. shaped-2.0.2/python/shaped/autogen/models/create_view_response.py +87 -0
  38. shaped-2.0.2/python/shaped/autogen/models/custom_table_config.py +135 -0
  39. shaped-2.0.2/python/shaped/autogen/models/data_compute_config.py +89 -0
  40. shaped-2.0.2/python/shaped/autogen/models/data_config.py +145 -0
  41. shaped-2.0.2/python/shaped/autogen/models/data_config_interaction_table.py +146 -0
  42. shaped-2.0.2/python/shaped/autogen/models/data_split_config.py +88 -0
  43. shaped-2.0.2/python/shaped/autogen/models/data_split_strategy.py +37 -0
  44. shaped-2.0.2/python/shaped/autogen/models/data_tier.py +37 -0
  45. shaped-2.0.2/python/shaped/autogen/models/default.py +246 -0
  46. shaped-2.0.2/python/shaped/autogen/models/delete_engine_response.py +87 -0
  47. shaped-2.0.2/python/shaped/autogen/models/delete_table_response.py +87 -0
  48. shaped-2.0.2/python/shaped/autogen/models/delete_view_response.py +87 -0
  49. shaped-2.0.2/python/shaped/autogen/models/deployment_config.py +123 -0
  50. shaped-2.0.2/python/shaped/autogen/models/distance_function.py +38 -0
  51. shaped-2.0.2/python/shaped/autogen/models/diversity_reorder_step.py +137 -0
  52. shaped-2.0.2/python/shaped/autogen/models/dropout_rate.py +136 -0
  53. shaped-2.0.2/python/shaped/autogen/models/dynamo_db_table_config.py +160 -0
  54. shaped-2.0.2/python/shaped/autogen/models/dynamo_db_table_config_scan_kwargs_value.py +138 -0
  55. shaped-2.0.2/python/shaped/autogen/models/embedder_batch_size.py +136 -0
  56. shaped-2.0.2/python/shaped/autogen/models/embedding_config.py +93 -0
  57. shaped-2.0.2/python/shaped/autogen/models/embedding_dim.py +136 -0
  58. shaped-2.0.2/python/shaped/autogen/models/embedding_dims.py +136 -0
  59. shaped-2.0.2/python/shaped/autogen/models/embedding_size.py +136 -0
  60. shaped-2.0.2/python/shaped/autogen/models/encoder.py +140 -0
  61. shaped-2.0.2/python/shaped/autogen/models/encoding_pooling_strategy.py +38 -0
  62. shaped-2.0.2/python/shaped/autogen/models/engine.py +109 -0
  63. shaped-2.0.2/python/shaped/autogen/models/engine_config_v2.py +152 -0
  64. shaped-2.0.2/python/shaped/autogen/models/engine_details_response.py +120 -0
  65. shaped-2.0.2/python/shaped/autogen/models/engine_schema.py +113 -0
  66. shaped-2.0.2/python/shaped/autogen/models/engine_schema_user_inner.py +134 -0
  67. shaped-2.0.2/python/shaped/autogen/models/entity_config.py +109 -0
  68. shaped-2.0.2/python/shaped/autogen/models/entity_journey.py +152 -0
  69. shaped-2.0.2/python/shaped/autogen/models/entity_type.py +38 -0
  70. shaped-2.0.2/python/shaped/autogen/models/evaluation_config.py +92 -0
  71. shaped-2.0.2/python/shaped/autogen/models/exploration_reorder_step.py +125 -0
  72. shaped-2.0.2/python/shaped/autogen/models/expression_filter_step.py +106 -0
  73. shaped-2.0.2/python/shaped/autogen/models/factors.py +136 -0
  74. shaped-2.0.2/python/shaped/autogen/models/factors1.py +136 -0
  75. shaped-2.0.2/python/shaped/autogen/models/feature.py +90 -0
  76. shaped-2.0.2/python/shaped/autogen/models/feature_type.py +60 -0
  77. shaped-2.0.2/python/shaped/autogen/models/file_table_config.py +112 -0
  78. shaped-2.0.2/python/shaped/autogen/models/filter_config.py +99 -0
  79. shaped-2.0.2/python/shaped/autogen/models/filter_dataset.py +140 -0
  80. shaped-2.0.2/python/shaped/autogen/models/filter_index_type.py +36 -0
  81. shaped-2.0.2/python/shaped/autogen/models/filter_retrieve_step.py +113 -0
  82. shaped-2.0.2/python/shaped/autogen/models/global_filter.py +102 -0
  83. shaped-2.0.2/python/shaped/autogen/models/hidden_dropout_prob.py +136 -0
  84. shaped-2.0.2/python/shaped/autogen/models/hidden_size.py +136 -0
  85. shaped-2.0.2/python/shaped/autogen/models/hidden_size1.py +136 -0
  86. shaped-2.0.2/python/shaped/autogen/models/http_problem_response.py +115 -0
  87. {shaped-2.0.1 → shaped-2.0.2}/python/shaped/autogen/models/http_validation_error.py +2 -2
  88. shaped-2.0.2/python/shaped/autogen/models/hugging_face_encoder.py +113 -0
  89. shaped-2.0.2/python/shaped/autogen/models/iceberg_table_config.py +154 -0
  90. shaped-2.0.2/python/shaped/autogen/models/index_config.py +101 -0
  91. shaped-2.0.2/python/shaped/autogen/models/inner_size.py +136 -0
  92. shaped-2.0.2/python/shaped/autogen/models/inner_size1.py +136 -0
  93. shaped-2.0.2/python/shaped/autogen/models/interaction_config.py +122 -0
  94. shaped-2.0.2/python/shaped/autogen/models/interaction_pooling_encoder.py +104 -0
  95. shaped-2.0.2/python/shaped/autogen/models/interaction_round_robin_encoder.py +104 -0
  96. shaped-2.0.2/python/shaped/autogen/models/item_attribute_pooling_encoder.py +124 -0
  97. shaped-2.0.2/python/shaped/autogen/models/journey.py +140 -0
  98. shaped-2.0.2/python/shaped/autogen/models/kafka_table_config.py +129 -0
  99. shaped-2.0.2/python/shaped/autogen/models/kinesis_table_config.py +140 -0
  100. shaped-2.0.2/python/shaped/autogen/models/kinesis_table_config_column_schema_value.py +136 -0
  101. shaped-2.0.2/python/shaped/autogen/models/label.py +90 -0
  102. shaped-2.0.2/python/shaped/autogen/models/label_type.py +37 -0
  103. shaped-2.0.2/python/shaped/autogen/models/laplace_smoothing.py +136 -0
  104. shaped-2.0.2/python/shaped/autogen/models/latency_scaling_policy.py +112 -0
  105. shaped-2.0.2/python/shaped/autogen/models/learning_rate.py +136 -0
  106. shaped-2.0.2/python/shaped/autogen/models/learning_rate1.py +136 -0
  107. shaped-2.0.2/python/shaped/autogen/models/learning_rate2.py +136 -0
  108. shaped-2.0.2/python/shaped/autogen/models/learning_rate3.py +136 -0
  109. shaped-2.0.2/python/shaped/autogen/models/lexical_search_mode.py +99 -0
  110. shaped-2.0.2/python/shaped/autogen/models/list_engines_response.py +95 -0
  111. shaped-2.0.2/python/shaped/autogen/models/list_tables_response.py +95 -0
  112. shaped-2.0.2/python/shaped/autogen/models/list_views_response.py +95 -0
  113. shaped-2.0.2/python/shaped/autogen/models/loss_types.py +37 -0
  114. shaped-2.0.2/python/shaped/autogen/models/lr.py +136 -0
  115. shaped-2.0.2/python/shaped/autogen/models/lr1.py +136 -0
  116. shaped-2.0.2/python/shaped/autogen/models/lr2.py +136 -0
  117. shaped-2.0.2/python/shaped/autogen/models/max_depth.py +136 -0
  118. shaped-2.0.2/python/shaped/autogen/models/max_leaves.py +136 -0
  119. shaped-2.0.2/python/shaped/autogen/models/max_seq_length.py +136 -0
  120. shaped-2.0.2/python/shaped/autogen/models/max_seq_length1.py +136 -0
  121. shaped-2.0.2/python/shaped/autogen/models/max_seq_length2.py +136 -0
  122. shaped-2.0.2/python/shaped/autogen/models/mode.py +134 -0
  123. shaped-2.0.2/python/shaped/autogen/models/mode1.py +134 -0
  124. shaped-2.0.2/python/shaped/autogen/models/mode2.py +136 -0
  125. shaped-2.0.2/python/shaped/autogen/models/mongo_db_table_config.py +147 -0
  126. shaped-2.0.2/python/shaped/autogen/models/mssql_table_config.py +155 -0
  127. shaped-2.0.1/python/shaped/autogen/models/my_sql_dataset_config.py → shaped-2.0.2/python/shaped/autogen/models/my_sql_table_config.py +45 -28
  128. shaped-2.0.2/python/shaped/autogen/models/n_epochs.py +136 -0
  129. shaped-2.0.2/python/shaped/autogen/models/n_epochs1.py +136 -0
  130. shaped-2.0.2/python/shaped/autogen/models/n_epochs2.py +136 -0
  131. shaped-2.0.2/python/shaped/autogen/models/n_estimators.py +136 -0
  132. shaped-2.0.2/python/shaped/autogen/models/n_heads.py +136 -0
  133. shaped-2.0.2/python/shaped/autogen/models/n_layers.py +136 -0
  134. shaped-2.0.2/python/shaped/autogen/models/neg_per_positive.py +136 -0
  135. shaped-2.0.2/python/shaped/autogen/models/negative_samples_count.py +136 -0
  136. shaped-2.0.2/python/shaped/autogen/models/ngram_tokenizer.py +103 -0
  137. shaped-2.0.2/python/shaped/autogen/models/no_op_config.py +117 -0
  138. shaped-2.0.2/python/shaped/autogen/models/num_blocks.py +136 -0
  139. shaped-2.0.2/python/shaped/autogen/models/num_heads.py +136 -0
  140. shaped-2.0.2/python/shaped/autogen/models/num_leaves.py +136 -0
  141. shaped-2.0.2/python/shaped/autogen/models/objective.py +40 -0
  142. shaped-2.0.2/python/shaped/autogen/models/objective1.py +134 -0
  143. shaped-2.0.2/python/shaped/autogen/models/online_store_config.py +89 -0
  144. shaped-2.0.2/python/shaped/autogen/models/pagination_config.py +87 -0
  145. shaped-2.0.2/python/shaped/autogen/models/parameter_definition.py +96 -0
  146. shaped-2.0.2/python/shaped/autogen/models/parameters_value.py +240 -0
  147. shaped-2.0.2/python/shaped/autogen/models/passthrough_score.py +104 -0
  148. shaped-2.0.2/python/shaped/autogen/models/personal_filter.py +104 -0
  149. shaped-2.0.2/python/shaped/autogen/models/pipeline_stage_explanation.py +118 -0
  150. shaped-2.0.2/python/shaped/autogen/models/policy.py +134 -0
  151. shaped-2.0.2/python/shaped/autogen/models/pool_fn.py +134 -0
  152. shaped-2.0.2/python/shaped/autogen/models/pooling_function.py +37 -0
  153. shaped-2.0.1/python/shaped/autogen/models/postgres_dataset_config.py → shaped-2.0.2/python/shaped/autogen/models/postgres_table_config.py +66 -28
  154. shaped-2.0.2/python/shaped/autogen/models/posthog_table_config.py +133 -0
  155. shaped-2.0.2/python/shaped/autogen/models/prebuilt_filter_step.py +113 -0
  156. shaped-2.0.2/python/shaped/autogen/models/precomputed_item_embedding.py +99 -0
  157. shaped-2.0.2/python/shaped/autogen/models/precomputed_user_embedding.py +99 -0
  158. shaped-2.0.2/python/shaped/autogen/models/query.py +136 -0
  159. shaped-2.0.2/python/shaped/autogen/models/query1.py +136 -0
  160. shaped-2.0.2/python/shaped/autogen/models/query_any_of.py +140 -0
  161. shaped-2.0.2/python/shaped/autogen/models/query_definition.py +106 -0
  162. shaped-2.0.2/python/shaped/autogen/models/query_encoder.py +194 -0
  163. shaped-2.0.2/python/shaped/autogen/models/query_explanation.py +197 -0
  164. shaped-2.0.2/python/shaped/autogen/models/query_request.py +121 -0
  165. shaped-2.0.2/python/shaped/autogen/models/query_result.py +113 -0
  166. shaped-2.0.2/python/shaped/autogen/models/query_table_config.py +99 -0
  167. shaped-2.0.2/python/shaped/autogen/models/rank_item_attribute_values_query_config.py +122 -0
  168. shaped-2.0.2/python/shaped/autogen/models/rank_query_config.py +167 -0
  169. shaped-2.0.2/python/shaped/autogen/models/rank_query_config_filter_inner.py +149 -0
  170. shaped-2.0.2/python/shaped/autogen/models/rank_query_config_reorder_inner.py +149 -0
  171. shaped-2.0.2/python/shaped/autogen/models/rank_query_config_retrieve_inner.py +196 -0
  172. shaped-2.0.2/python/shaped/autogen/models/recreate_rollout.py +97 -0
  173. shaped-2.0.1/python/shaped/autogen/models/redshift_dataset_config.py → shaped-2.0.2/python/shaped/autogen/models/redshift_table_config.py +48 -25
  174. shaped-2.0.2/python/shaped/autogen/models/reference_table_config.py +113 -0
  175. shaped-2.0.2/python/shaped/autogen/models/regularization.py +136 -0
  176. shaped-2.0.2/python/shaped/autogen/models/request.py +378 -0
  177. shaped-2.0.2/python/shaped/autogen/models/request1.py +140 -0
  178. shaped-2.0.2/python/shaped/autogen/models/requests_per_second_scaling_policy.py +112 -0
  179. shaped-2.0.2/python/shaped/autogen/models/response_get_view_details_views_view_name_get.py +134 -0
  180. shaped-2.0.2/python/shaped/autogen/models/result.py +145 -0
  181. shaped-2.0.2/python/shaped/autogen/models/result_embeddings_value.py +127 -0
  182. shaped-2.0.2/python/shaped/autogen/models/retriever.py +196 -0
  183. shaped-2.0.2/python/shaped/autogen/models/retriever1.py +196 -0
  184. shaped-2.0.2/python/shaped/autogen/models/rollout_config.py +91 -0
  185. shaped-2.0.2/python/shaped/autogen/models/rudderstack_table_config.py +106 -0
  186. shaped-2.0.2/python/shaped/autogen/models/sampling_strategy.py +36 -0
  187. shaped-2.0.2/python/shaped/autogen/models/saved_query_info_response.py +89 -0
  188. shaped-2.0.2/python/shaped/autogen/models/saved_query_list_response.py +87 -0
  189. shaped-2.0.2/python/shaped/autogen/models/saved_query_request.py +115 -0
  190. shaped-2.0.2/python/shaped/autogen/models/schema_config.py +117 -0
  191. shaped-2.0.2/python/shaped/autogen/models/score.py +134 -0
  192. shaped-2.0.2/python/shaped/autogen/models/score_ensemble.py +140 -0
  193. shaped-2.0.2/python/shaped/autogen/models/score_ensemble_policy_config.py +141 -0
  194. shaped-2.0.2/python/shaped/autogen/models/score_ensemble_policy_config_policies_inner.py +422 -0
  195. shaped-2.0.2/python/shaped/autogen/models/search_config.py +105 -0
  196. shaped-2.0.2/python/shaped/autogen/models/segment_table_config.py +106 -0
  197. shaped-2.0.2/python/shaped/autogen/models/sequence_length.py +136 -0
  198. shaped-2.0.2/python/shaped/autogen/models/server_config.py +87 -0
  199. shaped-2.0.2/python/shaped/autogen/models/setup_engine_response.py +87 -0
  200. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_als_model_policy_als_model_policy_config.py +148 -0
  201. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_beeformer_model_policy_beeformer_model_policy_beeformer_model_policy_config.py +154 -0
  202. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_bert_model_policy_bert_model_policy_bert_model_policy_config.py +209 -0
  203. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_chronological_model_policy_chronological_model_policy_config.py +137 -0
  204. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_elsa_model_policy_elsa_model_policy_elsa_model_policy_config.py +139 -0
  205. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_gsasrec_model_policy_gsasrec_model_policy_gsas_rec_model_policy_config.py +205 -0
  206. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_item2vec_model_policy_item2_vec_model_policy_config.py +140 -0
  207. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_item_content_similarity_model_policy_item_content_similarity_model_policy_config.py +152 -0
  208. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_lightgbm_model_policy_lightgbm_model_policy_light_gbm_model_policy_config.py +239 -0
  209. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_ngram_model_policy_ngram_model_policy_config.py +119 -0
  210. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_popular_model_policy_popular_model_policy_config.py +137 -0
  211. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_random_model_policy_random_model_policy_config.py +104 -0
  212. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_recently_popular_policy_recently_popular_policy_config.py +130 -0
  213. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_rising_popular_policy_rising_popular_policy_config.py +123 -0
  214. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_sasrec_model_policy_sasrec_model_policy_sas_rec_model_policy_config.py +224 -0
  215. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_svd_model_policy_svd_model_policy_config.py +119 -0
  216. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_two_tower_model_policy_two_tower_model_policy_two_tower_model_policy_config.py +159 -0
  217. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_user_item_content_similarity_model_policy_user_item_content_similarity_model_policy_config.py +131 -0
  218. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_widedeep_model_policy_wide_deep_model_policy_config.py +131 -0
  219. shaped-2.0.2/python/shaped/autogen/models/shaped_internal_recsys_policies_xgboost_model_policy_xg_boost_model_policy_config.py +149 -0
  220. shaped-2.0.2/python/shaped/autogen/models/shopify_table_config.py +156 -0
  221. shaped-2.0.2/python/shaped/autogen/models/similarity_retrieve_step.py +121 -0
  222. shaped-2.0.1/python/shaped/autogen/models/snowflake_dataset_config.py → shaped-2.0.2/python/shaped/autogen/models/snowflake_table_config.py +47 -18
  223. shaped-2.0.2/python/shaped/autogen/models/sql_transform_type.py +37 -0
  224. shaped-2.0.2/python/shaped/autogen/models/sql_view_config.py +111 -0
  225. shaped-2.0.2/python/shaped/autogen/models/stemmer_tokenizer.py +105 -0
  226. shaped-2.0.2/python/shaped/autogen/models/step_explanation.py +137 -0
  227. shaped-2.0.2/python/shaped/autogen/models/strategy.py +134 -0
  228. shaped-2.0.2/python/shaped/autogen/models/table.py +102 -0
  229. shaped-2.0.2/python/shaped/autogen/models/table_deployment_type.py +38 -0
  230. shaped-2.0.2/python/shaped/autogen/models/table_insert_arguments.py +87 -0
  231. shaped-2.0.2/python/shaped/autogen/models/table_insert_response.py +87 -0
  232. shaped-2.0.2/python/shaped/autogen/models/text_encoding.py +136 -0
  233. shaped-2.0.2/python/shaped/autogen/models/text_search_retrieve_step.py +121 -0
  234. shaped-2.0.2/python/shaped/autogen/models/time_frequency.py +136 -0
  235. shaped-2.0.2/python/shaped/autogen/models/time_window.py +136 -0
  236. shaped-2.0.2/python/shaped/autogen/models/time_window_in_days.py +142 -0
  237. shaped-2.0.2/python/shaped/autogen/models/tokenizer.py +149 -0
  238. shaped-2.0.2/python/shaped/autogen/models/trained_model_encoder.py +99 -0
  239. shaped-2.0.2/python/shaped/autogen/models/training_compute_config.py +99 -0
  240. shaped-2.0.2/python/shaped/autogen/models/training_config.py +121 -0
  241. shaped-2.0.2/python/shaped/autogen/models/training_config_models_inner.py +308 -0
  242. shaped-2.0.2/python/shaped/autogen/models/training_strategy.py +37 -0
  243. shaped-2.0.2/python/shaped/autogen/models/trending_mode.py +37 -0
  244. shaped-2.0.2/python/shaped/autogen/models/truncate_filter_step.py +106 -0
  245. shaped-2.0.2/python/shaped/autogen/models/tunable_bool.py +97 -0
  246. shaped-2.0.2/python/shaped/autogen/models/tunable_float.py +118 -0
  247. shaped-2.0.2/python/shaped/autogen/models/tunable_int.py +118 -0
  248. shaped-2.0.2/python/shaped/autogen/models/tunable_int_categorical.py +99 -0
  249. shaped-2.0.2/python/shaped/autogen/models/tunable_string.py +99 -0
  250. shaped-2.0.2/python/shaped/autogen/models/tuning_config.py +89 -0
  251. shaped-2.0.2/python/shaped/autogen/models/type.py +134 -0
  252. shaped-2.0.2/python/shaped/autogen/models/update_table_response.py +87 -0
  253. shaped-2.0.2/python/shaped/autogen/models/update_view_response.py +87 -0
  254. shaped-2.0.2/python/shaped/autogen/models/user_attribute_pooling_encoder.py +124 -0
  255. shaped-2.0.2/python/shaped/autogen/models/val_split.py +136 -0
  256. {shaped-2.0.1 → shaped-2.0.2}/python/shaped/autogen/models/validation_error.py +13 -3
  257. shaped-2.0.2/python/shaped/autogen/models/validation_error_loc_inner.py +138 -0
  258. shaped-2.0.2/python/shaped/autogen/models/value_type.py +50 -0
  259. shaped-2.0.2/python/shaped/autogen/models/vector_search_mode.py +99 -0
  260. shaped-2.0.2/python/shaped/autogen/models/view.py +104 -0
  261. shaped-2.0.2/python/shaped/autogen/models/view_details_ai.py +140 -0
  262. shaped-2.0.2/python/shaped/autogen/models/view_details_ai_schema_value.py +153 -0
  263. shaped-2.0.2/python/shaped/autogen/models/view_details_sql.py +140 -0
  264. shaped-2.0.2/python/shaped/autogen/models/view_status.py +41 -0
  265. shaped-2.0.2/python/shaped/autogen/models/weight_decay.py +136 -0
  266. shaped-2.0.2/python/shaped/autogen/models/whitespace_tokenizer.py +97 -0
  267. shaped-2.0.2/python/shaped/autogen/models/window_size.py +136 -0
  268. {shaped-2.0.1 → shaped-2.0.2}/python/shaped/autogen/rest.py +8 -2
  269. {shaped-2.0.1 → shaped-2.0.2}/python/shaped/cli/shaped_cli.py +12 -7
  270. shaped-2.0.2/python/shaped/client.py +624 -0
  271. shaped-2.0.2/python/shaped/config_builders.py +695 -0
  272. shaped-2.0.2/python/shaped/query_builder.py +774 -0
  273. {shaped-2.0.1 → shaped-2.0.2}/python/shaped.egg-info/PKG-INFO +140 -5
  274. shaped-2.0.2/python/shaped.egg-info/SOURCES.txt +282 -0
  275. shaped-2.0.2/python/shaped.egg-info/entry_points.txt +2 -0
  276. {shaped-2.0.1 → shaped-2.0.2}/python/shaped.egg-info/requires.txt +5 -3
  277. {shaped-2.0.1 → shaped-2.0.2}/setup.py +7 -5
  278. shaped-2.0.1/README.md +0 -228
  279. shaped-2.0.1/python/shaped/__init__.py +0 -4
  280. shaped-2.0.1/python/shaped/autogen/__init__.py +0 -87
  281. shaped-2.0.1/python/shaped/autogen/api/__init__.py +0 -7
  282. shaped-2.0.1/python/shaped/autogen/api/model_inference_api.py +0 -2825
  283. shaped-2.0.1/python/shaped/autogen/models/__init__.py +0 -68
  284. shaped-2.0.1/python/shaped/autogen/models/amplitude_dataset_config.py +0 -96
  285. shaped-2.0.1/python/shaped/autogen/models/aws_pinpoint_dataset_config.py +0 -96
  286. shaped-2.0.1/python/shaped/autogen/models/big_query_dataset_config.py +0 -114
  287. shaped-2.0.1/python/shaped/autogen/models/complement_items_request.py +0 -99
  288. shaped-2.0.1/python/shaped/autogen/models/complement_items_response.py +0 -89
  289. shaped-2.0.1/python/shaped/autogen/models/connectors_inner.py +0 -134
  290. shaped-2.0.1/python/shaped/autogen/models/create_dataset_arguments.py +0 -263
  291. shaped-2.0.1/python/shaped/autogen/models/create_embedding_response.py +0 -87
  292. shaped-2.0.1/python/shaped/autogen/models/create_item_embedding_request.py +0 -89
  293. shaped-2.0.1/python/shaped/autogen/models/create_model_arguments.py +0 -107
  294. shaped-2.0.1/python/shaped/autogen/models/create_model_response.py +0 -87
  295. shaped-2.0.1/python/shaped/autogen/models/create_user_embedding_request.py +0 -89
  296. shaped-2.0.1/python/shaped/autogen/models/custom_dataset_config.py +0 -115
  297. shaped-2.0.1/python/shaped/autogen/models/dataset_config.py +0 -101
  298. shaped-2.0.1/python/shaped/autogen/models/dataset_schema_type.py +0 -47
  299. shaped-2.0.1/python/shaped/autogen/models/datasets_inner.py +0 -91
  300. shaped-2.0.1/python/shaped/autogen/models/delete_model_response.py +0 -87
  301. shaped-2.0.1/python/shaped/autogen/models/fetch_config.py +0 -95
  302. shaped-2.0.1/python/shaped/autogen/models/file_config.py +0 -105
  303. shaped-2.0.1/python/shaped/autogen/models/file_source_config.py +0 -89
  304. shaped-2.0.1/python/shaped/autogen/models/inference_config.py +0 -101
  305. shaped-2.0.1/python/shaped/autogen/models/insert_model_response.py +0 -87
  306. shaped-2.0.1/python/shaped/autogen/models/interaction.py +0 -87
  307. shaped-2.0.1/python/shaped/autogen/models/list_datasets_response.py +0 -95
  308. shaped-2.0.1/python/shaped/autogen/models/list_models_response.py +0 -95
  309. shaped-2.0.1/python/shaped/autogen/models/model_config.py +0 -99
  310. shaped-2.0.1/python/shaped/autogen/models/model_response.py +0 -95
  311. shaped-2.0.1/python/shaped/autogen/models/mongo_db_dataset_config.py +0 -119
  312. shaped-2.0.1/python/shaped/autogen/models/post_rank_request.py +0 -117
  313. shaped-2.0.1/python/shaped/autogen/models/rank_attribute_response.py +0 -89
  314. shaped-2.0.1/python/shaped/autogen/models/rank_grid_attribute_request.py +0 -91
  315. shaped-2.0.1/python/shaped/autogen/models/rank_grid_attribute_request1.py +0 -93
  316. shaped-2.0.1/python/shaped/autogen/models/rank_grid_attribute_response.py +0 -91
  317. shaped-2.0.1/python/shaped/autogen/models/rank_response.py +0 -91
  318. shaped-2.0.1/python/shaped/autogen/models/retrieve_request.py +0 -101
  319. shaped-2.0.1/python/shaped/autogen/models/retrieve_response.py +0 -91
  320. shaped-2.0.1/python/shaped/autogen/models/retriever_top_k_override.py +0 -97
  321. shaped-2.0.1/python/shaped/autogen/models/rudder_stack_dataset_config.py +0 -96
  322. shaped-2.0.1/python/shaped/autogen/models/segment_dataset_config.py +0 -96
  323. shaped-2.0.1/python/shaped/autogen/models/similar_item_request.py +0 -101
  324. shaped-2.0.1/python/shaped/autogen/models/similar_response.py +0 -89
  325. shaped-2.0.1/python/shaped/autogen/models/similar_users_request.py +0 -99
  326. shaped-2.0.1/python/shaped/autogen/models/successful_response.py +0 -87
  327. shaped-2.0.1/python/shaped/autogen/models/value_type.py +0 -48
  328. shaped-2.0.1/python/shaped/autogen/models/view_model_response.py +0 -99
  329. shaped-2.0.1/python/shaped/client.py +0 -211
  330. shaped-2.0.1/python/shaped.egg-info/SOURCES.txt +0 -77
  331. shaped-2.0.1/python/shaped.egg-info/entry_points.txt +0 -2
  332. {shaped-2.0.1 → shaped-2.0.2}/pyproject.toml +0 -0
  333. {shaped-2.0.1 → shaped-2.0.2}/python/shaped/autogen/api_response.py +0 -0
  334. {shaped-2.0.1 → shaped-2.0.2}/python/shaped/cli/__init__.py +0 -0
  335. {shaped-2.0.1 → shaped-2.0.2}/python/shaped.egg-info/dependency_links.txt +0 -0
  336. {shaped-2.0.1 → shaped-2.0.2}/python/shaped.egg-info/top_level.txt +0 -0
  337. {shaped-2.0.1 → shaped-2.0.2}/python/shaped.egg-info/zip-safe +0 -0
  338. {shaped-2.0.1 → shaped-2.0.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shaped
3
- Version: 2.0.1
3
+ Version: 2.0.2
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
@@ -16,17 +16,19 @@ Description-Content-Type: text/markdown
16
16
  Requires-Dist: pyarrow==20.0.0
17
17
  Requires-Dist: pandas==2.3.0
18
18
  Requires-Dist: numpy==1.26.4
19
- Requires-Dist: typer>=0.7.0
19
+ Requires-Dist: typer==0.7.0
20
+ Requires-Dist: click==8.2.1
20
21
  Requires-Dist: requests>=2.28.1
21
22
  Requires-Dist: pydantic>=2.8.2
22
23
  Requires-Dist: pyyaml>=6.0
23
24
  Requires-Dist: tqdm==4.67.1
24
25
  Requires-Dist: s3fs==0.4.2
25
26
  Requires-Dist: fsspec==2023.5.0
26
- Requires-Dist: urllib3<2.1.0,>=1.25.3
27
+ Requires-Dist: urllib3>=2.2.3
28
+ Requires-Dist: h2>=4.0.0
27
29
  Requires-Dist: python-dateutil
28
30
  Requires-Dist: typing-extensions>=4.7.1
29
- Requires-Dist: pytest>=6.2.5
31
+ Requires-Dist: pytest==8.4.1
30
32
  Requires-Dist: pytest-mock==3.14.0
31
33
  Dynamic: author
32
34
  Dynamic: author-email
@@ -258,7 +260,7 @@ shaped view-saved-query --engine-name <ENGINE_NAME> --query-name <QUERY_NAME>
258
260
 
259
261
  ---
260
262
 
261
- # Python SDK
263
+ # Python SDK (V2)
262
264
 
263
265
  ## Installation
264
266
 
@@ -267,3 +269,136 @@ shaped view-saved-query --engine-name <ENGINE_NAME> --query-name <QUERY_NAME>
267
269
  ```sh
268
270
  pip install shaped
269
271
  ```
272
+
273
+ ## V2 Query API with Fluent Builders
274
+
275
+ The V2 SDK provides a fluent query builder API that leverages Shaped's declarative query language:
276
+
277
+ ```python
278
+ from shaped import (
279
+ Client,
280
+ RankQueryBuilder,
281
+ ColumnOrder,
282
+ TextSearch,
283
+ Ensemble,
284
+ Diversity,
285
+ )
286
+
287
+ client = Client(api_key="your-api-key")
288
+
289
+ # Build a query using the fluent builder with step objects
290
+ query = (RankQueryBuilder()
291
+ .from_entity('item')
292
+ .retrieve(
293
+ ColumnOrder(
294
+ [{'name': 'popularity', 'ascending': False}],
295
+ limit=1000
296
+ ),
297
+ TextSearch(
298
+ 'laptop',
299
+ mode={'type': 'vector', 'text_embedding_ref': 'text_emb'}
300
+ )
301
+ )
302
+ .filter(Expression('price < 1000')) filter
303
+ .score(Ensemble('lightgbm', input_user_id='$parameters.userId'))
304
+ .reorder(Diversity(diversity_attributes=['category']))
305
+ .limit(50)
306
+ .columns(['item_id', 'title', 'price'])
307
+ .build())
308
+
309
+ # Execute the query
310
+ result = client.execute_query(
311
+ 'my_engine',
312
+ query,
313
+ parameters={'userId': '123'}
314
+ )
315
+ ```
316
+
317
+ ### Available Step Factory Functions
318
+
319
+ The SDK provides convenient factory functions for creating step objects:
320
+
321
+ **Retrieve Steps:**
322
+ - `ColumnOrder(columns, limit=100, where=None, name=None)` - Sort by columns
323
+ - `TextSearch(input_text_query, mode, limit=100, where=None, name=None)` - Text search
324
+ - `Similarity(embedding_ref, query_encoder, limit=100, where=None, name=None)` - Similarity search
325
+ - `Filter(where=None, limit=100, name=None)` - Filter without ordering
326
+ - `CandidateIds(item_ids, limit=None, name=None)` - Specific item IDs
327
+ - `CandidateAttributes(item_attributes, limit=None, name=None)` - Item attributes
328
+
329
+ **Filter Steps:**
330
+ - `Expression(expression, name=None)` - DuckDB filter expression
331
+ - `Truncate(max_length=500, name=None)` - Truncate results to max_length
332
+ - `Prebuilt(filter_ref, input_user_id=None, name=None)` - Reference to prebuilt filter
333
+
334
+ **Score Configs:**
335
+ - `Ensemble(value_model, input_user_id=None, ...)`
336
+ - `Passthrough(name=None)`
337
+
338
+ **Reorder Steps:**
339
+ - `Diversity(diversity_attributes=None, strength=0.5, ...)`
340
+ - `Boosted(retriever, strength=0.5, name=None)`
341
+ - `Exploration(retriever, strength=0.5, name=None)`
342
+
343
+ ### Execute Saved Query
344
+
345
+ ```python
346
+ result = client.execute_saved_query(
347
+ 'my_engine',
348
+ 'recommendations',
349
+ parameters={'userId': '123', 'limit': 20}
350
+ )
351
+ ```
352
+
353
+ ---
354
+
355
+ # TypeScript/Node.js SDK (V2)
356
+
357
+ ## Installation
358
+
359
+ ### NPM Installation
360
+
361
+ ```sh
362
+ npm install @shaped.ai/client
363
+ ```
364
+
365
+ ## V2 Query API with Fluent Builders
366
+
367
+ The V2 SDK provides a fluent, type-safe query builder API:
368
+
369
+ ```typescript
370
+ import { Client, RankQueryBuilder } from '@shaped.ai/client';
371
+
372
+ const client = new Client({ apiKey: 'your-api-key' });
373
+
374
+ // Build a query using the fluent builder
375
+ const query = new RankQueryBuilder()
376
+ .from('item')
377
+ .retrieve(step => step
378
+ .columnOrder([{name: 'popularity', ascending: false}], {limit: 1000}))
379
+ .retrieve(step => step
380
+ .textSearch('laptop', {type: 'vector', textEmbeddingRef: 'text_emb'}))
381
+ .filter(step => step.expression('price < 1000'))
382
+ .score(step => step.ensemble('lightgbm', {inputUserId: '$parameters.userId'}))
383
+ .reorder(step => step.diversity({attribute: 'category'}))
384
+ .limit(50)
385
+ .columns(['item_id', 'title', 'price'])
386
+ .build();
387
+
388
+ // Execute the query
389
+ const result = await client.executeQuery(
390
+ 'my_engine',
391
+ query,
392
+ {userId: '123'}
393
+ );
394
+ ```
395
+
396
+ ### Execute Saved Query
397
+
398
+ ```typescript
399
+ const result = await client.executeSavedQuery(
400
+ 'my_engine',
401
+ 'recommendations',
402
+ {userId: '123', limit: 20}
403
+ );
404
+ ```
shaped-2.0.2/README.md ADDED
@@ -0,0 +1,361 @@
1
+ # Shaped CLI
2
+
3
+ CLI for interactions with the Shaped API.
4
+
5
+ For full documentation, see [docs.shaped.ai](https://docs.shaped.ai/).
6
+
7
+ ## Installing the Shaped CLI
8
+
9
+ ```
10
+ pip install shaped
11
+ ```
12
+
13
+ ## Initialize
14
+
15
+ ```
16
+ shaped init --api-key <API_KEY> [--env <ENV>]
17
+ ```
18
+
19
+ The `--env` option defaults to `prod` and can be set to other environments like `dev` or `staging`.
20
+
21
+ ## Engine API
22
+
23
+ ### Create Engine
24
+
25
+ ```
26
+ shaped create-engine --file <PATH_TO_FILE>
27
+ ```
28
+
29
+ Or pipe from stdin:
30
+
31
+ ```
32
+ cat <PATH_TO_FILE> | shaped create-engine
33
+ ```
34
+
35
+ ### Update Engine
36
+
37
+ ```
38
+ shaped update-engine --file <PATH_TO_FILE>
39
+ ```
40
+
41
+ Or pipe from stdin:
42
+
43
+ ```
44
+ cat <PATH_TO_FILE> | shaped update-engine
45
+ ```
46
+
47
+ ### List Engines
48
+
49
+ ```
50
+ shaped list-engines
51
+ ```
52
+
53
+ ### View Engine
54
+
55
+ ```
56
+ shaped view-engine --engine-name <ENGINE_NAME>
57
+ ```
58
+
59
+ ### Delete Engine
60
+
61
+ ```
62
+ shaped delete-engine --engine-name <ENGINE_NAME>
63
+ ```
64
+
65
+ ## Table API
66
+
67
+ ### Create Table
68
+
69
+ ```
70
+ shaped create-table --file <PATH_TO_FILE>
71
+ ```
72
+
73
+ Or pipe from stdin:
74
+
75
+ ```
76
+ cat <PATH_TO_FILE> | shaped create-table
77
+ ```
78
+
79
+ ### Create Table from URI
80
+
81
+ Create a table and automatically insert data from a file:
82
+
83
+ ```
84
+ shaped create-table-from-uri --name <TABLE_NAME> --path <PATH_TO_FILE> --type <FILE_TYPE>
85
+ ```
86
+
87
+ Supported file types: `parquet`, `csv`, `tsv`, `json`, `jsonl`
88
+
89
+ ### List Tables
90
+
91
+ ```
92
+ shaped list-tables
93
+ ```
94
+
95
+ ### Table Insert
96
+
97
+ Insert data into an existing table:
98
+
99
+ ```
100
+ shaped table-insert --table-name <TABLE_NAME> --file <DATAFRAME_FILE> --type <FILE_TYPE>
101
+ ```
102
+
103
+ Supported file types: `parquet`, `csv`, `tsv`, `json`, `jsonl`
104
+
105
+ ### View Table
106
+
107
+ ```
108
+ shaped view-table --table-name <TABLE_NAME>
109
+ ```
110
+
111
+ ### Update Table
112
+
113
+ ```
114
+ shaped update-table --file <PATH_TO_FILE>
115
+ ```
116
+
117
+ Or pipe from stdin:
118
+
119
+ ```
120
+ cat <PATH_TO_FILE> | shaped update-table
121
+ ```
122
+
123
+ ### Delete Table
124
+
125
+ ```
126
+ shaped delete-table --table-name <TABLE_NAME>
127
+ ```
128
+
129
+ ## View API
130
+
131
+ ### Create View
132
+
133
+ ```
134
+ shaped create-view --file <PATH_TO_FILE>
135
+ ```
136
+
137
+ Or pipe from stdin:
138
+
139
+ ```
140
+ cat <PATH_TO_FILE> | shaped create-view
141
+ ```
142
+
143
+ ### List Views
144
+
145
+ ```
146
+ shaped list-views
147
+ ```
148
+
149
+ ### View View
150
+
151
+ ```
152
+ shaped view-view --view-name <VIEW_NAME>
153
+ ```
154
+
155
+ ### Update View
156
+
157
+ ```
158
+ shaped update-view --file <PATH_TO_FILE>
159
+ ```
160
+
161
+ Or pipe from stdin:
162
+
163
+ ```
164
+ cat <PATH_TO_FILE> | shaped update-view
165
+ ```
166
+
167
+ ### Delete View
168
+
169
+ ```
170
+ shaped delete-view --view-name <VIEW_NAME>
171
+ ```
172
+
173
+ ## Query API
174
+
175
+ ### Execute Query
176
+
177
+ Execute an ad-hoc query against an engine. The query can be provided in three ways:
178
+
179
+ **From a file:**
180
+ ```
181
+ shaped query --engine-name <ENGINE_NAME> --query-file <PATH_TO_FILE>
182
+ ```
183
+
184
+ **As a JSON string:**
185
+ ```
186
+ shaped query --engine-name <ENGINE_NAME> --query '{"sql": "SELECT * FROM table"}'
187
+ ```
188
+
189
+ **From stdin:**
190
+ ```
191
+ cat <PATH_TO_FILE> | shaped query --engine-name <ENGINE_NAME>
192
+ ```
193
+
194
+ ### Execute Saved Query
195
+
196
+ Execute a previously saved query by name:
197
+
198
+ ```
199
+ shaped execute-saved-query --engine-name <ENGINE_NAME> --query-name <QUERY_NAME>
200
+ ```
201
+
202
+ ### List Saved Queries
203
+
204
+ List all saved queries for an engine:
205
+
206
+ ```
207
+ shaped list-saved-queries --engine-name <ENGINE_NAME>
208
+ ```
209
+
210
+ ### View Saved Query
211
+
212
+ View the definition of a saved query:
213
+
214
+ ```
215
+ shaped view-saved-query --engine-name <ENGINE_NAME> --query-name <QUERY_NAME>
216
+ ```
217
+
218
+ ---
219
+
220
+ # Python SDK (V2)
221
+
222
+ ## Installation
223
+
224
+ ### Pip Installation
225
+
226
+ ```sh
227
+ pip install shaped
228
+ ```
229
+
230
+ ## V2 Query API with Fluent Builders
231
+
232
+ The V2 SDK provides a fluent query builder API that leverages Shaped's declarative query language:
233
+
234
+ ```python
235
+ from shaped import (
236
+ Client,
237
+ RankQueryBuilder,
238
+ ColumnOrder,
239
+ TextSearch,
240
+ Ensemble,
241
+ Diversity,
242
+ )
243
+
244
+ client = Client(api_key="your-api-key")
245
+
246
+ # Build a query using the fluent builder with step objects
247
+ query = (RankQueryBuilder()
248
+ .from_entity('item')
249
+ .retrieve(
250
+ ColumnOrder(
251
+ [{'name': 'popularity', 'ascending': False}],
252
+ limit=1000
253
+ ),
254
+ TextSearch(
255
+ 'laptop',
256
+ mode={'type': 'vector', 'text_embedding_ref': 'text_emb'}
257
+ )
258
+ )
259
+ .filter(Expression('price < 1000')) filter
260
+ .score(Ensemble('lightgbm', input_user_id='$parameters.userId'))
261
+ .reorder(Diversity(diversity_attributes=['category']))
262
+ .limit(50)
263
+ .columns(['item_id', 'title', 'price'])
264
+ .build())
265
+
266
+ # Execute the query
267
+ result = client.execute_query(
268
+ 'my_engine',
269
+ query,
270
+ parameters={'userId': '123'}
271
+ )
272
+ ```
273
+
274
+ ### Available Step Factory Functions
275
+
276
+ The SDK provides convenient factory functions for creating step objects:
277
+
278
+ **Retrieve Steps:**
279
+ - `ColumnOrder(columns, limit=100, where=None, name=None)` - Sort by columns
280
+ - `TextSearch(input_text_query, mode, limit=100, where=None, name=None)` - Text search
281
+ - `Similarity(embedding_ref, query_encoder, limit=100, where=None, name=None)` - Similarity search
282
+ - `Filter(where=None, limit=100, name=None)` - Filter without ordering
283
+ - `CandidateIds(item_ids, limit=None, name=None)` - Specific item IDs
284
+ - `CandidateAttributes(item_attributes, limit=None, name=None)` - Item attributes
285
+
286
+ **Filter Steps:**
287
+ - `Expression(expression, name=None)` - DuckDB filter expression
288
+ - `Truncate(max_length=500, name=None)` - Truncate results to max_length
289
+ - `Prebuilt(filter_ref, input_user_id=None, name=None)` - Reference to prebuilt filter
290
+
291
+ **Score Configs:**
292
+ - `Ensemble(value_model, input_user_id=None, ...)`
293
+ - `Passthrough(name=None)`
294
+
295
+ **Reorder Steps:**
296
+ - `Diversity(diversity_attributes=None, strength=0.5, ...)`
297
+ - `Boosted(retriever, strength=0.5, name=None)`
298
+ - `Exploration(retriever, strength=0.5, name=None)`
299
+
300
+ ### Execute Saved Query
301
+
302
+ ```python
303
+ result = client.execute_saved_query(
304
+ 'my_engine',
305
+ 'recommendations',
306
+ parameters={'userId': '123', 'limit': 20}
307
+ )
308
+ ```
309
+
310
+ ---
311
+
312
+ # TypeScript/Node.js SDK (V2)
313
+
314
+ ## Installation
315
+
316
+ ### NPM Installation
317
+
318
+ ```sh
319
+ npm install @shaped.ai/client
320
+ ```
321
+
322
+ ## V2 Query API with Fluent Builders
323
+
324
+ The V2 SDK provides a fluent, type-safe query builder API:
325
+
326
+ ```typescript
327
+ import { Client, RankQueryBuilder } from '@shaped.ai/client';
328
+
329
+ const client = new Client({ apiKey: 'your-api-key' });
330
+
331
+ // Build a query using the fluent builder
332
+ const query = new RankQueryBuilder()
333
+ .from('item')
334
+ .retrieve(step => step
335
+ .columnOrder([{name: 'popularity', ascending: false}], {limit: 1000}))
336
+ .retrieve(step => step
337
+ .textSearch('laptop', {type: 'vector', textEmbeddingRef: 'text_emb'}))
338
+ .filter(step => step.expression('price < 1000'))
339
+ .score(step => step.ensemble('lightgbm', {inputUserId: '$parameters.userId'}))
340
+ .reorder(step => step.diversity({attribute: 'category'}))
341
+ .limit(50)
342
+ .columns(['item_id', 'title', 'price'])
343
+ .build();
344
+
345
+ // Execute the query
346
+ const result = await client.executeQuery(
347
+ 'my_engine',
348
+ query,
349
+ {userId: '123'}
350
+ );
351
+ ```
352
+
353
+ ### Execute Saved Query
354
+
355
+ ```typescript
356
+ const result = await client.executeSavedQuery(
357
+ 'my_engine',
358
+ 'recommendations',
359
+ {userId: '123', limit: 20}
360
+ );
361
+ ```
@@ -0,0 +1,54 @@
1
+ """
2
+ Shaped V2 SDK for Python.
3
+
4
+ Provides client SDK for interacting with Shaped AI V2 API.
5
+ """
6
+ from shaped.client import Client
7
+ from shaped.query_builder import (
8
+ RankQueryBuilder,
9
+ ColumnOrder,
10
+ TextSearch,
11
+ Similarity,
12
+ CandidateIds,
13
+ CandidateAttributes,
14
+ Filter,
15
+ Expression,
16
+ Truncate,
17
+ Prebuilt,
18
+ ensemble as Ensemble,
19
+ Boosted,
20
+ Exploration,
21
+ Diversity,
22
+ )
23
+ from shaped.config_builders import (
24
+ Engine,
25
+ Table,
26
+ View,
27
+ )
28
+
29
+ # Type alias for ViewConfig
30
+ # Type alias for ViewConfig
31
+ from shaped.client import ViewConfig
32
+
33
+ __all__ = [
34
+ 'Client',
35
+ 'RankQueryBuilder',
36
+ 'Similarity',
37
+ 'TextSearch',
38
+ 'CandidateIds',
39
+ 'CandidateAttributes',
40
+ 'ColumnOrder',
41
+ 'Filter',
42
+ 'Expression',
43
+ 'Truncate',
44
+ 'Prebuilt',
45
+ 'Ensemble',
46
+ 'Passthrough',
47
+ 'Diversity',
48
+ 'Boosted',
49
+ 'Exploration',
50
+ 'ViewConfig',
51
+ 'Engine',
52
+ 'Table',
53
+ 'View',
54
+ ]