Class: SoilSidekick::AIServicesApi
- Inherits:
-
Object
- Object
- SoilSidekick::AIServicesApi
- Defined in:
- lib/soilsidekick/api/ai_services_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#generate_smart_report_summary(generate_smart_report_summary_request, opts = {}) ⇒ SmartReportSummary
Generate AI report summary Generate AI-powered summaries for soil or water quality reports.
-
#generate_smart_report_summary_with_http_info(generate_smart_report_summary_request, opts = {}) ⇒ Array<(SmartReportSummary, Integer, Hash)>
Generate AI report summary Generate AI-powered summaries for soil or water quality reports.
-
#get_agricultural_intelligence(get_agricultural_intelligence_request, opts = {}) ⇒ AIAnalysis
Get AI-powered agricultural insights Agricultural intelligence with AI recommendations.
-
#get_agricultural_intelligence_with_http_info(get_agricultural_intelligence_request, opts = {}) ⇒ Array<(AIAnalysis, Integer, Hash)>
Get AI-powered agricultural insights Agricultural intelligence with AI recommendations.
-
#get_seasonal_planning_assistant(get_seasonal_planning_assistant_request, opts = {}) ⇒ SeasonalPlanningResponse
Get seasonal planning recommendations AI-powered seasonal planning with weather integration.
-
#get_seasonal_planning_assistant_with_http_info(get_seasonal_planning_assistant_request, opts = {}) ⇒ Array<(SeasonalPlanningResponse, Integer, Hash)>
Get seasonal planning recommendations AI-powered seasonal planning with weather integration.
-
#initialize(api_client = ApiClient.default) ⇒ AIServicesApi
constructor
A new instance of AIServicesApi.
-
#visual_crop_analysis(visual_crop_analysis_request, opts = {}) ⇒ VisualCropAnalysis
Analyze crop images AI-powered visual crop analysis for pest detection, health assessment, and disease screening.
-
#visual_crop_analysis_with_http_info(visual_crop_analysis_request, opts = {}) ⇒ Array<(VisualCropAnalysis, Integer, Hash)>
Analyze crop images AI-powered visual crop analysis for pest detection, health assessment, and disease screening.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AIServicesApi
Returns a new instance of AIServicesApi.
19 20 21 |
# File 'lib/soilsidekick/api/ai_services_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/soilsidekick/api/ai_services_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#generate_smart_report_summary(generate_smart_report_summary_request, opts = {}) ⇒ SmartReportSummary
Generate AI report summary Generate AI-powered summaries for soil or water quality reports
30 31 32 33 |
# File 'lib/soilsidekick/api/ai_services_api.rb', line 30 def generate_smart_report_summary(generate_smart_report_summary_request, opts = {}) data, _status_code, _headers = generate_smart_report_summary_with_http_info(generate_smart_report_summary_request, opts) data end |
#generate_smart_report_summary_with_http_info(generate_smart_report_summary_request, opts = {}) ⇒ Array<(SmartReportSummary, Integer, Hash)>
Generate AI report summary Generate AI-powered summaries for soil or water quality reports
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/soilsidekick/api/ai_services_api.rb', line 43 def generate_smart_report_summary_with_http_info(generate_smart_report_summary_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIServicesApi.generate_smart_report_summary ...' end # verify the required parameter 'generate_smart_report_summary_request' is set if @api_client.config.client_side_validation && generate_smart_report_summary_request.nil? fail ArgumentError, "Missing the required parameter 'generate_smart_report_summary_request' when calling AIServicesApi.generate_smart_report_summary" end allowable_values = [4096, 8192, 16384, 24576] if @api_client.config.client_side_validation && opts[:'x_tq_context_mode'] && !allowable_values.include?(opts[:'x_tq_context_mode']) fail ArgumentError, "invalid value for \"x_tq_context_mode\", must be one of #{allowable_values}" end allowable_values = ["none", "reuse", "persist"] if @api_client.config.client_side_validation && opts[:'x_tq_kv_cache_hint'] && !allowable_values.include?(opts[:'x_tq_kv_cache_hint']) fail ArgumentError, "invalid value for \"x_tq_kv_cache_hint\", must be one of #{allowable_values}" end allowable_values = ["auto", "gemma-2b", "gemma-7b", "gemma-7b-tq"] if @api_client.config.client_side_validation && opts[:'x_tq_model_tier'] && !allowable_values.include?(opts[:'x_tq_model_tier']) fail ArgumentError, "invalid value for \"x_tq_model_tier\", must be one of #{allowable_values}" end # resource path local_var_path = '/smart-report-summary' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'x-tq-context-mode'] = opts[:'x_tq_context_mode'] if !opts[:'x_tq_context_mode'].nil? header_params[:'x-tq-kv-cache-hint'] = opts[:'x_tq_kv_cache_hint'] if !opts[:'x_tq_kv_cache_hint'].nil? header_params[:'x-tq-model-tier'] = opts[:'x_tq_model_tier'] if !opts[:'x_tq_model_tier'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_smart_report_summary_request) # return_type return_type = opts[:debug_return_type] || 'SmartReportSummary' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"AIServicesApi.generate_smart_report_summary", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIServicesApi#generate_smart_report_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_agricultural_intelligence(get_agricultural_intelligence_request, opts = {}) ⇒ AIAnalysis
Get AI-powered agricultural insights Agricultural intelligence with AI recommendations
119 120 121 122 |
# File 'lib/soilsidekick/api/ai_services_api.rb', line 119 def get_agricultural_intelligence(get_agricultural_intelligence_request, opts = {}) data, _status_code, _headers = get_agricultural_intelligence_with_http_info(get_agricultural_intelligence_request, opts) data end |
#get_agricultural_intelligence_with_http_info(get_agricultural_intelligence_request, opts = {}) ⇒ Array<(AIAnalysis, Integer, Hash)>
Get AI-powered agricultural insights Agricultural intelligence with AI recommendations
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/soilsidekick/api/ai_services_api.rb', line 132 def get_agricultural_intelligence_with_http_info(get_agricultural_intelligence_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIServicesApi.get_agricultural_intelligence ...' end # verify the required parameter 'get_agricultural_intelligence_request' is set if @api_client.config.client_side_validation && get_agricultural_intelligence_request.nil? fail ArgumentError, "Missing the required parameter 'get_agricultural_intelligence_request' when calling AIServicesApi.get_agricultural_intelligence" end allowable_values = [4096, 8192, 16384, 24576] if @api_client.config.client_side_validation && opts[:'x_tq_context_mode'] && !allowable_values.include?(opts[:'x_tq_context_mode']) fail ArgumentError, "invalid value for \"x_tq_context_mode\", must be one of #{allowable_values}" end allowable_values = ["none", "reuse", "persist"] if @api_client.config.client_side_validation && opts[:'x_tq_kv_cache_hint'] && !allowable_values.include?(opts[:'x_tq_kv_cache_hint']) fail ArgumentError, "invalid value for \"x_tq_kv_cache_hint\", must be one of #{allowable_values}" end allowable_values = ["auto", "gemma-2b", "gemma-7b", "gemma-7b-tq"] if @api_client.config.client_side_validation && opts[:'x_tq_model_tier'] && !allowable_values.include?(opts[:'x_tq_model_tier']) fail ArgumentError, "invalid value for \"x_tq_model_tier\", must be one of #{allowable_values}" end # resource path local_var_path = '/agricultural-intelligence' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'x-tq-context-mode'] = opts[:'x_tq_context_mode'] if !opts[:'x_tq_context_mode'].nil? header_params[:'x-tq-kv-cache-hint'] = opts[:'x_tq_kv_cache_hint'] if !opts[:'x_tq_kv_cache_hint'].nil? header_params[:'x-tq-model-tier'] = opts[:'x_tq_model_tier'] if !opts[:'x_tq_model_tier'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(get_agricultural_intelligence_request) # return_type return_type = opts[:debug_return_type] || 'AIAnalysis' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"AIServicesApi.get_agricultural_intelligence", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIServicesApi#get_agricultural_intelligence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_seasonal_planning_assistant(get_seasonal_planning_assistant_request, opts = {}) ⇒ SeasonalPlanningResponse
Get seasonal planning recommendations AI-powered seasonal planning with weather integration
208 209 210 211 |
# File 'lib/soilsidekick/api/ai_services_api.rb', line 208 def get_seasonal_planning_assistant(get_seasonal_planning_assistant_request, opts = {}) data, _status_code, _headers = get_seasonal_planning_assistant_with_http_info(get_seasonal_planning_assistant_request, opts) data end |
#get_seasonal_planning_assistant_with_http_info(get_seasonal_planning_assistant_request, opts = {}) ⇒ Array<(SeasonalPlanningResponse, Integer, Hash)>
Get seasonal planning recommendations AI-powered seasonal planning with weather integration
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/soilsidekick/api/ai_services_api.rb', line 221 def get_seasonal_planning_assistant_with_http_info(get_seasonal_planning_assistant_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIServicesApi.get_seasonal_planning_assistant ...' end # verify the required parameter 'get_seasonal_planning_assistant_request' is set if @api_client.config.client_side_validation && get_seasonal_planning_assistant_request.nil? fail ArgumentError, "Missing the required parameter 'get_seasonal_planning_assistant_request' when calling AIServicesApi.get_seasonal_planning_assistant" end allowable_values = [4096, 8192, 16384, 24576] if @api_client.config.client_side_validation && opts[:'x_tq_context_mode'] && !allowable_values.include?(opts[:'x_tq_context_mode']) fail ArgumentError, "invalid value for \"x_tq_context_mode\", must be one of #{allowable_values}" end allowable_values = ["none", "reuse", "persist"] if @api_client.config.client_side_validation && opts[:'x_tq_kv_cache_hint'] && !allowable_values.include?(opts[:'x_tq_kv_cache_hint']) fail ArgumentError, "invalid value for \"x_tq_kv_cache_hint\", must be one of #{allowable_values}" end allowable_values = ["auto", "gemma-2b", "gemma-7b", "gemma-7b-tq"] if @api_client.config.client_side_validation && opts[:'x_tq_model_tier'] && !allowable_values.include?(opts[:'x_tq_model_tier']) fail ArgumentError, "invalid value for \"x_tq_model_tier\", must be one of #{allowable_values}" end # resource path local_var_path = '/seasonal-planning-assistant' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'x-tq-context-mode'] = opts[:'x_tq_context_mode'] if !opts[:'x_tq_context_mode'].nil? header_params[:'x-tq-kv-cache-hint'] = opts[:'x_tq_kv_cache_hint'] if !opts[:'x_tq_kv_cache_hint'].nil? header_params[:'x-tq-model-tier'] = opts[:'x_tq_model_tier'] if !opts[:'x_tq_model_tier'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(get_seasonal_planning_assistant_request) # return_type return_type = opts[:debug_return_type] || 'SeasonalPlanningResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"AIServicesApi.get_seasonal_planning_assistant", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIServicesApi#get_seasonal_planning_assistant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#visual_crop_analysis(visual_crop_analysis_request, opts = {}) ⇒ VisualCropAnalysis
Analyze crop images AI-powered visual crop analysis for pest detection, health assessment, and disease screening
297 298 299 300 |
# File 'lib/soilsidekick/api/ai_services_api.rb', line 297 def visual_crop_analysis(visual_crop_analysis_request, opts = {}) data, _status_code, _headers = visual_crop_analysis_with_http_info(visual_crop_analysis_request, opts) data end |
#visual_crop_analysis_with_http_info(visual_crop_analysis_request, opts = {}) ⇒ Array<(VisualCropAnalysis, Integer, Hash)>
Analyze crop images AI-powered visual crop analysis for pest detection, health assessment, and disease screening
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/soilsidekick/api/ai_services_api.rb', line 310 def visual_crop_analysis_with_http_info(visual_crop_analysis_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIServicesApi.visual_crop_analysis ...' end # verify the required parameter 'visual_crop_analysis_request' is set if @api_client.config.client_side_validation && visual_crop_analysis_request.nil? fail ArgumentError, "Missing the required parameter 'visual_crop_analysis_request' when calling AIServicesApi.visual_crop_analysis" end allowable_values = [4096, 8192, 16384, 24576] if @api_client.config.client_side_validation && opts[:'x_tq_context_mode'] && !allowable_values.include?(opts[:'x_tq_context_mode']) fail ArgumentError, "invalid value for \"x_tq_context_mode\", must be one of #{allowable_values}" end allowable_values = ["none", "reuse", "persist"] if @api_client.config.client_side_validation && opts[:'x_tq_kv_cache_hint'] && !allowable_values.include?(opts[:'x_tq_kv_cache_hint']) fail ArgumentError, "invalid value for \"x_tq_kv_cache_hint\", must be one of #{allowable_values}" end allowable_values = ["auto", "gemma-2b", "gemma-7b", "gemma-7b-tq"] if @api_client.config.client_side_validation && opts[:'x_tq_model_tier'] && !allowable_values.include?(opts[:'x_tq_model_tier']) fail ArgumentError, "invalid value for \"x_tq_model_tier\", must be one of #{allowable_values}" end # resource path local_var_path = '/visual-crop-analysis' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'x-tq-context-mode'] = opts[:'x_tq_context_mode'] if !opts[:'x_tq_context_mode'].nil? header_params[:'x-tq-kv-cache-hint'] = opts[:'x_tq_kv_cache_hint'] if !opts[:'x_tq_kv_cache_hint'].nil? header_params[:'x-tq-model-tier'] = opts[:'x_tq_model_tier'] if !opts[:'x_tq_model_tier'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(visual_crop_analysis_request) # return_type return_type = opts[:debug_return_type] || 'VisualCropAnalysis' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"AIServicesApi.visual_crop_analysis", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIServicesApi#visual_crop_analysis\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |