algolia 3.45.0 → 3.46.1

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 (164) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +2 -2
  3. data/AGENTS.md +0 -24
  4. data/CHANGELOG.md +30 -0
  5. data/Gemfile.lock +1 -1
  6. data/lib/algolia/api/abtesting_v3_client.rb +196 -7
  7. data/lib/algolia/api/agent_studio_client.rb +244 -6
  8. data/lib/algolia/api/recommend_client.rb +2 -2
  9. data/lib/algolia/api/search_client.rb +17 -3
  10. data/lib/algolia/configuration.rb +8 -0
  11. data/lib/algolia/defaults.rb +8 -0
  12. data/lib/algolia/models/abtesting-v3/ab_test.rb +25 -1
  13. data/lib/algolia/models/abtesting-v3/ab_test_configuration.rb +22 -4
  14. data/lib/algolia/models/abtesting-v3/ab_test_settings_response.rb +224 -0
  15. data/lib/algolia/models/abtesting-v3/add_ab_tests_request.rb +11 -1
  16. data/lib/algolia/models/abtesting-v3/analysis_method.rb +34 -0
  17. data/lib/algolia/models/abtesting-v3/bayesian_metric_result.rb +237 -0
  18. data/lib/algolia/models/abtesting-v3/evidence_status.rb +37 -0
  19. data/lib/algolia/models/abtesting-v3/feature_settings.rb +224 -0
  20. data/lib/algolia/models/abtesting-v3/metric_evidence.rb +209 -0
  21. data/lib/algolia/models/abtesting-v3/metric_metadata.rb +1 -1
  22. data/lib/algolia/models/abtesting-v3/metric_name.rb +7 -1
  23. data/lib/algolia/models/abtesting-v3/metric_result.rb +18 -8
  24. data/lib/algolia/models/abtesting-v3/minimum_detectable_effect.rb +1 -1
  25. data/lib/algolia/models/abtesting-v3/primary_metric.rb +37 -0
  26. data/lib/algolia/models/abtesting-v3/save_settings_request.rb +208 -0
  27. data/lib/algolia/models/abtesting-v3/variant_settings.rb +293 -0
  28. data/lib/algolia/models/agent-studio/agent_completion_algolia_params.rb +16 -4
  29. data/lib/algolia/models/agent-studio/agent_completion_request.rb +1 -3
  30. data/lib/algolia/models/agent-studio/agent_completion_request_union.rb +108 -0
  31. data/lib/algolia/models/agent-studio/agent_test_configuration.rb +1 -1
  32. data/lib/algolia/models/agent-studio/agent_with_version_response.rb +1 -1
  33. data/lib/algolia/models/agent-studio/agui_completion_request.rb +265 -0
  34. data/lib/algolia/models/agent-studio/agui_resume.rb +231 -0
  35. data/lib/algolia/models/agent-studio/algolia_grouped_results_compat_tool_config.rb +268 -0
  36. data/lib/algolia/models/agent-studio/{algolia_display_results_tool_config.rb → algolia_grouped_results_tool_config.rb} +30 -16
  37. data/lib/algolia/models/agent-studio/{algolia_recommend_tool_config_input.rb → algolia_recommend_tool_config.rb} +3 -3
  38. data/lib/algolia/models/agent-studio/algolia_search_tool_config.rb +22 -4
  39. data/lib/algolia/models/agent-studio/assistant_message_agui.rb +280 -0
  40. data/lib/algolia/models/agent-studio/assistant_message_v4.rb +1 -0
  41. data/lib/algolia/models/agent-studio/assistant_message_v5.rb +3 -1
  42. data/lib/algolia/models/agent-studio/assistant_part_v5.rb +2 -0
  43. data/lib/algolia/models/agent-studio/azure_open_ai_provider_input.rb +1 -1
  44. data/lib/algolia/models/agent-studio/boolean_param.rb +220 -0
  45. data/lib/algolia/models/agent-studio/client_side_tool_config.rb +14 -4
  46. data/lib/algolia/models/agent-studio/compaction_stats.rb +271 -0
  47. data/lib/algolia/models/agent-studio/compatibility_mode.rb +2 -1
  48. data/lib/algolia/models/agent-studio/context_compact_request.rb +263 -0
  49. data/lib/algolia/models/agent-studio/context_response.rb +231 -0
  50. data/lib/algolia/models/agent-studio/context_stats.rb +258 -0
  51. data/lib/algolia/models/agent-studio/context_trim_request.rb +239 -0
  52. data/lib/algolia/models/agent-studio/conversation_base_response.rb +16 -5
  53. data/lib/algolia/models/agent-studio/conversation_full_response.rb +26 -5
  54. data/lib/algolia/models/agent-studio/data_guardrail_violation_part_v5.rb +218 -0
  55. data/lib/algolia/models/agent-studio/data_part_v5.rb +220 -0
  56. data/lib/algolia/models/agent-studio/facet_filters_union_search_parameters_overrides.rb +108 -0
  57. data/lib/algolia/models/agent-studio/feedback_update_request.rb +253 -0
  58. data/lib/algolia/models/agent-studio/forwarded_props.rb +226 -0
  59. data/lib/algolia/models/agent-studio/function_call_agui.rb +219 -0
  60. data/lib/algolia/models/agent-studio/guardrail_outcome.rb +231 -0
  61. data/lib/algolia/models/agent-studio/guardrail_violation_data_v5.rb +230 -0
  62. data/lib/algolia/models/agent-studio/impact_analytics.rb +242 -0
  63. data/lib/algolia/models/agent-studio/index_search_parameters.rb +11 -1
  64. data/lib/algolia/models/agent-studio/input_union.rb +113 -0
  65. data/lib/algolia/models/agent-studio/items_union.rb +132 -0
  66. data/lib/algolia/models/agent-studio/items_union_agui_completion_request.rb +123 -0
  67. data/lib/algolia/models/agent-studio/managed_provider_response_input.rb +209 -0
  68. data/lib/algolia/models/agent-studio/mcp_server_tool_config.rb +1 -1
  69. data/lib/algolia/models/agent-studio/memory_record.rb +4 -4
  70. data/lib/algolia/models/agent-studio/message_event.rb +231 -0
  71. data/lib/algolia/models/agent-studio/message_part_assistant_message_agui.rb +123 -0
  72. data/lib/algolia/models/agent-studio/message_response.rb +87 -5
  73. data/lib/algolia/models/agent-studio/mode_enum.rb +34 -0
  74. data/lib/algolia/models/agent-studio/one_of_enum.rb +34 -0
  75. data/lib/algolia/models/agent-studio/open_ai_compatible_provider_input.rb +1 -1
  76. data/lib/algolia/models/agent-studio/paginated_conversations_response.rb +13 -4
  77. data/lib/algolia/models/agent-studio/provider_authentication_response.rb +14 -5
  78. data/lib/algolia/models/agent-studio/provider_input.rb +2 -1
  79. data/lib/algolia/models/agent-studio/provider_input_nullable.rb +2 -1
  80. data/lib/algolia/models/agent-studio/provider_name.rb +2 -1
  81. data/lib/algolia/models/agent-studio/reasoning_message_agui.rb +239 -0
  82. data/lib/algolia/models/agent-studio/reasoning_part_agui.rb +228 -0
  83. data/lib/algolia/models/agent-studio/search_parameters.rb +1 -1
  84. data/lib/algolia/models/agent-studio/search_parameters_overrides.rb +80 -5
  85. data/lib/algolia/models/agent-studio/status_enum.rb +34 -0
  86. data/lib/algolia/models/agent-studio/task_kind.rb +33 -0
  87. data/lib/algolia/models/agent-studio/task_request.rb +240 -0
  88. data/lib/algolia/models/agent-studio/task_response.rb +211 -0
  89. data/lib/algolia/models/agent-studio/text_part_agui.rb +219 -0
  90. data/lib/algolia/models/agent-studio/tool_approval_agui.rb +228 -0
  91. data/lib/algolia/models/agent-studio/tool_approval_request_part.rb +15 -5
  92. data/lib/algolia/models/agent-studio/tool_call_agui.rb +237 -0
  93. data/lib/algolia/models/agent-studio/tool_call_part.rb +13 -1
  94. data/lib/algolia/models/agent-studio/tool_call_part_agui.rb +272 -0
  95. data/lib/algolia/models/agent-studio/tool_call_result_part_agui.rb +250 -0
  96. data/lib/algolia/models/agent-studio/tool_config_input.rb +2 -5
  97. data/lib/algolia/models/agent-studio/{tool_config.rb → tool_config_or_boolean_union.rb} +1 -1
  98. data/lib/algolia/models/agent-studio/tool_config_output.rb +126 -0
  99. data/lib/algolia/models/agent-studio/tool_invocation_v4.rb +10 -2
  100. data/lib/algolia/models/agent-studio/tool_message_agui.rb +259 -0
  101. data/lib/algolia/models/agent-studio/tool_part_v5.rb +47 -2
  102. data/lib/algolia/models/agent-studio/tool_result_part.rb +57 -5
  103. data/lib/algolia/models/agent-studio/unknown_tool_config.rb +1 -1
  104. data/lib/algolia/models/agent-studio/user_message_agui.rb +261 -0
  105. data/lib/algolia/models/agent-studio/user_message_metadata_agui.rb +208 -0
  106. data/lib/algolia/models/agent-studio/user_message_metadata_v5.rb +4 -2
  107. data/lib/algolia/models/agent-studio/user_message_v4.rb +4 -1
  108. data/lib/algolia/models/agent-studio/user_message_v5.rb +4 -1
  109. data/lib/algolia/models/agent-studio/validation_error.rb +5 -25
  110. data/lib/algolia/models/agent-studio/xai_provider_input.rb +220 -0
  111. data/lib/algolia/models/analytics/catalog_entry.rb +1 -1
  112. data/lib/algolia/models/composition/base_injection_query_parameters.rb +18 -18
  113. data/lib/algolia/models/composition/distinct.rb +1 -1
  114. data/lib/algolia/models/composition/external_provider.rb +209 -0
  115. data/lib/algolia/models/composition/external_provider_ordering.rb +34 -0
  116. data/lib/algolia/models/composition/hit_metadata.rb +2 -2
  117. data/lib/algolia/models/composition/injected_item_external.rb +21 -14
  118. data/lib/algolia/models/composition/injected_item_external_provider.rb +258 -0
  119. data/lib/algolia/models/composition/injected_item_external_provider_source.rb +216 -0
  120. data/lib/algolia/models/composition/injected_item_hits_metadata.rb +1 -1
  121. data/lib/algolia/models/composition/{recommend.rb → injected_item_recommend.rb} +10 -3
  122. data/lib/algolia/models/composition/injected_item_recommend_source.rb +1 -1
  123. data/lib/algolia/models/composition/injected_item_search.rb +8 -1
  124. data/lib/algolia/models/composition/injected_item_source.rb +1 -0
  125. data/lib/algolia/models/composition/injection_main_external_provider.rb +258 -0
  126. data/lib/algolia/models/composition/injection_main_external_provider_source.rb +216 -0
  127. data/lib/algolia/models/composition/{main_recommend.rb → injection_main_recommend.rb} +10 -3
  128. data/lib/algolia/models/composition/injection_main_recommend_source.rb +1 -1
  129. data/lib/algolia/models/composition/{main_search.rb → injection_main_search.rb} +11 -4
  130. data/lib/algolia/models/composition/injection_main_search_source.rb +1 -1
  131. data/lib/algolia/models/composition/injection_main_source.rb +1 -0
  132. data/lib/algolia/models/composition/main_injection_query_parameters.rb +22 -22
  133. data/lib/algolia/models/composition/optional_words.rb +1 -1
  134. data/lib/algolia/models/composition/params.rb +6 -6
  135. data/lib/algolia/models/composition/processing_error.rb +209 -0
  136. data/lib/algolia/models/composition/request_body.rb +13 -4
  137. data/lib/algolia/models/composition/result_card.rb +208 -0
  138. data/lib/algolia/models/composition/search_response.rb +16 -4
  139. data/lib/algolia/models/composition/widgets.rb +13 -4
  140. data/lib/algolia/models/ingestion/source_update_commercetools.rb +11 -0
  141. data/lib/algolia/models/recommend/distinct.rb +1 -1
  142. data/lib/algolia/models/recommend/fallback_params.rb +26 -26
  143. data/lib/algolia/models/recommend/optional_words.rb +1 -1
  144. data/lib/algolia/models/recommend/recommend_search_params.rb +26 -26
  145. data/lib/algolia/models/recommend/result_card.rb +208 -0
  146. data/lib/algolia/models/recommend/widgets.rb +13 -4
  147. data/lib/algolia/models/search/api_key.rb +2 -2
  148. data/lib/algolia/models/search/attribute_criteria_computed_by.rb +35 -0
  149. data/lib/algolia/models/search/browse_params_object.rb +35 -25
  150. data/lib/algolia/models/search/consequence_params.rb +35 -25
  151. data/lib/algolia/models/search/distinct.rb +1 -1
  152. data/lib/algolia/models/search/get_api_key_response.rb +2 -2
  153. data/lib/algolia/models/search/index_settings.rb +28 -18
  154. data/lib/algolia/models/search/optional_words.rb +1 -1
  155. data/lib/algolia/models/search/result_card.rb +208 -0
  156. data/lib/algolia/models/search/search_for_facets.rb +35 -25
  157. data/lib/algolia/models/search/search_for_hits.rb +35 -25
  158. data/lib/algolia/models/search/search_params_object.rb +35 -25
  159. data/lib/algolia/models/search/secured_api_key_restrictions.rb +1 -1
  160. data/lib/algolia/models/search/settings_response.rb +28 -18
  161. data/lib/algolia/models/search/widgets.rb +13 -4
  162. data/lib/algolia/transport/transport.rb +82 -10
  163. data/lib/algolia/version.rb +1 -1
  164. metadata +72 -8
@@ -189,6 +189,50 @@ module Algolia
189
189
  nil
190
190
  end
191
191
 
192
+ # Summarize the older part of a conversation into a single user message via the caller's LLM. Everything except the trailing `keepLastMessages` messages is summarized; the summary is returned as a user-role message followed by the kept tail verbatim. Your provider runs the summary, so the provider adds the cost to your account. A conversation too large for the summarizer's context window is split into chunks that each fit, summarized concurrently, then merged in a reduce pass - so payload size alone does not fail the request. When the conversation still cannot be summarized (it needs more chunks than the server allows, or the chunk summaries will not converge), the response is a `400`, not a `500`. Two optional controls shape the output. `instructions` adds caller guidance inside the server-owned prompt frame, so it steers the summary without the model echoing the wording back. `targetTokensEstimate` sets a desired summary size, translated into word-count guidance. The `compaction` block reports what happened: `compacted` is `false` when the payload passed through untouched (nothing older than the kept tail), alongside chunk/pass counts and the summarizer's own token usage.
193
+ #
194
+ # Required API Key ACLs:
195
+ # - search
196
+ # @param context_compact_request [ContextCompactRequest] (required)
197
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
198
+ # @return [Http::Response] the response
199
+ def compact_context_with_http_info(context_compact_request, request_options = {})
200
+ # verify the required parameter 'context_compact_request' is set
201
+ if @api_client.config.client_side_validation && context_compact_request.nil?
202
+ raise ArgumentError, "Parameter `context_compact_request` is required when calling `compact_context`."
203
+ end
204
+
205
+ path = "/agent-studio/1/unstable/context/compact"
206
+ query_params = {}
207
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
208
+ header_params = {}
209
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
210
+
211
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(context_compact_request)
212
+
213
+ new_options = request_options.merge(
214
+ :operation => :"AgentStudioClient.compact_context",
215
+ :header_params => header_params,
216
+ :query_params => query_params,
217
+ :body => post_body,
218
+ :use_read_transporter => false
219
+ )
220
+
221
+ @api_client.call_api(:POST, path, new_options)
222
+ end
223
+
224
+ # Summarize the older part of a conversation into a single user message via the caller's LLM. Everything except the trailing `keepLastMessages` messages is summarized; the summary is returned as a user-role message followed by the kept tail verbatim. Your provider runs the summary, so the provider adds the cost to your account. A conversation too large for the summarizer's context window is split into chunks that each fit, summarized concurrently, then merged in a reduce pass - so payload size alone does not fail the request. When the conversation still cannot be summarized (it needs more chunks than the server allows, or the chunk summaries will not converge), the response is a `400`, not a `500`. Two optional controls shape the output. `instructions` adds caller guidance inside the server-owned prompt frame, so it steers the summary without the model echoing the wording back. `targetTokensEstimate` sets a desired summary size, translated into word-count guidance. The `compaction` block reports what happened: `compacted` is `false` when the payload passed through untouched (nothing older than the kept tail), alongside chunk/pass counts and the summarizer's own token usage.
225
+ #
226
+ # Required API Key ACLs:
227
+ # - search
228
+ # @param context_compact_request [ContextCompactRequest] (required)
229
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
230
+ # @return [ContextResponse]
231
+ def compact_context(context_compact_request, request_options = {})
232
+ response = compact_context_with_http_info(context_compact_request, request_options)
233
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::ContextResponse")
234
+ end
235
+
192
236
  # Create a new agent.
193
237
  #
194
238
  # Required API Key ACLs:
@@ -302,7 +346,7 @@ module Algolia
302
346
  # - search
303
347
  # @param agent_id [String] The agentId. (required)
304
348
  # @param compatibility_mode [CompatibilityMode] Compatibility mode for the completion API. (required)
305
- # @param agent_completion_request [AgentCompletionRequest] (required)
349
+ # @param agent_completion_request [AgentCompletionRequestUnion] (required)
306
350
  # @param stream [Boolean] Whether to stream the response or not. (default to true)
307
351
  # @param cache [Boolean] Use cached responses if available. (default to true)
308
352
  # @param memory [Boolean] Set to false to disable memory (enabled by default).
@@ -375,7 +419,7 @@ module Algolia
375
419
  # - search
376
420
  # @param agent_id [String] The agentId. (required)
377
421
  # @param compatibility_mode [CompatibilityMode] Compatibility mode for the completion API. (required)
378
- # @param agent_completion_request [AgentCompletionRequest] (required)
422
+ # @param agent_completion_request [AgentCompletionRequestUnion] (required)
379
423
  # @param stream [Boolean] Whether to stream the response or not. (default to true)
380
424
  # @param cache [Boolean] Use cached responses if available. (default to true)
381
425
  # @param memory [Boolean] Set to false to disable memory (enabled by default).
@@ -408,6 +452,76 @@ module Algolia
408
452
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Hash<String, Object>")
409
453
  end
410
454
 
455
+ # Run a configured task and return the generated object as ``{ output }``. With ``?stream=true``, returns the raw partial JSON text stream expected by AI SDK v5 ``useObject``. The streamed JSON is the task output itself.
456
+ #
457
+ # Required API Key ACLs:
458
+ # - search
459
+ # @param agent_id [String] The agentId. (required)
460
+ # @param task_request [TaskRequest] (required)
461
+ # @param stream [Boolean] Whether to stream the response or not. (default to false)
462
+ # @param cache [Boolean] Use cached responses if available. (default to true)
463
+ # @param analytics [Boolean] Set to false to skip endpoint-specific analytics for this task call (default: true). Disables the task analytics event; operational metrics and traces are always emitted. (default to true)
464
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
465
+ # @return [Http::Response] the response
466
+ def create_agent_task_with_http_info(
467
+ agent_id,
468
+ task_request,
469
+ stream = nil,
470
+ cache = nil,
471
+ analytics = nil,
472
+ request_options = {}
473
+ )
474
+ # verify the required parameter 'agent_id' is set
475
+ if @api_client.config.client_side_validation && agent_id.nil?
476
+ raise ArgumentError, "Parameter `agent_id` is required when calling `create_agent_task`."
477
+ end
478
+ # verify the required parameter 'agent_id' is not empty
479
+ if @api_client.config.client_side_validation && agent_id.empty?
480
+ raise ArgumentError, "Parameter `agent_id` is required when calling `create_agent_task`."
481
+ end
482
+ # verify the required parameter 'task_request' is set
483
+ if @api_client.config.client_side_validation && task_request.nil?
484
+ raise ArgumentError, "Parameter `task_request` is required when calling `create_agent_task`."
485
+ end
486
+
487
+ path = "/agent-studio/1/agents/{agentId}/tasks".sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
488
+ query_params = {}
489
+ query_params[:stream] = stream unless stream.nil?
490
+ query_params[:cache] = cache unless cache.nil?
491
+ query_params[:analytics] = analytics unless analytics.nil?
492
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
493
+ header_params = {}
494
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
495
+
496
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(task_request)
497
+
498
+ new_options = request_options.merge(
499
+ :operation => :"AgentStudioClient.create_agent_task",
500
+ :header_params => header_params,
501
+ :query_params => query_params,
502
+ :body => post_body,
503
+ :use_read_transporter => false
504
+ )
505
+
506
+ @api_client.call_api(:POST, path, new_options)
507
+ end
508
+
509
+ # Run a configured task and return the generated object as ``{ output }``. With ``?stream=true``, returns the raw partial JSON text stream expected by AI SDK v5 ``useObject``. The streamed JSON is the task output itself.
510
+ #
511
+ # Required API Key ACLs:
512
+ # - search
513
+ # @param agent_id [String] The agentId. (required)
514
+ # @param task_request [TaskRequest] (required)
515
+ # @param stream [Boolean] Whether to stream the response or not. (default to false)
516
+ # @param cache [Boolean] Use cached responses if available. (default to true)
517
+ # @param analytics [Boolean] Set to false to skip endpoint-specific analytics for this task call (default: true). Disables the task analytics event; operational metrics and traces are always emitted. (default to true)
518
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
519
+ # @return [TaskResponse]
520
+ def create_agent_task(agent_id, task_request, stream = nil, cache = nil, analytics = nil, request_options = {})
521
+ response = create_agent_task_with_http_info(agent_id, task_request, stream, cache, analytics, request_options)
522
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::TaskResponse")
523
+ end
524
+
411
525
  # Create new feedback entry.
412
526
  #
413
527
  # Required API Key ACLs:
@@ -783,7 +897,7 @@ module Algolia
783
897
  nil
784
898
  end
785
899
 
786
- # Deletes the conversations matching the given filers.
900
+ # Deletes the conversations matching the given filters.
787
901
  #
788
902
  # Required API Key ACLs:
789
903
  # - logs
@@ -826,7 +940,7 @@ module Algolia
826
940
  @api_client.call_api(:DELETE, path, new_options)
827
941
  end
828
942
 
829
- # Deletes the conversations matching the given filers.
943
+ # Deletes the conversations matching the given filters.
830
944
  #
831
945
  # Required API Key ACLs:
832
946
  # - logs
@@ -1331,6 +1445,8 @@ module Algolia
1331
1445
  # @param conversation_id [String] The conversationId. (required)
1332
1446
  # @param agent_id [String] The agentId. (required)
1333
1447
  # @param include_feedback [Boolean] Include feedback for the conversation. (default to false)
1448
+ # @param include_message_events [Boolean] Include Insights events attributed to each assistant message. (default to false)
1449
+ # @param include_impact_analytics [Boolean] Include outcome signals (hasView, hasClick, hasConversion) for the conversation. (default to false)
1334
1450
  # @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
1335
1451
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1336
1452
  # @return [Http::Response] the response
@@ -1338,6 +1454,8 @@ module Algolia
1338
1454
  conversation_id,
1339
1455
  agent_id,
1340
1456
  include_feedback = nil,
1457
+ include_message_events = nil,
1458
+ include_impact_analytics = nil,
1341
1459
  x_algolia_secure_user_token = nil,
1342
1460
  request_options = {}
1343
1461
  )
@@ -1363,6 +1481,8 @@ module Algolia
1363
1481
  .sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
1364
1482
  query_params = {}
1365
1483
  query_params[:includeFeedback] = include_feedback unless include_feedback.nil?
1484
+ query_params[:includeMessageEvents] = include_message_events unless include_message_events.nil?
1485
+ query_params[:includeImpactAnalytics] = include_impact_analytics unless include_impact_analytics.nil?
1366
1486
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1367
1487
  header_params = {}
1368
1488
  unless x_algolia_secure_user_token.nil?
@@ -1391,6 +1511,8 @@ module Algolia
1391
1511
  # @param conversation_id [String] The conversationId. (required)
1392
1512
  # @param agent_id [String] The agentId. (required)
1393
1513
  # @param include_feedback [Boolean] Include feedback for the conversation. (default to false)
1514
+ # @param include_message_events [Boolean] Include Insights events attributed to each assistant message. (default to false)
1515
+ # @param include_impact_analytics [Boolean] Include outcome signals (hasView, hasClick, hasConversion) for the conversation. (default to false)
1394
1516
  # @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
1395
1517
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1396
1518
  # @return [ConversationFullResponse]
@@ -1398,6 +1520,8 @@ module Algolia
1398
1520
  conversation_id,
1399
1521
  agent_id,
1400
1522
  include_feedback = nil,
1523
+ include_message_events = nil,
1524
+ include_impact_analytics = nil,
1401
1525
  x_algolia_secure_user_token = nil,
1402
1526
  request_options = {}
1403
1527
  )
@@ -1405,6 +1529,8 @@ module Algolia
1405
1529
  conversation_id,
1406
1530
  agent_id,
1407
1531
  include_feedback,
1532
+ include_message_events,
1533
+ include_impact_analytics,
1408
1534
  x_algolia_secure_user_token,
1409
1535
  request_options
1410
1536
  )
@@ -1567,7 +1693,7 @@ module Algolia
1567
1693
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::UserDataResponse")
1568
1694
  end
1569
1695
 
1570
- # Invalidate cached completions for this agent. Filter with `before` (exclusive).
1696
+ # Invalidate cached completions and task outputs for this agent. Filter with `before` (exclusive).
1571
1697
  #
1572
1698
  # Required API Key ACLs:
1573
1699
  # - editSettings
@@ -1605,7 +1731,7 @@ module Algolia
1605
1731
  @api_client.call_api(:DELETE, path, new_options)
1606
1732
  end
1607
1733
 
1608
- # Invalidate cached completions for this agent. Filter with `before` (exclusive).
1734
+ # Invalidate cached completions and task outputs for this agent. Filter with `before` (exclusive).
1609
1735
  #
1610
1736
  # Required API Key ACLs:
1611
1737
  # - editSettings
@@ -1683,6 +1809,10 @@ module Algolia
1683
1809
  # @param feedback_vote [Integer] Filter by feedback value (requires includeFeedback=true).
1684
1810
  # @param page [Integer] Page number. (default to 1)
1685
1811
  # @param limit [Integer] Items per page. (default to 20)
1812
+ # @param include_impact_analytics [Boolean] Include impact analytics (hasView, hasClick, hasConversion) per conversation.
1813
+ # @param clicked [Boolean] Filter by conversations with at least one item click.
1814
+ # @param converted [Boolean] Filter by conversations with at least one conversion.
1815
+ # @param has_algolia_search [Boolean] Filter by conversations where the search tool was used.
1686
1816
  # @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
1687
1817
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1688
1818
  # @return [Http::Response] the response
@@ -1694,6 +1824,10 @@ module Algolia
1694
1824
  feedback_vote = nil,
1695
1825
  page = nil,
1696
1826
  limit = nil,
1827
+ include_impact_analytics = nil,
1828
+ clicked = nil,
1829
+ converted = nil,
1830
+ has_algolia_search = nil,
1697
1831
  x_algolia_secure_user_token = nil,
1698
1832
  request_options = {}
1699
1833
  )
@@ -1717,6 +1851,10 @@ module Algolia
1717
1851
  query_params[:feedbackVote] = feedback_vote unless feedback_vote.nil?
1718
1852
  query_params[:page] = page unless page.nil?
1719
1853
  query_params[:limit] = limit unless limit.nil?
1854
+ query_params[:includeImpactAnalytics] = include_impact_analytics unless include_impact_analytics.nil?
1855
+ query_params[:clicked] = clicked unless clicked.nil?
1856
+ query_params[:converted] = converted unless converted.nil?
1857
+ query_params[:hasAlgoliaSearch] = has_algolia_search unless has_algolia_search.nil?
1720
1858
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1721
1859
  header_params = {}
1722
1860
  unless x_algolia_secure_user_token.nil?
@@ -1749,6 +1887,10 @@ module Algolia
1749
1887
  # @param feedback_vote [Integer] Filter by feedback value (requires includeFeedback=true).
1750
1888
  # @param page [Integer] Page number. (default to 1)
1751
1889
  # @param limit [Integer] Items per page. (default to 20)
1890
+ # @param include_impact_analytics [Boolean] Include impact analytics (hasView, hasClick, hasConversion) per conversation.
1891
+ # @param clicked [Boolean] Filter by conversations with at least one item click.
1892
+ # @param converted [Boolean] Filter by conversations with at least one conversion.
1893
+ # @param has_algolia_search [Boolean] Filter by conversations where the search tool was used.
1752
1894
  # @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
1753
1895
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1754
1896
  # @return [PaginatedConversationsResponse]
@@ -1760,6 +1902,10 @@ module Algolia
1760
1902
  feedback_vote = nil,
1761
1903
  page = nil,
1762
1904
  limit = nil,
1905
+ include_impact_analytics = nil,
1906
+ clicked = nil,
1907
+ converted = nil,
1908
+ has_algolia_search = nil,
1763
1909
  x_algolia_secure_user_token = nil,
1764
1910
  request_options = {}
1765
1911
  )
@@ -1771,6 +1917,10 @@ module Algolia
1771
1917
  feedback_vote,
1772
1918
  page,
1773
1919
  limit,
1920
+ include_impact_analytics,
1921
+ clicked,
1922
+ converted,
1923
+ has_algolia_search,
1774
1924
  x_algolia_secure_user_token,
1775
1925
  request_options
1776
1926
  )
@@ -2060,6 +2210,50 @@ module Algolia
2060
2210
  )
2061
2211
  end
2062
2212
 
2213
+ # Deterministically trim a conversation payload (no LLM calls). Keep the last N messages and/or fit a heuristic token budget, optionally dropping tool parts from what is kept (tool parts are stripped before the budget is applied). Returns the trimmed messages plus before/after stats. With no constraints set, the messages are returned unchanged and only the stats are computed - a deliberate, cheap \"how big is my context?\" probe (no LLM call, no mutation).
2214
+ #
2215
+ # Required API Key ACLs:
2216
+ # - search
2217
+ # @param context_trim_request [ContextTrimRequest] (required)
2218
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2219
+ # @return [Http::Response] the response
2220
+ def trim_context_with_http_info(context_trim_request, request_options = {})
2221
+ # verify the required parameter 'context_trim_request' is set
2222
+ if @api_client.config.client_side_validation && context_trim_request.nil?
2223
+ raise ArgumentError, "Parameter `context_trim_request` is required when calling `trim_context`."
2224
+ end
2225
+
2226
+ path = "/agent-studio/1/unstable/context/trim"
2227
+ query_params = {}
2228
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2229
+ header_params = {}
2230
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
2231
+
2232
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(context_trim_request)
2233
+
2234
+ new_options = request_options.merge(
2235
+ :operation => :"AgentStudioClient.trim_context",
2236
+ :header_params => header_params,
2237
+ :query_params => query_params,
2238
+ :body => post_body,
2239
+ :use_read_transporter => false
2240
+ )
2241
+
2242
+ @api_client.call_api(:POST, path, new_options)
2243
+ end
2244
+
2245
+ # Deterministically trim a conversation payload (no LLM calls). Keep the last N messages and/or fit a heuristic token budget, optionally dropping tool parts from what is kept (tool parts are stripped before the budget is applied). Returns the trimmed messages plus before/after stats. With no constraints set, the messages are returned unchanged and only the stats are computed - a deliberate, cheap \"how big is my context?\" probe (no LLM call, no mutation).
2246
+ #
2247
+ # Required API Key ACLs:
2248
+ # - search
2249
+ # @param context_trim_request [ContextTrimRequest] (required)
2250
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2251
+ # @return [ContextResponse]
2252
+ def trim_context(context_trim_request, request_options = {})
2253
+ response = trim_context_with_http_info(context_trim_request, request_options)
2254
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::ContextResponse")
2255
+ end
2256
+
2063
2257
  # Unpublish the specified agent.
2064
2258
  #
2065
2259
  # Required API Key ACLs:
@@ -2218,6 +2412,50 @@ module Algolia
2218
2412
  )
2219
2413
  end
2220
2414
 
2415
+ # Update an existing feedback entry.
2416
+ #
2417
+ # Required API Key ACLs:
2418
+ # - search
2419
+ # @param feedback_update_request [FeedbackUpdateRequest] (required)
2420
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2421
+ # @return [Http::Response] the response
2422
+ def update_feedback_with_http_info(feedback_update_request, request_options = {})
2423
+ # verify the required parameter 'feedback_update_request' is set
2424
+ if @api_client.config.client_side_validation && feedback_update_request.nil?
2425
+ raise ArgumentError, "Parameter `feedback_update_request` is required when calling `update_feedback`."
2426
+ end
2427
+
2428
+ path = "/agent-studio/1/feedback"
2429
+ query_params = {}
2430
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2431
+ header_params = {}
2432
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
2433
+
2434
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(feedback_update_request)
2435
+
2436
+ new_options = request_options.merge(
2437
+ :operation => :"AgentStudioClient.update_feedback",
2438
+ :header_params => header_params,
2439
+ :query_params => query_params,
2440
+ :body => post_body,
2441
+ :use_read_transporter => false
2442
+ )
2443
+
2444
+ @api_client.call_api(:PATCH, path, new_options)
2445
+ end
2446
+
2447
+ # Update an existing feedback entry.
2448
+ #
2449
+ # Required API Key ACLs:
2450
+ # - search
2451
+ # @param feedback_update_request [FeedbackUpdateRequest] (required)
2452
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
2453
+ # @return [FeedbackResponse]
2454
+ def update_feedback(feedback_update_request, request_options = {})
2455
+ response = update_feedback_with_http_info(feedback_update_request, request_options)
2456
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::FeedbackResponse")
2457
+ end
2458
+
2221
2459
  # Update Provider.
2222
2460
  #
2223
2461
  # Required API Key ACLs:
@@ -63,7 +63,7 @@ module Algolia
63
63
  self
64
64
  end
65
65
 
66
- # Create or update a batch of Recommend Rules Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions `pattern` and `anchoring` are unavailable. - Condition `filters` triggers if the source item matches the specified filters. - Condition `filters` accepts numeric filters. - Consequence `params` only covers filtering parameters. - Consequence `automaticFacetFilters` doesn't require a facet value placeholder (it tries to match the data source item's attributes instead).
66
+ # Create or update a batch of Recommend Rules. Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions `pattern` and `anchoring` are unavailable. - Condition `filters` triggers if the source item matches the specified filters. - Condition `filters` accepts numeric filters. - Consequence `params` only covers filtering parameters. - Consequence `automaticFacetFilters` doesn't require a facet value placeholder (it tries to match the data source item's attributes instead).
67
67
  #
68
68
  # Required API Key ACLs:
69
69
  # - editSettings
@@ -107,7 +107,7 @@ module Algolia
107
107
  @api_client.call_api(:POST, path, new_options)
108
108
  end
109
109
 
110
- # Create or update a batch of Recommend Rules Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions `pattern` and `anchoring` are unavailable. - Condition `filters` triggers if the source item matches the specified filters. - Condition `filters` accepts numeric filters. - Consequence `params` only covers filtering parameters. - Consequence `automaticFacetFilters` doesn't require a facet value placeholder (it tries to match the data source item's attributes instead).
110
+ # Create or update a batch of Recommend Rules. Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions `pattern` and `anchoring` are unavailable. - Condition `filters` triggers if the source item matches the specified filters. - Condition `filters` accepts numeric filters. - Consequence `params` only covers filtering parameters. - Consequence `automaticFacetFilters` doesn't require a facet value placeholder (it tries to match the data source item's attributes instead).
111
111
  #
112
112
  # Required API Key ACLs:
113
113
  # - editSettings
@@ -9,7 +9,7 @@ module Algolia
9
9
  # Configuration options for the ingestion transporter used by *_with_transformation helpers.
10
10
  # When passed to SearchClient.with_transformation or set via set_transformation_options,
11
11
  # the ingestion transporter is eagerly created using Ingestion API defaults (25s timeouts,
12
- # no compression). Only fields explicitly set here override those defaults.
12
+ # no compression, 3 waits on HTTP 429). Only fields explicitly set here override those defaults.
13
13
  # See https://www.algolia.com/doc/libraries/ruby/v3/methods/ingestion
14
14
  class TransformationOptions
15
15
  attr_accessor(
@@ -19,7 +19,8 @@ module Algolia
19
19
  :write_timeout,
20
20
  :hosts,
21
21
  :compression_type,
22
- :header_params
22
+ :header_params,
23
+ :max_rate_limit_retries
23
24
  )
24
25
 
25
26
  def initialize(region, opts = {})
@@ -30,7 +31,15 @@ module Algolia
30
31
  )
31
32
  end
32
33
 
33
- valid_keys = %i[connect_timeout read_timeout write_timeout hosts compression_type header_params]
34
+ valid_keys = %i[
35
+ connect_timeout
36
+ read_timeout
37
+ write_timeout
38
+ hosts
39
+ compression_type
40
+ header_params
41
+ max_rate_limit_retries
42
+ ]
34
43
  unknown = opts.keys - valid_keys
35
44
  unless unknown.empty?
36
45
  raise(
@@ -46,6 +55,7 @@ module Algolia
46
55
  @hosts = opts[:hosts]
47
56
  @compression_type = opts[:compression_type]
48
57
  @header_params = opts[:header_params]
58
+ @max_rate_limit_retries = opts[:max_rate_limit_retries]
49
59
  end
50
60
  end
51
61
 
@@ -3473,6 +3483,10 @@ module Algolia
3473
3483
  opts[:compression_type] = transformation_options.compression_type
3474
3484
  end
3475
3485
 
3486
+ unless transformation_options.max_rate_limit_retries.nil?
3487
+ opts[:max_rate_limit_retries] = transformation_options.max_rate_limit_retries
3488
+ end
3489
+
3476
3490
  config = Algolia::Configuration.new(
3477
3491
  @api_client.config.app_id,
3478
3492
  @api_client.config.api_key,
@@ -27,6 +27,13 @@ module Algolia
27
27
  # @return [true, false, nil]
28
28
  attr_accessor :request_id_enabled
29
29
 
30
+ # How many times a 429 is waited out on the same host before it is raised.
31
+ # nil means Defaults::MAX_RATE_LIMIT_RETRIES (3); 0 fails on the first 429
32
+ # without waiting; a negative value behaves like 0. The wait is the Retry-After
33
+ # header in whole seconds, or 1 second when it is missing or invalid.
34
+ # @return [Integer, nil]
35
+ attr_accessor :max_rate_limit_retries
36
+
30
37
  def initialize(app_id, api_key, hosts, client_name, opts = {})
31
38
  @hosts = hosts
32
39
  @app_id = app_id
@@ -40,6 +47,7 @@ module Algolia
40
47
  @transformation_options = opts[:transformation_options]
41
48
 
42
49
  @request_id_enabled = opts[:request_id_enabled]
50
+ @max_rate_limit_retries = opts[:max_rate_limit_retries]
43
51
 
44
52
  @user_agent = UserAgent.new.add(client_name, VERSION)
45
53
 
@@ -4,5 +4,13 @@ module Algolia
4
4
  READ_TIMEOUT = 5000
5
5
  WRITE_TIMEOUT = 30000
6
6
  CONNECT_TIMEOUT = 2000
7
+
8
+ # How many times a 429 is waited out on the same host before it is raised.
9
+ MAX_RATE_LIMIT_RETRIES = 3
10
+ # Seconds waited before a 429 retry when Retry-After is missing or invalid.
11
+ RATE_LIMIT_WAIT = 1
12
+ # Largest wait Kernel#sleep accepts (a 64-bit long, in seconds). A runtime
13
+ # ceiling like the Go and Swift clients', not a client-side maximum wait.
14
+ MAX_RATE_LIMIT_WAIT = 2 ** 63 - 1
7
15
  end
8
16
  end
@@ -26,6 +26,9 @@ module Algolia
26
26
  # A/B test name.
27
27
  attr_accessor :name
28
28
 
29
+ # Expected outcome of the A/B test.
30
+ attr_accessor :hypothesis
31
+
29
32
  attr_accessor :status
30
33
 
31
34
  # A/B test variants. The first variant is your _control_ index, typically your production index. All of the additional variants are indexes with changed settings that you want to test against the control.
@@ -44,6 +47,7 @@ module Algolia
44
47
  :end_at => :endAt,
45
48
  :stopped_at => :stoppedAt,
46
49
  :name => :name,
50
+ :hypothesis => :hypothesis,
47
51
  :status => :status,
48
52
  :variants => :variants,
49
53
  :configuration => :configuration,
@@ -60,6 +64,7 @@ module Algolia
60
64
  :end_at => :"String",
61
65
  :stopped_at => :"String",
62
66
  :name => :"String",
67
+ :hypothesis => :"String",
63
68
  :status => :"Status",
64
69
  :variants => :"Array<Variant>",
65
70
  :configuration => :"ABTestConfiguration",
@@ -130,6 +135,12 @@ module Algolia
130
135
  self.name = nil
131
136
  end
132
137
 
138
+ if attributes.key?(:hypothesis)
139
+ self.hypothesis = attributes[:hypothesis]
140
+ else
141
+ self.hypothesis = nil
142
+ end
143
+
133
144
  if attributes.key?(:status)
134
145
  self.status = attributes[:status]
135
146
  else
@@ -164,6 +175,7 @@ module Algolia
164
175
  end_at == other.end_at &&
165
176
  stopped_at == other.stopped_at &&
166
177
  name == other.name &&
178
+ hypothesis == other.hypothesis &&
167
179
  status == other.status &&
168
180
  variants == other.variants &&
169
181
  configuration == other.configuration &&
@@ -179,7 +191,19 @@ module Algolia
179
191
  # Calculates hash code according to all attributes.
180
192
  # @return [Integer] Hash code
181
193
  def hash
182
- [ab_test_id, updated_at, created_at, end_at, stopped_at, name, status, variants, configuration, decision].hash
194
+ [
195
+ ab_test_id,
196
+ updated_at,
197
+ created_at,
198
+ end_at,
199
+ stopped_at,
200
+ name,
201
+ hypothesis,
202
+ status,
203
+ variants,
204
+ configuration,
205
+ decision
206
+ ].hash
183
207
  end
184
208
 
185
209
  # Builds the object from hash
@@ -16,12 +16,18 @@ module Algolia
16
16
 
17
17
  attr_accessor :error_correction
18
18
 
19
+ attr_accessor :method
20
+
21
+ attr_accessor :primary_metric
22
+
19
23
  # Attribute mapping from ruby-style variable name to JSON key.
20
24
  def self.attribute_map
21
25
  {
22
26
  :minimum_detectable_effect => :minimumDetectableEffect,
23
27
  :filters => :filters,
24
- :error_correction => :errorCorrection
28
+ :error_correction => :errorCorrection,
29
+ :method => :method,
30
+ :primary_metric => :primaryMetric
25
31
  }
26
32
  end
27
33
 
@@ -30,7 +36,9 @@ module Algolia
30
36
  {
31
37
  :minimum_detectable_effect => :"MinimumDetectableEffect",
32
38
  :filters => :"Array<MetricsFilter>",
33
- :error_correction => :"ErrorCorrectionType"
39
+ :error_correction => :"ErrorCorrectionType",
40
+ :method => :"AnalysisMethod",
41
+ :primary_metric => :"PrimaryMetric"
34
42
  }
35
43
  end
36
44
 
@@ -77,6 +85,14 @@ module Algolia
77
85
  if attributes.key?(:error_correction)
78
86
  self.error_correction = attributes[:error_correction]
79
87
  end
88
+
89
+ if attributes.key?(:method)
90
+ self.method = attributes[:method]
91
+ end
92
+
93
+ if attributes.key?(:primary_metric)
94
+ self.primary_metric = attributes[:primary_metric]
95
+ end
80
96
  end
81
97
 
82
98
  # Checks equality by comparing each attribute.
@@ -86,7 +102,9 @@ module Algolia
86
102
  self.class == other.class &&
87
103
  minimum_detectable_effect == other.minimum_detectable_effect &&
88
104
  filters == other.filters &&
89
- error_correction == other.error_correction
105
+ error_correction == other.error_correction &&
106
+ method == other.method &&
107
+ primary_metric == other.primary_metric
90
108
  end
91
109
 
92
110
  # @see the `==` method
@@ -98,7 +116,7 @@ module Algolia
98
116
  # Calculates hash code according to all attributes.
99
117
  # @return [Integer] Hash code
100
118
  def hash
101
- [minimum_detectable_effect, filters, error_correction].hash
119
+ [minimum_detectable_effect, filters, error_correction, method, primary_metric].hash
102
120
  end
103
121
 
104
122
  # Builds the object from hash