soilsidekick 3.0.0
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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +267 -0
- data/Rakefile +10 -0
- data/docs/AIAnalysis.md +22 -0
- data/docs/AIAnalysisRecommendationsInner.md +22 -0
- data/docs/AIServicesApi.md +327 -0
- data/docs/BeginnerGuidance.md +34 -0
- data/docs/BeginnerGuidanceDetailedExplanation.md +24 -0
- data/docs/BeginnerGuidanceMetadata.md +22 -0
- data/docs/BeginnerGuidanceRequest.md +24 -0
- data/docs/BeginnerGuidanceRequestLocation.md +20 -0
- data/docs/BeginnerGuidanceRequestPlantContext.md +20 -0
- data/docs/CalculateCarbonCreditsRequest.md +26 -0
- data/docs/CalculateEnvironmentalImpactRequest.md +26 -0
- data/docs/CalculateEnvironmentalImpactRequestProposedTreatmentsInner.md +18 -0
- data/docs/CalculateEnvironmentalImpactRequestSoilData.md +28 -0
- data/docs/CalculateEnvironmentalImpactRequestWaterBodyData.md +18 -0
- data/docs/CarbonApi.md +79 -0
- data/docs/CarbonCreditCalculation.md +22 -0
- data/docs/CarbonCreditCalculationCalculationDetails.md +28 -0
- data/docs/CarbonCreditCalculationCalculationDetailsMetadata.md +22 -0
- data/docs/CarbonCreditCalculationCreditRecord.md +26 -0
- data/docs/ConsumerPlantCareApi.md +247 -0
- data/docs/County.md +26 -0
- data/docs/CountyLookup200Response.md +18 -0
- data/docs/CountyLookupRequest.md +18 -0
- data/docs/DynamicCare.md +28 -0
- data/docs/DynamicCareCareRecommendations.md +24 -0
- data/docs/DynamicCareCareRecommendationsHumidity.md +22 -0
- data/docs/DynamicCareCareRecommendationsLight.md +22 -0
- data/docs/DynamicCareCareRecommendationsWatering.md +24 -0
- data/docs/DynamicCareCurrentConditions.md +26 -0
- data/docs/DynamicCareMetadata.md +22 -0
- data/docs/DynamicCarePlant.md +22 -0
- data/docs/DynamicCareRequest.md +28 -0
- data/docs/DynamicCareRequestContainerDetails.md +22 -0
- data/docs/DynamicCareRequestEnvironment.md +20 -0
- data/docs/DynamicCareRequestLocation.md +22 -0
- data/docs/EnvironmentalApi.md +87 -0
- data/docs/EnvironmentalImpact.md +22 -0
- data/docs/EnvironmentalImpactDetailedAnalysis.md +26 -0
- data/docs/EnvironmentalImpactDetailedAnalysisEcoAlternatives.md +18 -0
- data/docs/EnvironmentalImpactDetailedAnalysisEcoAlternativesAlternativesInner.md +26 -0
- data/docs/EnvironmentalImpactDetailedAnalysisRunoffRisk.md +22 -0
- data/docs/EnvironmentalImpactImpactAssessment.md +26 -0
- data/docs/Error.md +22 -0
- data/docs/GenerateSmartReportSummaryRequest.md +20 -0
- data/docs/GenerateVRTPrescriptionRequest.md +22 -0
- data/docs/GeographicApi.md +79 -0
- data/docs/GetAgriculturalIntelligenceRequest.md +20 -0
- data/docs/GetLiveAgriculturalDataRequest.md +24 -0
- data/docs/GetPlantingCalendarRequest.md +20 -0
- data/docs/GetSatelliteDataRequest.md +20 -0
- data/docs/GetSeasonalPlanningAssistantRequest.md +26 -0
- data/docs/GetSeasonalPlanningAssistantRequestLocation.md +22 -0
- data/docs/GetSoilDataRequest.md +18 -0
- data/docs/GetTerritorialWaterAnalyticsRequest.md +22 -0
- data/docs/GetTerritorialWaterAnalyticsRequestDateRange.md +20 -0
- data/docs/LeafEnginesApi.md +87 -0
- data/docs/LeafEnginesCompatibility.md +22 -0
- data/docs/LeafEnginesCompatibilityData.md +32 -0
- data/docs/LeafEnginesCompatibilityDataBreakdown.md +22 -0
- data/docs/LeafEnginesCompatibilityDataBreakdownSoil.md +22 -0
- data/docs/LeafEnginesCompatibilityDataMetadata.md +22 -0
- data/docs/LeafEnginesCompatibilityUsage.md +20 -0
- data/docs/LeafenginesQueryRequest.md +22 -0
- data/docs/LeafenginesQueryRequestLocation.md +24 -0
- data/docs/LeafenginesQueryRequestOptions.md +22 -0
- data/docs/LeafenginesQueryRequestPlant.md +24 -0
- data/docs/LeafenginesQueryRequestPlantCareRequirements.md +22 -0
- data/docs/LeafenginesQueryRequestPlantCareRequirementsSoilPhRange.md +20 -0
- data/docs/LiveAgriculturalData.md +30 -0
- data/docs/LiveAgriculturalDataData.md +24 -0
- data/docs/PlantingCalendar.md +26 -0
- data/docs/SafeIdentification.md +26 -0
- data/docs/SafeIdentificationConfidenceBreakdown.md +24 -0
- data/docs/SafeIdentificationIdentification.md +22 -0
- data/docs/SafeIdentificationIdentificationPrimaryMatch.md +24 -0
- data/docs/SafeIdentificationMetadata.md +22 -0
- data/docs/SafeIdentificationRequest.md +22 -0
- data/docs/SafeIdentificationRequestContext.md +22 -0
- data/docs/SafeIdentificationRequestLocation.md +22 -0
- data/docs/SafeIdentificationRequestLocationCoordinates.md +20 -0
- data/docs/SafeIdentificationSafetyAnalysis.md +24 -0
- data/docs/SafeIdentificationSafetyAnalysisLookalikesInner.md +24 -0
- data/docs/SatelliteData.md +26 -0
- data/docs/SatelliteDataApi.md +79 -0
- data/docs/SeasonalPlanningResponse.md +24 -0
- data/docs/SeasonalPlanningResponseRecommendations.md +22 -0
- data/docs/SeasonalPlanningResponseWeatherData.md +28 -0
- data/docs/SmartReportSummary.md +22 -0
- data/docs/SmartReportSummarySummary.md +24 -0
- data/docs/SoilAnalysisApi.md +231 -0
- data/docs/SoilData.md +38 -0
- data/docs/TerritorialWaterAnalytics.md +22 -0
- data/docs/TerritorialWaterAnalyticsAnalytics.md +24 -0
- data/docs/TurboQuantApi.md +87 -0
- data/docs/TurboQuantCapabilities.md +30 -0
- data/docs/TurboQuantCapabilitiesEstimatedLatencyMs.md +20 -0
- data/docs/TurboQuantCapabilitiesRequest.md +22 -0
- data/docs/VRTApi.md +79 -0
- data/docs/VRTPrescription.md +24 -0
- data/docs/VRTPrescriptionZonesInner.md +22 -0
- data/docs/VisualCropAnalysis.md +24 -0
- data/docs/VisualCropAnalysisAnalysis.md +26 -0
- data/docs/VisualCropAnalysisRequest.md +24 -0
- data/docs/VisualCropAnalysisRequestLocation.md +22 -0
- data/docs/WaterQuality.md +30 -0
- data/docs/WaterQualityApi.md +151 -0
- data/git_push.sh +57 -0
- data/lib/soilsidekick/api/ai_services_api.rb +378 -0
- data/lib/soilsidekick/api/carbon_api.rb +90 -0
- data/lib/soilsidekick/api/consumer_plant_care_api.rb +289 -0
- data/lib/soilsidekick/api/environmental_api.rb +111 -0
- data/lib/soilsidekick/api/geographic_api.rb +90 -0
- data/lib/soilsidekick/api/leaf_engines_api.rb +111 -0
- data/lib/soilsidekick/api/satellite_data_api.rb +90 -0
- data/lib/soilsidekick/api/soil_analysis_api.rb +247 -0
- data/lib/soilsidekick/api/turbo_quant_api.rb +111 -0
- data/lib/soilsidekick/api/vrt_api.rb +90 -0
- data/lib/soilsidekick/api/water_quality_api.rb +158 -0
- data/lib/soilsidekick/api_client.rb +397 -0
- data/lib/soilsidekick/api_error.rb +58 -0
- data/lib/soilsidekick/api_model_base.rb +88 -0
- data/lib/soilsidekick/configuration.rb +312 -0
- data/lib/soilsidekick/models/ai_analysis.rb +167 -0
- data/lib/soilsidekick/models/ai_analysis_recommendations_inner.rb +199 -0
- data/lib/soilsidekick/models/beginner_guidance.rb +228 -0
- data/lib/soilsidekick/models/beginner_guidance_detailed_explanation.rb +179 -0
- data/lib/soilsidekick/models/beginner_guidance_metadata.rb +165 -0
- data/lib/soilsidekick/models/beginner_guidance_request.rb +229 -0
- data/lib/soilsidekick/models/beginner_guidance_request_location.rb +156 -0
- data/lib/soilsidekick/models/beginner_guidance_request_plant_context.rb +158 -0
- data/lib/soilsidekick/models/calculate_carbon_credits_request.rb +264 -0
- data/lib/soilsidekick/models/calculate_environmental_impact_request.rb +247 -0
- data/lib/soilsidekick/models/calculate_environmental_impact_request_proposed_treatments_inner.rb +181 -0
- data/lib/soilsidekick/models/calculate_environmental_impact_request_soil_data.rb +238 -0
- data/lib/soilsidekick/models/calculate_environmental_impact_request_water_body_data.rb +147 -0
- data/lib/soilsidekick/models/carbon_credit_calculation.rb +165 -0
- data/lib/soilsidekick/models/carbon_credit_calculation_calculation_details.rb +192 -0
- data/lib/soilsidekick/models/carbon_credit_calculation_calculation_details_metadata.rb +167 -0
- data/lib/soilsidekick/models/carbon_credit_calculation_credit_record.rb +217 -0
- data/lib/soilsidekick/models/county.rb +183 -0
- data/lib/soilsidekick/models/county_lookup200_response.rb +149 -0
- data/lib/soilsidekick/models/county_lookup_request.rb +183 -0
- data/lib/soilsidekick/models/dynamic_care.rb +196 -0
- data/lib/soilsidekick/models/dynamic_care_care_recommendations.rb +175 -0
- data/lib/soilsidekick/models/dynamic_care_care_recommendations_humidity.rb +165 -0
- data/lib/soilsidekick/models/dynamic_care_care_recommendations_light.rb +165 -0
- data/lib/soilsidekick/models/dynamic_care_care_recommendations_watering.rb +208 -0
- data/lib/soilsidekick/models/dynamic_care_current_conditions.rb +183 -0
- data/lib/soilsidekick/models/dynamic_care_metadata.rb +165 -0
- data/lib/soilsidekick/models/dynamic_care_plant.rb +199 -0
- data/lib/soilsidekick/models/dynamic_care_request.rb +262 -0
- data/lib/soilsidekick/models/dynamic_care_request_container_details.rb +199 -0
- data/lib/soilsidekick/models/dynamic_care_request_environment.rb +203 -0
- data/lib/soilsidekick/models/dynamic_care_request_location.rb +194 -0
- data/lib/soilsidekick/models/environmental_impact.rb +167 -0
- data/lib/soilsidekick/models/environmental_impact_detailed_analysis.rb +183 -0
- data/lib/soilsidekick/models/environmental_impact_detailed_analysis_eco_alternatives.rb +149 -0
- data/lib/soilsidekick/models/environmental_impact_detailed_analysis_eco_alternatives_alternatives_inner.rb +183 -0
- data/lib/soilsidekick/models/environmental_impact_detailed_analysis_runoff_risk.rb +199 -0
- data/lib/soilsidekick/models/environmental_impact_impact_assessment.rb +183 -0
- data/lib/soilsidekick/models/error.rb +165 -0
- data/lib/soilsidekick/models/generate_smart_report_summary_request.rb +215 -0
- data/lib/soilsidekick/models/generate_vrt_prescription_request.rb +223 -0
- data/lib/soilsidekick/models/get_agricultural_intelligence_request.rb +225 -0
- data/lib/soilsidekick/models/get_live_agricultural_data_request.rb +277 -0
- data/lib/soilsidekick/models/get_planting_calendar_request.rb +201 -0
- data/lib/soilsidekick/models/get_satellite_data_request.rb +226 -0
- data/lib/soilsidekick/models/get_seasonal_planning_assistant_request.rb +245 -0
- data/lib/soilsidekick/models/get_seasonal_planning_assistant_request_location.rb +165 -0
- data/lib/soilsidekick/models/get_soil_data_request.rb +176 -0
- data/lib/soilsidekick/models/get_territorial_water_analytics_request.rb +201 -0
- data/lib/soilsidekick/models/get_territorial_water_analytics_request_date_range.rb +156 -0
- data/lib/soilsidekick/models/leaf_engines_compatibility.rb +165 -0
- data/lib/soilsidekick/models/leaf_engines_compatibility_data.rb +247 -0
- data/lib/soilsidekick/models/leaf_engines_compatibility_data_breakdown.rb +165 -0
- data/lib/soilsidekick/models/leaf_engines_compatibility_data_breakdown_soil.rb +169 -0
- data/lib/soilsidekick/models/leaf_engines_compatibility_data_metadata.rb +167 -0
- data/lib/soilsidekick/models/leaf_engines_compatibility_usage.rb +156 -0
- data/lib/soilsidekick/models/leafengines_query_request.rb +199 -0
- data/lib/soilsidekick/models/leafengines_query_request_location.rb +174 -0
- data/lib/soilsidekick/models/leafengines_query_request_options.rb +165 -0
- data/lib/soilsidekick/models/leafengines_query_request_plant.rb +174 -0
- data/lib/soilsidekick/models/leafengines_query_request_plant_care_requirements.rb +211 -0
- data/lib/soilsidekick/models/leafengines_query_request_plant_care_requirements_soil_ph_range.rb +156 -0
- data/lib/soilsidekick/models/live_agricultural_data.rb +237 -0
- data/lib/soilsidekick/models/live_agricultural_data_data.rb +174 -0
- data/lib/soilsidekick/models/planting_calendar.rb +185 -0
- data/lib/soilsidekick/models/safe_identification.rb +184 -0
- data/lib/soilsidekick/models/safe_identification_confidence_breakdown.rb +174 -0
- data/lib/soilsidekick/models/safe_identification_identification.rb +200 -0
- data/lib/soilsidekick/models/safe_identification_identification_primary_match.rb +175 -0
- data/lib/soilsidekick/models/safe_identification_metadata.rb +167 -0
- data/lib/soilsidekick/models/safe_identification_request.rb +183 -0
- data/lib/soilsidekick/models/safe_identification_request_context.rb +223 -0
- data/lib/soilsidekick/models/safe_identification_request_location.rb +205 -0
- data/lib/soilsidekick/models/safe_identification_request_location_coordinates.rb +156 -0
- data/lib/soilsidekick/models/safe_identification_safety_analysis.rb +215 -0
- data/lib/soilsidekick/models/safe_identification_safety_analysis_lookalikes_inner.rb +177 -0
- data/lib/soilsidekick/models/satellite_data.rb +185 -0
- data/lib/soilsidekick/models/seasonal_planning_response.rb +174 -0
- data/lib/soilsidekick/models/seasonal_planning_response_recommendations.rb +169 -0
- data/lib/soilsidekick/models/seasonal_planning_response_weather_data.rb +192 -0
- data/lib/soilsidekick/models/smart_report_summary.rb +165 -0
- data/lib/soilsidekick/models/smart_report_summary_summary.rb +178 -0
- data/lib/soilsidekick/models/soil_data.rb +239 -0
- data/lib/soilsidekick/models/territorial_water_analytics.rb +165 -0
- data/lib/soilsidekick/models/territorial_water_analytics_analytics.rb +174 -0
- data/lib/soilsidekick/models/turbo_quant_capabilities.rb +253 -0
- data/lib/soilsidekick/models/turbo_quant_capabilities_estimated_latency_ms.rb +156 -0
- data/lib/soilsidekick/models/turbo_quant_capabilities_request.rb +201 -0
- data/lib/soilsidekick/models/visual_crop_analysis.rb +174 -0
- data/lib/soilsidekick/models/visual_crop_analysis_analysis.rb +219 -0
- data/lib/soilsidekick/models/visual_crop_analysis_request.rb +234 -0
- data/lib/soilsidekick/models/visual_crop_analysis_request_location.rb +165 -0
- data/lib/soilsidekick/models/vrt_prescription.rb +176 -0
- data/lib/soilsidekick/models/vrt_prescription_zones_inner.rb +165 -0
- data/lib/soilsidekick/models/water_quality.rb +235 -0
- data/lib/soilsidekick/version.rb +15 -0
- data/lib/soilsidekick.rb +146 -0
- data/soilsidekick.gemspec +39 -0
- data/spec/api/ai_services_api_spec.rb +95 -0
- data/spec/api/carbon_api_spec.rb +47 -0
- data/spec/api/consumer_plant_care_api_spec.rb +80 -0
- data/spec/api/environmental_api_spec.rb +50 -0
- data/spec/api/geographic_api_spec.rb +47 -0
- data/spec/api/leaf_engines_api_spec.rb +50 -0
- data/spec/api/satellite_data_api_spec.rb +47 -0
- data/spec/api/soil_analysis_api_spec.rb +74 -0
- data/spec/api/turbo_quant_api_spec.rb +50 -0
- data/spec/api/vrt_api_spec.rb +47 -0
- data/spec/api/water_quality_api_spec.rb +59 -0
- data/spec/models/ai_analysis_recommendations_inner_spec.rb +52 -0
- data/spec/models/ai_analysis_spec.rb +48 -0
- data/spec/models/beginner_guidance_detailed_explanation_spec.rb +54 -0
- data/spec/models/beginner_guidance_metadata_spec.rb +48 -0
- data/spec/models/beginner_guidance_request_location_spec.rb +42 -0
- data/spec/models/beginner_guidance_request_plant_context_spec.rb +42 -0
- data/spec/models/beginner_guidance_request_spec.rb +58 -0
- data/spec/models/beginner_guidance_spec.rb +84 -0
- data/spec/models/calculate_carbon_credits_request_spec.rb +64 -0
- data/spec/models/calculate_environmental_impact_request_proposed_treatments_inner_spec.rb +40 -0
- data/spec/models/calculate_environmental_impact_request_soil_data_spec.rb +74 -0
- data/spec/models/calculate_environmental_impact_request_spec.rb +60 -0
- data/spec/models/calculate_environmental_impact_request_water_body_data_spec.rb +36 -0
- data/spec/models/carbon_credit_calculation_calculation_details_metadata_spec.rb +48 -0
- data/spec/models/carbon_credit_calculation_calculation_details_spec.rb +66 -0
- data/spec/models/carbon_credit_calculation_credit_record_spec.rb +64 -0
- data/spec/models/carbon_credit_calculation_spec.rb +48 -0
- data/spec/models/county_lookup200_response_spec.rb +36 -0
- data/spec/models/county_lookup_request_spec.rb +36 -0
- data/spec/models/county_spec.rb +60 -0
- data/spec/models/dynamic_care_care_recommendations_humidity_spec.rb +48 -0
- data/spec/models/dynamic_care_care_recommendations_light_spec.rb +48 -0
- data/spec/models/dynamic_care_care_recommendations_spec.rb +54 -0
- data/spec/models/dynamic_care_care_recommendations_watering_spec.rb +58 -0
- data/spec/models/dynamic_care_current_conditions_spec.rb +60 -0
- data/spec/models/dynamic_care_metadata_spec.rb +48 -0
- data/spec/models/dynamic_care_plant_spec.rb +52 -0
- data/spec/models/dynamic_care_request_container_details_spec.rb +52 -0
- data/spec/models/dynamic_care_request_environment_spec.rb +50 -0
- data/spec/models/dynamic_care_request_location_spec.rb +48 -0
- data/spec/models/dynamic_care_request_spec.rb +70 -0
- data/spec/models/dynamic_care_spec.rb +66 -0
- data/spec/models/environmental_impact_detailed_analysis_eco_alternatives_alternatives_inner_spec.rb +60 -0
- data/spec/models/environmental_impact_detailed_analysis_eco_alternatives_spec.rb +36 -0
- data/spec/models/environmental_impact_detailed_analysis_runoff_risk_spec.rb +52 -0
- data/spec/models/environmental_impact_detailed_analysis_spec.rb +60 -0
- data/spec/models/environmental_impact_impact_assessment_spec.rb +60 -0
- data/spec/models/environmental_impact_spec.rb +48 -0
- data/spec/models/error_spec.rb +48 -0
- data/spec/models/generate_smart_report_summary_request_spec.rb +46 -0
- data/spec/models/generate_vrt_prescription_request_spec.rb +52 -0
- data/spec/models/get_agricultural_intelligence_request_spec.rb +46 -0
- data/spec/models/get_live_agricultural_data_request_spec.rb +58 -0
- data/spec/models/get_planting_calendar_request_spec.rb +42 -0
- data/spec/models/get_satellite_data_request_spec.rb +42 -0
- data/spec/models/get_seasonal_planning_assistant_request_location_spec.rb +48 -0
- data/spec/models/get_seasonal_planning_assistant_request_spec.rb +64 -0
- data/spec/models/get_soil_data_request_spec.rb +36 -0
- data/spec/models/get_territorial_water_analytics_request_date_range_spec.rb +42 -0
- data/spec/models/get_territorial_water_analytics_request_spec.rb +52 -0
- data/spec/models/leaf_engines_compatibility_data_breakdown_soil_spec.rb +48 -0
- data/spec/models/leaf_engines_compatibility_data_breakdown_spec.rb +48 -0
- data/spec/models/leaf_engines_compatibility_data_metadata_spec.rb +48 -0
- data/spec/models/leaf_engines_compatibility_data_spec.rb +82 -0
- data/spec/models/leaf_engines_compatibility_spec.rb +48 -0
- data/spec/models/leaf_engines_compatibility_usage_spec.rb +42 -0
- data/spec/models/leafengines_query_request_location_spec.rb +54 -0
- data/spec/models/leafengines_query_request_options_spec.rb +48 -0
- data/spec/models/leafengines_query_request_plant_care_requirements_soil_ph_range_spec.rb +42 -0
- data/spec/models/leafengines_query_request_plant_care_requirements_spec.rb +56 -0
- data/spec/models/leafengines_query_request_plant_spec.rb +54 -0
- data/spec/models/leafengines_query_request_spec.rb +48 -0
- data/spec/models/live_agricultural_data_data_spec.rb +54 -0
- data/spec/models/live_agricultural_data_spec.rb +76 -0
- data/spec/models/planting_calendar_spec.rb +60 -0
- data/spec/models/safe_identification_confidence_breakdown_spec.rb +54 -0
- data/spec/models/safe_identification_identification_primary_match_spec.rb +54 -0
- data/spec/models/safe_identification_identification_spec.rb +52 -0
- data/spec/models/safe_identification_metadata_spec.rb +48 -0
- data/spec/models/safe_identification_request_context_spec.rb +60 -0
- data/spec/models/safe_identification_request_location_coordinates_spec.rb +42 -0
- data/spec/models/safe_identification_request_location_spec.rb +48 -0
- data/spec/models/safe_identification_request_spec.rb +48 -0
- data/spec/models/safe_identification_safety_analysis_lookalikes_inner_spec.rb +54 -0
- data/spec/models/safe_identification_safety_analysis_spec.rb +58 -0
- data/spec/models/safe_identification_spec.rb +60 -0
- data/spec/models/satellite_data_spec.rb +60 -0
- data/spec/models/seasonal_planning_response_recommendations_spec.rb +48 -0
- data/spec/models/seasonal_planning_response_spec.rb +54 -0
- data/spec/models/seasonal_planning_response_weather_data_spec.rb +66 -0
- data/spec/models/smart_report_summary_spec.rb +48 -0
- data/spec/models/smart_report_summary_summary_spec.rb +54 -0
- data/spec/models/soil_data_spec.rb +96 -0
- data/spec/models/territorial_water_analytics_analytics_spec.rb +54 -0
- data/spec/models/territorial_water_analytics_spec.rb +48 -0
- data/spec/models/turbo_quant_capabilities_estimated_latency_ms_spec.rb +42 -0
- data/spec/models/turbo_quant_capabilities_request_spec.rb +52 -0
- data/spec/models/turbo_quant_capabilities_spec.rb +80 -0
- data/spec/models/visual_crop_analysis_analysis_spec.rb +64 -0
- data/spec/models/visual_crop_analysis_request_location_spec.rb +48 -0
- data/spec/models/visual_crop_analysis_request_spec.rb +58 -0
- data/spec/models/visual_crop_analysis_spec.rb +54 -0
- data/spec/models/vrt_prescription_spec.rb +54 -0
- data/spec/models/vrt_prescription_zones_inner_spec.rb +48 -0
- data/spec/models/water_quality_spec.rb +76 -0
- data/spec/spec_helper.rb +111 -0
- metadata +543 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SoilSidekick Pro API
|
|
3
|
+
|
|
4
|
+
#Agricultural intelligence and soil analysis API with tier-based access control. ## What's New in 1.2.0 - **Consumer Plant Care APIs**: Three new endpoints addressing top pain points in plant ID apps: - `/safe-identification`: Toxic lookalike warnings and environmental context - `/dynamic-care`: Hyper-localized, real-time care recommendations - `/beginner-guidance`: Judgment-free, jargon-free plant guidance ## Authentication All endpoints require an API key passed via the `x-api-key` header: ``` x-api-key: ak_your_api_key_here ``` API keys are generated through the dashboard and use the `ak_*` format. ## Rate Limiting Rate limits are enforced based on your subscription tier: - **Free**: 10 req/min, 100 req/hour, 1,000 req/day - **Starter**: 30 req/min, 500 req/hour, 5,000 req/day - **Pro**: 100 req/min, 2,000 req/hour, 25,000 req/day - **Enterprise**: 500 req/min, 10,000 req/hour, 100,000 req/day Rate limit information is returned in response headers: - `X-RateLimit-Limit`: Maximum requests in window - `X-RateLimit-Remaining`: Remaining requests in window - `X-RateLimit-Reset`: Unix timestamp when limit resets ## Response Time SLAs All endpoints return response time headers for performance monitoring: - `X-Response-Time`: Human-readable response time (e.g., \"245ms\") - `X-Response-Time-Ms`: Response time in milliseconds - `X-Response-Time-Target`: Target response time for this endpoint - `X-Response-Time-Max`: Maximum acceptable response time - `X-Response-Time-Status`: Performance status (`optimal`, `acceptable`, `exceeded`) ### Response Time Targets by Category | Category | Target | Maximum | Endpoints | |----------|--------|---------|-----------| | **Fast** | 200ms | 500ms | county-lookup, check-subscription | | **Standard** | 500ms | 1,500ms | get-soil-data, territorial-water-quality | | **Complex** | 2,000ms | 5,000ms | agricultural-intelligence, gpt5-chat, visual-crop-analysis | | **Heavy** | 5,000ms | 15,000ms | live-agricultural-data, generate-vrt-prescription |
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
|
7
|
+
Contact: support@soilsidekickpro.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module SoilSidekick
|
|
16
|
+
class ConsumerPlantCareApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Beginner-friendly plant guidance without jargon
|
|
23
|
+
# Judgment-free, accessible plant guidance that solves community gatekeeping issues. This endpoint: - Translates scientific jargon into plain language - Never makes users feel stupid for asking about common plants - Uses progressive disclosure (simple answer first, details on request) - Provides encouraging, supportive tone - Offers practical \"what do I do right now\" guidance
|
|
24
|
+
# @param beginner_guidance_request [BeginnerGuidanceRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [Integer] :x_tq_context_mode TurboQuant extended context window size (tokens). With 3-bit KV cache, context windows up to 24K tokens are feasible within the same memory budget as standard 4K. (default to 4096)
|
|
27
|
+
# @option opts [String] :x_tq_kv_cache_hint KV cache management hint. - `none`: No caching (default) - `reuse`: Reuse KV cache from previous request in same session (40-60% compute savings) - `persist`: Persist cache to disk for cross-session reuse (default to 'none')
|
|
28
|
+
# @option opts [String] :x_tq_model_tier Preferred model tier for inference. - `auto`: Server selects optimal model based on device capabilities - `gemma-2b`: Lightweight model (~0.5GB KV with TQ) - `gemma-7b`: Full model, standard KV cache - `gemma-7b-tq`: Full model with TurboQuant 3-bit KV cache (~1.3GB) (default to 'auto')
|
|
29
|
+
# @return [BeginnerGuidance]
|
|
30
|
+
def beginner_guidance(beginner_guidance_request, opts = {})
|
|
31
|
+
data, _status_code, _headers = beginner_guidance_with_http_info(beginner_guidance_request, opts)
|
|
32
|
+
data
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Beginner-friendly plant guidance without jargon
|
|
36
|
+
# Judgment-free, accessible plant guidance that solves community gatekeeping issues. This endpoint: - Translates scientific jargon into plain language - Never makes users feel stupid for asking about common plants - Uses progressive disclosure (simple answer first, details on request) - Provides encouraging, supportive tone - Offers practical \"what do I do right now\" guidance
|
|
37
|
+
# @param beginner_guidance_request [BeginnerGuidanceRequest]
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [Integer] :x_tq_context_mode TurboQuant extended context window size (tokens). With 3-bit KV cache, context windows up to 24K tokens are feasible within the same memory budget as standard 4K. (default to 4096)
|
|
40
|
+
# @option opts [String] :x_tq_kv_cache_hint KV cache management hint. - `none`: No caching (default) - `reuse`: Reuse KV cache from previous request in same session (40-60% compute savings) - `persist`: Persist cache to disk for cross-session reuse (default to 'none')
|
|
41
|
+
# @option opts [String] :x_tq_model_tier Preferred model tier for inference. - `auto`: Server selects optimal model based on device capabilities - `gemma-2b`: Lightweight model (~0.5GB KV with TQ) - `gemma-7b`: Full model, standard KV cache - `gemma-7b-tq`: Full model with TurboQuant 3-bit KV cache (~1.3GB) (default to 'auto')
|
|
42
|
+
# @return [Array<(BeginnerGuidance, Integer, Hash)>] BeginnerGuidance data, response status code and response headers
|
|
43
|
+
def beginner_guidance_with_http_info(beginner_guidance_request, opts = {})
|
|
44
|
+
if @api_client.config.debugging
|
|
45
|
+
@api_client.config.logger.debug 'Calling API: ConsumerPlantCareApi.beginner_guidance ...'
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'beginner_guidance_request' is set
|
|
48
|
+
if @api_client.config.client_side_validation && beginner_guidance_request.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'beginner_guidance_request' when calling ConsumerPlantCareApi.beginner_guidance"
|
|
50
|
+
end
|
|
51
|
+
allowable_values = [4096, 8192, 16384, 24576]
|
|
52
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_context_mode'] && !allowable_values.include?(opts[:'x_tq_context_mode'])
|
|
53
|
+
fail ArgumentError, "invalid value for \"x_tq_context_mode\", must be one of #{allowable_values}"
|
|
54
|
+
end
|
|
55
|
+
allowable_values = ["none", "reuse", "persist"]
|
|
56
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_kv_cache_hint'] && !allowable_values.include?(opts[:'x_tq_kv_cache_hint'])
|
|
57
|
+
fail ArgumentError, "invalid value for \"x_tq_kv_cache_hint\", must be one of #{allowable_values}"
|
|
58
|
+
end
|
|
59
|
+
allowable_values = ["auto", "gemma-2b", "gemma-7b", "gemma-7b-tq"]
|
|
60
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_model_tier'] && !allowable_values.include?(opts[:'x_tq_model_tier'])
|
|
61
|
+
fail ArgumentError, "invalid value for \"x_tq_model_tier\", must be one of #{allowable_values}"
|
|
62
|
+
end
|
|
63
|
+
# resource path
|
|
64
|
+
local_var_path = '/beginner-guidance'
|
|
65
|
+
|
|
66
|
+
# query parameters
|
|
67
|
+
query_params = opts[:query_params] || {}
|
|
68
|
+
|
|
69
|
+
# header parameters
|
|
70
|
+
header_params = opts[:header_params] || {}
|
|
71
|
+
# HTTP header 'Accept' (if needed)
|
|
72
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
73
|
+
# HTTP header 'Content-Type'
|
|
74
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
75
|
+
if !content_type.nil?
|
|
76
|
+
header_params['Content-Type'] = content_type
|
|
77
|
+
end
|
|
78
|
+
header_params[:'x-tq-context-mode'] = opts[:'x_tq_context_mode'] if !opts[:'x_tq_context_mode'].nil?
|
|
79
|
+
header_params[:'x-tq-kv-cache-hint'] = opts[:'x_tq_kv_cache_hint'] if !opts[:'x_tq_kv_cache_hint'].nil?
|
|
80
|
+
header_params[:'x-tq-model-tier'] = opts[:'x_tq_model_tier'] if !opts[:'x_tq_model_tier'].nil?
|
|
81
|
+
|
|
82
|
+
# form parameters
|
|
83
|
+
form_params = opts[:form_params] || {}
|
|
84
|
+
|
|
85
|
+
# http body (model)
|
|
86
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(beginner_guidance_request)
|
|
87
|
+
|
|
88
|
+
# return_type
|
|
89
|
+
return_type = opts[:debug_return_type] || 'BeginnerGuidance'
|
|
90
|
+
|
|
91
|
+
# auth_names
|
|
92
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
93
|
+
|
|
94
|
+
new_options = opts.merge(
|
|
95
|
+
:operation => :"ConsumerPlantCareApi.beginner_guidance",
|
|
96
|
+
:header_params => header_params,
|
|
97
|
+
:query_params => query_params,
|
|
98
|
+
:form_params => form_params,
|
|
99
|
+
:body => post_body,
|
|
100
|
+
:auth_names => auth_names,
|
|
101
|
+
:return_type => return_type
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
105
|
+
if @api_client.config.debugging
|
|
106
|
+
@api_client.config.logger.debug "API called: ConsumerPlantCareApi#beginner_guidance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
107
|
+
end
|
|
108
|
+
return data, status_code, headers
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Hyper-localized dynamic plant care recommendations
|
|
112
|
+
# Real-time, environment-aware care recommendations that solve the \"generic advice\" problem. Unlike static \"water every 7 days\" recommendations, this endpoint: - Adjusts watering based on current humidity, temperature, and recent rainfall - Considers container type, soil composition, and drainage - Factors in seasonal changes and indoor environment conditions - Accounts for plant maturity and growth phase - Provides actionable guidance, not rigid schedules
|
|
113
|
+
# @param dynamic_care_request [DynamicCareRequest]
|
|
114
|
+
# @param [Hash] opts the optional parameters
|
|
115
|
+
# @option opts [Integer] :x_tq_context_mode TurboQuant extended context window size (tokens). With 3-bit KV cache, context windows up to 24K tokens are feasible within the same memory budget as standard 4K. (default to 4096)
|
|
116
|
+
# @option opts [String] :x_tq_kv_cache_hint KV cache management hint. - `none`: No caching (default) - `reuse`: Reuse KV cache from previous request in same session (40-60% compute savings) - `persist`: Persist cache to disk for cross-session reuse (default to 'none')
|
|
117
|
+
# @option opts [String] :x_tq_model_tier Preferred model tier for inference. - `auto`: Server selects optimal model based on device capabilities - `gemma-2b`: Lightweight model (~0.5GB KV with TQ) - `gemma-7b`: Full model, standard KV cache - `gemma-7b-tq`: Full model with TurboQuant 3-bit KV cache (~1.3GB) (default to 'auto')
|
|
118
|
+
# @return [DynamicCare]
|
|
119
|
+
def dynamic_care(dynamic_care_request, opts = {})
|
|
120
|
+
data, _status_code, _headers = dynamic_care_with_http_info(dynamic_care_request, opts)
|
|
121
|
+
data
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Hyper-localized dynamic plant care recommendations
|
|
125
|
+
# Real-time, environment-aware care recommendations that solve the \"generic advice\" problem. Unlike static \"water every 7 days\" recommendations, this endpoint: - Adjusts watering based on current humidity, temperature, and recent rainfall - Considers container type, soil composition, and drainage - Factors in seasonal changes and indoor environment conditions - Accounts for plant maturity and growth phase - Provides actionable guidance, not rigid schedules
|
|
126
|
+
# @param dynamic_care_request [DynamicCareRequest]
|
|
127
|
+
# @param [Hash] opts the optional parameters
|
|
128
|
+
# @option opts [Integer] :x_tq_context_mode TurboQuant extended context window size (tokens). With 3-bit KV cache, context windows up to 24K tokens are feasible within the same memory budget as standard 4K. (default to 4096)
|
|
129
|
+
# @option opts [String] :x_tq_kv_cache_hint KV cache management hint. - `none`: No caching (default) - `reuse`: Reuse KV cache from previous request in same session (40-60% compute savings) - `persist`: Persist cache to disk for cross-session reuse (default to 'none')
|
|
130
|
+
# @option opts [String] :x_tq_model_tier Preferred model tier for inference. - `auto`: Server selects optimal model based on device capabilities - `gemma-2b`: Lightweight model (~0.5GB KV with TQ) - `gemma-7b`: Full model, standard KV cache - `gemma-7b-tq`: Full model with TurboQuant 3-bit KV cache (~1.3GB) (default to 'auto')
|
|
131
|
+
# @return [Array<(DynamicCare, Integer, Hash)>] DynamicCare data, response status code and response headers
|
|
132
|
+
def dynamic_care_with_http_info(dynamic_care_request, opts = {})
|
|
133
|
+
if @api_client.config.debugging
|
|
134
|
+
@api_client.config.logger.debug 'Calling API: ConsumerPlantCareApi.dynamic_care ...'
|
|
135
|
+
end
|
|
136
|
+
# verify the required parameter 'dynamic_care_request' is set
|
|
137
|
+
if @api_client.config.client_side_validation && dynamic_care_request.nil?
|
|
138
|
+
fail ArgumentError, "Missing the required parameter 'dynamic_care_request' when calling ConsumerPlantCareApi.dynamic_care"
|
|
139
|
+
end
|
|
140
|
+
allowable_values = [4096, 8192, 16384, 24576]
|
|
141
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_context_mode'] && !allowable_values.include?(opts[:'x_tq_context_mode'])
|
|
142
|
+
fail ArgumentError, "invalid value for \"x_tq_context_mode\", must be one of #{allowable_values}"
|
|
143
|
+
end
|
|
144
|
+
allowable_values = ["none", "reuse", "persist"]
|
|
145
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_kv_cache_hint'] && !allowable_values.include?(opts[:'x_tq_kv_cache_hint'])
|
|
146
|
+
fail ArgumentError, "invalid value for \"x_tq_kv_cache_hint\", must be one of #{allowable_values}"
|
|
147
|
+
end
|
|
148
|
+
allowable_values = ["auto", "gemma-2b", "gemma-7b", "gemma-7b-tq"]
|
|
149
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_model_tier'] && !allowable_values.include?(opts[:'x_tq_model_tier'])
|
|
150
|
+
fail ArgumentError, "invalid value for \"x_tq_model_tier\", must be one of #{allowable_values}"
|
|
151
|
+
end
|
|
152
|
+
# resource path
|
|
153
|
+
local_var_path = '/dynamic-care'
|
|
154
|
+
|
|
155
|
+
# query parameters
|
|
156
|
+
query_params = opts[:query_params] || {}
|
|
157
|
+
|
|
158
|
+
# header parameters
|
|
159
|
+
header_params = opts[:header_params] || {}
|
|
160
|
+
# HTTP header 'Accept' (if needed)
|
|
161
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
162
|
+
# HTTP header 'Content-Type'
|
|
163
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
164
|
+
if !content_type.nil?
|
|
165
|
+
header_params['Content-Type'] = content_type
|
|
166
|
+
end
|
|
167
|
+
header_params[:'x-tq-context-mode'] = opts[:'x_tq_context_mode'] if !opts[:'x_tq_context_mode'].nil?
|
|
168
|
+
header_params[:'x-tq-kv-cache-hint'] = opts[:'x_tq_kv_cache_hint'] if !opts[:'x_tq_kv_cache_hint'].nil?
|
|
169
|
+
header_params[:'x-tq-model-tier'] = opts[:'x_tq_model_tier'] if !opts[:'x_tq_model_tier'].nil?
|
|
170
|
+
|
|
171
|
+
# form parameters
|
|
172
|
+
form_params = opts[:form_params] || {}
|
|
173
|
+
|
|
174
|
+
# http body (model)
|
|
175
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(dynamic_care_request)
|
|
176
|
+
|
|
177
|
+
# return_type
|
|
178
|
+
return_type = opts[:debug_return_type] || 'DynamicCare'
|
|
179
|
+
|
|
180
|
+
# auth_names
|
|
181
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
182
|
+
|
|
183
|
+
new_options = opts.merge(
|
|
184
|
+
:operation => :"ConsumerPlantCareApi.dynamic_care",
|
|
185
|
+
:header_params => header_params,
|
|
186
|
+
:query_params => query_params,
|
|
187
|
+
:form_params => form_params,
|
|
188
|
+
:body => post_body,
|
|
189
|
+
:auth_names => auth_names,
|
|
190
|
+
:return_type => return_type
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
194
|
+
if @api_client.config.debugging
|
|
195
|
+
@api_client.config.logger.debug "API called: ConsumerPlantCareApi#dynamic_care\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
196
|
+
end
|
|
197
|
+
return data, status_code, headers
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Safe plant identification with toxic lookalike warnings
|
|
201
|
+
# Environmentally-contextualized plant identification that addresses misidentification concerns. Unlike generic plant ID, this endpoint: - Checks against a toxic lookalike database with visual similarity scores - Uses environmental context (soil, climate, regional flora) to weight identification probability - Provides confidence breakdowns showing why alternatives were considered - Issues explicit warnings for dangerous lookalikes (Poison Hemlock vs Wild Carrot) - Accounts for plant growth stage (seedling identification challenges)
|
|
202
|
+
# @param safe_identification_request [SafeIdentificationRequest]
|
|
203
|
+
# @param [Hash] opts the optional parameters
|
|
204
|
+
# @option opts [Integer] :x_tq_context_mode TurboQuant extended context window size (tokens). With 3-bit KV cache, context windows up to 24K tokens are feasible within the same memory budget as standard 4K. (default to 4096)
|
|
205
|
+
# @option opts [String] :x_tq_kv_cache_hint KV cache management hint. - `none`: No caching (default) - `reuse`: Reuse KV cache from previous request in same session (40-60% compute savings) - `persist`: Persist cache to disk for cross-session reuse (default to 'none')
|
|
206
|
+
# @option opts [String] :x_tq_model_tier Preferred model tier for inference. - `auto`: Server selects optimal model based on device capabilities - `gemma-2b`: Lightweight model (~0.5GB KV with TQ) - `gemma-7b`: Full model, standard KV cache - `gemma-7b-tq`: Full model with TurboQuant 3-bit KV cache (~1.3GB) (default to 'auto')
|
|
207
|
+
# @return [SafeIdentification]
|
|
208
|
+
def safe_identification(safe_identification_request, opts = {})
|
|
209
|
+
data, _status_code, _headers = safe_identification_with_http_info(safe_identification_request, opts)
|
|
210
|
+
data
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Safe plant identification with toxic lookalike warnings
|
|
214
|
+
# Environmentally-contextualized plant identification that addresses misidentification concerns. Unlike generic plant ID, this endpoint: - Checks against a toxic lookalike database with visual similarity scores - Uses environmental context (soil, climate, regional flora) to weight identification probability - Provides confidence breakdowns showing why alternatives were considered - Issues explicit warnings for dangerous lookalikes (Poison Hemlock vs Wild Carrot) - Accounts for plant growth stage (seedling identification challenges)
|
|
215
|
+
# @param safe_identification_request [SafeIdentificationRequest]
|
|
216
|
+
# @param [Hash] opts the optional parameters
|
|
217
|
+
# @option opts [Integer] :x_tq_context_mode TurboQuant extended context window size (tokens). With 3-bit KV cache, context windows up to 24K tokens are feasible within the same memory budget as standard 4K. (default to 4096)
|
|
218
|
+
# @option opts [String] :x_tq_kv_cache_hint KV cache management hint. - `none`: No caching (default) - `reuse`: Reuse KV cache from previous request in same session (40-60% compute savings) - `persist`: Persist cache to disk for cross-session reuse (default to 'none')
|
|
219
|
+
# @option opts [String] :x_tq_model_tier Preferred model tier for inference. - `auto`: Server selects optimal model based on device capabilities - `gemma-2b`: Lightweight model (~0.5GB KV with TQ) - `gemma-7b`: Full model, standard KV cache - `gemma-7b-tq`: Full model with TurboQuant 3-bit KV cache (~1.3GB) (default to 'auto')
|
|
220
|
+
# @return [Array<(SafeIdentification, Integer, Hash)>] SafeIdentification data, response status code and response headers
|
|
221
|
+
def safe_identification_with_http_info(safe_identification_request, opts = {})
|
|
222
|
+
if @api_client.config.debugging
|
|
223
|
+
@api_client.config.logger.debug 'Calling API: ConsumerPlantCareApi.safe_identification ...'
|
|
224
|
+
end
|
|
225
|
+
# verify the required parameter 'safe_identification_request' is set
|
|
226
|
+
if @api_client.config.client_side_validation && safe_identification_request.nil?
|
|
227
|
+
fail ArgumentError, "Missing the required parameter 'safe_identification_request' when calling ConsumerPlantCareApi.safe_identification"
|
|
228
|
+
end
|
|
229
|
+
allowable_values = [4096, 8192, 16384, 24576]
|
|
230
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_context_mode'] && !allowable_values.include?(opts[:'x_tq_context_mode'])
|
|
231
|
+
fail ArgumentError, "invalid value for \"x_tq_context_mode\", must be one of #{allowable_values}"
|
|
232
|
+
end
|
|
233
|
+
allowable_values = ["none", "reuse", "persist"]
|
|
234
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_kv_cache_hint'] && !allowable_values.include?(opts[:'x_tq_kv_cache_hint'])
|
|
235
|
+
fail ArgumentError, "invalid value for \"x_tq_kv_cache_hint\", must be one of #{allowable_values}"
|
|
236
|
+
end
|
|
237
|
+
allowable_values = ["auto", "gemma-2b", "gemma-7b", "gemma-7b-tq"]
|
|
238
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_model_tier'] && !allowable_values.include?(opts[:'x_tq_model_tier'])
|
|
239
|
+
fail ArgumentError, "invalid value for \"x_tq_model_tier\", must be one of #{allowable_values}"
|
|
240
|
+
end
|
|
241
|
+
# resource path
|
|
242
|
+
local_var_path = '/safe-identification'
|
|
243
|
+
|
|
244
|
+
# query parameters
|
|
245
|
+
query_params = opts[:query_params] || {}
|
|
246
|
+
|
|
247
|
+
# header parameters
|
|
248
|
+
header_params = opts[:header_params] || {}
|
|
249
|
+
# HTTP header 'Accept' (if needed)
|
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
251
|
+
# HTTP header 'Content-Type'
|
|
252
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
253
|
+
if !content_type.nil?
|
|
254
|
+
header_params['Content-Type'] = content_type
|
|
255
|
+
end
|
|
256
|
+
header_params[:'x-tq-context-mode'] = opts[:'x_tq_context_mode'] if !opts[:'x_tq_context_mode'].nil?
|
|
257
|
+
header_params[:'x-tq-kv-cache-hint'] = opts[:'x_tq_kv_cache_hint'] if !opts[:'x_tq_kv_cache_hint'].nil?
|
|
258
|
+
header_params[:'x-tq-model-tier'] = opts[:'x_tq_model_tier'] if !opts[:'x_tq_model_tier'].nil?
|
|
259
|
+
|
|
260
|
+
# form parameters
|
|
261
|
+
form_params = opts[:form_params] || {}
|
|
262
|
+
|
|
263
|
+
# http body (model)
|
|
264
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(safe_identification_request)
|
|
265
|
+
|
|
266
|
+
# return_type
|
|
267
|
+
return_type = opts[:debug_return_type] || 'SafeIdentification'
|
|
268
|
+
|
|
269
|
+
# auth_names
|
|
270
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
271
|
+
|
|
272
|
+
new_options = opts.merge(
|
|
273
|
+
:operation => :"ConsumerPlantCareApi.safe_identification",
|
|
274
|
+
:header_params => header_params,
|
|
275
|
+
:query_params => query_params,
|
|
276
|
+
:form_params => form_params,
|
|
277
|
+
:body => post_body,
|
|
278
|
+
:auth_names => auth_names,
|
|
279
|
+
:return_type => return_type
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
283
|
+
if @api_client.config.debugging
|
|
284
|
+
@api_client.config.logger.debug "API called: ConsumerPlantCareApi#safe_identification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
285
|
+
end
|
|
286
|
+
return data, status_code, headers
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
end
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SoilSidekick Pro API
|
|
3
|
+
|
|
4
|
+
#Agricultural intelligence and soil analysis API with tier-based access control. ## What's New in 1.2.0 - **Consumer Plant Care APIs**: Three new endpoints addressing top pain points in plant ID apps: - `/safe-identification`: Toxic lookalike warnings and environmental context - `/dynamic-care`: Hyper-localized, real-time care recommendations - `/beginner-guidance`: Judgment-free, jargon-free plant guidance ## Authentication All endpoints require an API key passed via the `x-api-key` header: ``` x-api-key: ak_your_api_key_here ``` API keys are generated through the dashboard and use the `ak_*` format. ## Rate Limiting Rate limits are enforced based on your subscription tier: - **Free**: 10 req/min, 100 req/hour, 1,000 req/day - **Starter**: 30 req/min, 500 req/hour, 5,000 req/day - **Pro**: 100 req/min, 2,000 req/hour, 25,000 req/day - **Enterprise**: 500 req/min, 10,000 req/hour, 100,000 req/day Rate limit information is returned in response headers: - `X-RateLimit-Limit`: Maximum requests in window - `X-RateLimit-Remaining`: Remaining requests in window - `X-RateLimit-Reset`: Unix timestamp when limit resets ## Response Time SLAs All endpoints return response time headers for performance monitoring: - `X-Response-Time`: Human-readable response time (e.g., \"245ms\") - `X-Response-Time-Ms`: Response time in milliseconds - `X-Response-Time-Target`: Target response time for this endpoint - `X-Response-Time-Max`: Maximum acceptable response time - `X-Response-Time-Status`: Performance status (`optimal`, `acceptable`, `exceeded`) ### Response Time Targets by Category | Category | Target | Maximum | Endpoints | |----------|--------|---------|-----------| | **Fast** | 200ms | 500ms | county-lookup, check-subscription | | **Standard** | 500ms | 1,500ms | get-soil-data, territorial-water-quality | | **Complex** | 2,000ms | 5,000ms | agricultural-intelligence, gpt5-chat, visual-crop-analysis | | **Heavy** | 5,000ms | 15,000ms | live-agricultural-data, generate-vrt-prescription |
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
|
7
|
+
Contact: support@soilsidekickpro.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module SoilSidekick
|
|
16
|
+
class EnvironmentalApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Calculate environmental impact
|
|
23
|
+
# Assess environmental impact including runoff risk, contamination, and eco-friendly alternatives
|
|
24
|
+
# @param calculate_environmental_impact_request [CalculateEnvironmentalImpactRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [Integer] :x_tq_context_mode TurboQuant extended context window size (tokens). With 3-bit KV cache, context windows up to 24K tokens are feasible within the same memory budget as standard 4K. (default to 4096)
|
|
27
|
+
# @option opts [String] :x_tq_kv_cache_hint KV cache management hint. - `none`: No caching (default) - `reuse`: Reuse KV cache from previous request in same session (40-60% compute savings) - `persist`: Persist cache to disk for cross-session reuse (default to 'none')
|
|
28
|
+
# @option opts [String] :x_tq_model_tier Preferred model tier for inference. - `auto`: Server selects optimal model based on device capabilities - `gemma-2b`: Lightweight model (~0.5GB KV with TQ) - `gemma-7b`: Full model, standard KV cache - `gemma-7b-tq`: Full model with TurboQuant 3-bit KV cache (~1.3GB) (default to 'auto')
|
|
29
|
+
# @return [EnvironmentalImpact]
|
|
30
|
+
def calculate_environmental_impact(calculate_environmental_impact_request, opts = {})
|
|
31
|
+
data, _status_code, _headers = calculate_environmental_impact_with_http_info(calculate_environmental_impact_request, opts)
|
|
32
|
+
data
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Calculate environmental impact
|
|
36
|
+
# Assess environmental impact including runoff risk, contamination, and eco-friendly alternatives
|
|
37
|
+
# @param calculate_environmental_impact_request [CalculateEnvironmentalImpactRequest]
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [Integer] :x_tq_context_mode TurboQuant extended context window size (tokens). With 3-bit KV cache, context windows up to 24K tokens are feasible within the same memory budget as standard 4K. (default to 4096)
|
|
40
|
+
# @option opts [String] :x_tq_kv_cache_hint KV cache management hint. - `none`: No caching (default) - `reuse`: Reuse KV cache from previous request in same session (40-60% compute savings) - `persist`: Persist cache to disk for cross-session reuse (default to 'none')
|
|
41
|
+
# @option opts [String] :x_tq_model_tier Preferred model tier for inference. - `auto`: Server selects optimal model based on device capabilities - `gemma-2b`: Lightweight model (~0.5GB KV with TQ) - `gemma-7b`: Full model, standard KV cache - `gemma-7b-tq`: Full model with TurboQuant 3-bit KV cache (~1.3GB) (default to 'auto')
|
|
42
|
+
# @return [Array<(EnvironmentalImpact, Integer, Hash)>] EnvironmentalImpact data, response status code and response headers
|
|
43
|
+
def calculate_environmental_impact_with_http_info(calculate_environmental_impact_request, opts = {})
|
|
44
|
+
if @api_client.config.debugging
|
|
45
|
+
@api_client.config.logger.debug 'Calling API: EnvironmentalApi.calculate_environmental_impact ...'
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'calculate_environmental_impact_request' is set
|
|
48
|
+
if @api_client.config.client_side_validation && calculate_environmental_impact_request.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'calculate_environmental_impact_request' when calling EnvironmentalApi.calculate_environmental_impact"
|
|
50
|
+
end
|
|
51
|
+
allowable_values = [4096, 8192, 16384, 24576]
|
|
52
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_context_mode'] && !allowable_values.include?(opts[:'x_tq_context_mode'])
|
|
53
|
+
fail ArgumentError, "invalid value for \"x_tq_context_mode\", must be one of #{allowable_values}"
|
|
54
|
+
end
|
|
55
|
+
allowable_values = ["none", "reuse", "persist"]
|
|
56
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_kv_cache_hint'] && !allowable_values.include?(opts[:'x_tq_kv_cache_hint'])
|
|
57
|
+
fail ArgumentError, "invalid value for \"x_tq_kv_cache_hint\", must be one of #{allowable_values}"
|
|
58
|
+
end
|
|
59
|
+
allowable_values = ["auto", "gemma-2b", "gemma-7b", "gemma-7b-tq"]
|
|
60
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_model_tier'] && !allowable_values.include?(opts[:'x_tq_model_tier'])
|
|
61
|
+
fail ArgumentError, "invalid value for \"x_tq_model_tier\", must be one of #{allowable_values}"
|
|
62
|
+
end
|
|
63
|
+
# resource path
|
|
64
|
+
local_var_path = '/environmental-impact-engine'
|
|
65
|
+
|
|
66
|
+
# query parameters
|
|
67
|
+
query_params = opts[:query_params] || {}
|
|
68
|
+
|
|
69
|
+
# header parameters
|
|
70
|
+
header_params = opts[:header_params] || {}
|
|
71
|
+
# HTTP header 'Accept' (if needed)
|
|
72
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
73
|
+
# HTTP header 'Content-Type'
|
|
74
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
75
|
+
if !content_type.nil?
|
|
76
|
+
header_params['Content-Type'] = content_type
|
|
77
|
+
end
|
|
78
|
+
header_params[:'x-tq-context-mode'] = opts[:'x_tq_context_mode'] if !opts[:'x_tq_context_mode'].nil?
|
|
79
|
+
header_params[:'x-tq-kv-cache-hint'] = opts[:'x_tq_kv_cache_hint'] if !opts[:'x_tq_kv_cache_hint'].nil?
|
|
80
|
+
header_params[:'x-tq-model-tier'] = opts[:'x_tq_model_tier'] if !opts[:'x_tq_model_tier'].nil?
|
|
81
|
+
|
|
82
|
+
# form parameters
|
|
83
|
+
form_params = opts[:form_params] || {}
|
|
84
|
+
|
|
85
|
+
# http body (model)
|
|
86
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(calculate_environmental_impact_request)
|
|
87
|
+
|
|
88
|
+
# return_type
|
|
89
|
+
return_type = opts[:debug_return_type] || 'EnvironmentalImpact'
|
|
90
|
+
|
|
91
|
+
# auth_names
|
|
92
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
93
|
+
|
|
94
|
+
new_options = opts.merge(
|
|
95
|
+
:operation => :"EnvironmentalApi.calculate_environmental_impact",
|
|
96
|
+
:header_params => header_params,
|
|
97
|
+
:query_params => query_params,
|
|
98
|
+
:form_params => form_params,
|
|
99
|
+
:body => post_body,
|
|
100
|
+
:auth_names => auth_names,
|
|
101
|
+
:return_type => return_type
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
105
|
+
if @api_client.config.debugging
|
|
106
|
+
@api_client.config.logger.debug "API called: EnvironmentalApi#calculate_environmental_impact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
107
|
+
end
|
|
108
|
+
return data, status_code, headers
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SoilSidekick Pro API
|
|
3
|
+
|
|
4
|
+
#Agricultural intelligence and soil analysis API with tier-based access control. ## What's New in 1.2.0 - **Consumer Plant Care APIs**: Three new endpoints addressing top pain points in plant ID apps: - `/safe-identification`: Toxic lookalike warnings and environmental context - `/dynamic-care`: Hyper-localized, real-time care recommendations - `/beginner-guidance`: Judgment-free, jargon-free plant guidance ## Authentication All endpoints require an API key passed via the `x-api-key` header: ``` x-api-key: ak_your_api_key_here ``` API keys are generated through the dashboard and use the `ak_*` format. ## Rate Limiting Rate limits are enforced based on your subscription tier: - **Free**: 10 req/min, 100 req/hour, 1,000 req/day - **Starter**: 30 req/min, 500 req/hour, 5,000 req/day - **Pro**: 100 req/min, 2,000 req/hour, 25,000 req/day - **Enterprise**: 500 req/min, 10,000 req/hour, 100,000 req/day Rate limit information is returned in response headers: - `X-RateLimit-Limit`: Maximum requests in window - `X-RateLimit-Remaining`: Remaining requests in window - `X-RateLimit-Reset`: Unix timestamp when limit resets ## Response Time SLAs All endpoints return response time headers for performance monitoring: - `X-Response-Time`: Human-readable response time (e.g., \"245ms\") - `X-Response-Time-Ms`: Response time in milliseconds - `X-Response-Time-Target`: Target response time for this endpoint - `X-Response-Time-Max`: Maximum acceptable response time - `X-Response-Time-Status`: Performance status (`optimal`, `acceptable`, `exceeded`) ### Response Time Targets by Category | Category | Target | Maximum | Endpoints | |----------|--------|---------|-----------| | **Fast** | 200ms | 500ms | county-lookup, check-subscription | | **Standard** | 500ms | 1,500ms | get-soil-data, territorial-water-quality | | **Complex** | 2,000ms | 5,000ms | agricultural-intelligence, gpt5-chat, visual-crop-analysis | | **Heavy** | 5,000ms | 15,000ms | live-agricultural-data, generate-vrt-prescription |
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
|
7
|
+
Contact: support@soilsidekickpro.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module SoilSidekick
|
|
16
|
+
class GeographicApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Search for counties
|
|
23
|
+
# Search counties by name, state, or FIPS code
|
|
24
|
+
# @param county_lookup_request [CountyLookupRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [CountyLookup200Response]
|
|
27
|
+
def county_lookup(county_lookup_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = county_lookup_with_http_info(county_lookup_request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Search for counties
|
|
33
|
+
# Search counties by name, state, or FIPS code
|
|
34
|
+
# @param county_lookup_request [CountyLookupRequest]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(CountyLookup200Response, Integer, Hash)>] CountyLookup200Response data, response status code and response headers
|
|
37
|
+
def county_lookup_with_http_info(county_lookup_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: GeographicApi.county_lookup ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'county_lookup_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && county_lookup_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'county_lookup_request' when calling GeographicApi.county_lookup"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/county-lookup'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(county_lookup_request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'CountyLookup200Response'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"GeographicApi.county_lookup",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: GeographicApi#county_lookup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SoilSidekick Pro API
|
|
3
|
+
|
|
4
|
+
#Agricultural intelligence and soil analysis API with tier-based access control. ## What's New in 1.2.0 - **Consumer Plant Care APIs**: Three new endpoints addressing top pain points in plant ID apps: - `/safe-identification`: Toxic lookalike warnings and environmental context - `/dynamic-care`: Hyper-localized, real-time care recommendations - `/beginner-guidance`: Judgment-free, jargon-free plant guidance ## Authentication All endpoints require an API key passed via the `x-api-key` header: ``` x-api-key: ak_your_api_key_here ``` API keys are generated through the dashboard and use the `ak_*` format. ## Rate Limiting Rate limits are enforced based on your subscription tier: - **Free**: 10 req/min, 100 req/hour, 1,000 req/day - **Starter**: 30 req/min, 500 req/hour, 5,000 req/day - **Pro**: 100 req/min, 2,000 req/hour, 25,000 req/day - **Enterprise**: 500 req/min, 10,000 req/hour, 100,000 req/day Rate limit information is returned in response headers: - `X-RateLimit-Limit`: Maximum requests in window - `X-RateLimit-Remaining`: Remaining requests in window - `X-RateLimit-Reset`: Unix timestamp when limit resets ## Response Time SLAs All endpoints return response time headers for performance monitoring: - `X-Response-Time`: Human-readable response time (e.g., \"245ms\") - `X-Response-Time-Ms`: Response time in milliseconds - `X-Response-Time-Target`: Target response time for this endpoint - `X-Response-Time-Max`: Maximum acceptable response time - `X-Response-Time-Status`: Performance status (`optimal`, `acceptable`, `exceeded`) ### Response Time Targets by Category | Category | Target | Maximum | Endpoints | |----------|--------|---------|-----------| | **Fast** | 200ms | 500ms | county-lookup, check-subscription | | **Standard** | 500ms | 1,500ms | get-soil-data, territorial-water-quality | | **Complex** | 2,000ms | 5,000ms | agricultural-intelligence, gpt5-chat, visual-crop-analysis | | **Heavy** | 5,000ms | 15,000ms | live-agricultural-data, generate-vrt-prescription |
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
|
7
|
+
Contact: support@soilsidekickpro.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module SoilSidekick
|
|
16
|
+
class LeafEnginesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Query plant-environment compatibility
|
|
23
|
+
# LeafEngines API for plant compatibility scoring with environmental factors
|
|
24
|
+
# @param leafengines_query_request [LeafenginesQueryRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [Integer] :x_tq_context_mode TurboQuant extended context window size (tokens). With 3-bit KV cache, context windows up to 24K tokens are feasible within the same memory budget as standard 4K. (default to 4096)
|
|
27
|
+
# @option opts [String] :x_tq_kv_cache_hint KV cache management hint. - `none`: No caching (default) - `reuse`: Reuse KV cache from previous request in same session (40-60% compute savings) - `persist`: Persist cache to disk for cross-session reuse (default to 'none')
|
|
28
|
+
# @option opts [String] :x_tq_model_tier Preferred model tier for inference. - `auto`: Server selects optimal model based on device capabilities - `gemma-2b`: Lightweight model (~0.5GB KV with TQ) - `gemma-7b`: Full model, standard KV cache - `gemma-7b-tq`: Full model with TurboQuant 3-bit KV cache (~1.3GB) (default to 'auto')
|
|
29
|
+
# @return [LeafEnginesCompatibility]
|
|
30
|
+
def leafengines_query(leafengines_query_request, opts = {})
|
|
31
|
+
data, _status_code, _headers = leafengines_query_with_http_info(leafengines_query_request, opts)
|
|
32
|
+
data
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Query plant-environment compatibility
|
|
36
|
+
# LeafEngines API for plant compatibility scoring with environmental factors
|
|
37
|
+
# @param leafengines_query_request [LeafenginesQueryRequest]
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [Integer] :x_tq_context_mode TurboQuant extended context window size (tokens). With 3-bit KV cache, context windows up to 24K tokens are feasible within the same memory budget as standard 4K. (default to 4096)
|
|
40
|
+
# @option opts [String] :x_tq_kv_cache_hint KV cache management hint. - `none`: No caching (default) - `reuse`: Reuse KV cache from previous request in same session (40-60% compute savings) - `persist`: Persist cache to disk for cross-session reuse (default to 'none')
|
|
41
|
+
# @option opts [String] :x_tq_model_tier Preferred model tier for inference. - `auto`: Server selects optimal model based on device capabilities - `gemma-2b`: Lightweight model (~0.5GB KV with TQ) - `gemma-7b`: Full model, standard KV cache - `gemma-7b-tq`: Full model with TurboQuant 3-bit KV cache (~1.3GB) (default to 'auto')
|
|
42
|
+
# @return [Array<(LeafEnginesCompatibility, Integer, Hash)>] LeafEnginesCompatibility data, response status code and response headers
|
|
43
|
+
def leafengines_query_with_http_info(leafengines_query_request, opts = {})
|
|
44
|
+
if @api_client.config.debugging
|
|
45
|
+
@api_client.config.logger.debug 'Calling API: LeafEnginesApi.leafengines_query ...'
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'leafengines_query_request' is set
|
|
48
|
+
if @api_client.config.client_side_validation && leafengines_query_request.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'leafengines_query_request' when calling LeafEnginesApi.leafengines_query"
|
|
50
|
+
end
|
|
51
|
+
allowable_values = [4096, 8192, 16384, 24576]
|
|
52
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_context_mode'] && !allowable_values.include?(opts[:'x_tq_context_mode'])
|
|
53
|
+
fail ArgumentError, "invalid value for \"x_tq_context_mode\", must be one of #{allowable_values}"
|
|
54
|
+
end
|
|
55
|
+
allowable_values = ["none", "reuse", "persist"]
|
|
56
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_kv_cache_hint'] && !allowable_values.include?(opts[:'x_tq_kv_cache_hint'])
|
|
57
|
+
fail ArgumentError, "invalid value for \"x_tq_kv_cache_hint\", must be one of #{allowable_values}"
|
|
58
|
+
end
|
|
59
|
+
allowable_values = ["auto", "gemma-2b", "gemma-7b", "gemma-7b-tq"]
|
|
60
|
+
if @api_client.config.client_side_validation && opts[:'x_tq_model_tier'] && !allowable_values.include?(opts[:'x_tq_model_tier'])
|
|
61
|
+
fail ArgumentError, "invalid value for \"x_tq_model_tier\", must be one of #{allowable_values}"
|
|
62
|
+
end
|
|
63
|
+
# resource path
|
|
64
|
+
local_var_path = '/leafengines-query'
|
|
65
|
+
|
|
66
|
+
# query parameters
|
|
67
|
+
query_params = opts[:query_params] || {}
|
|
68
|
+
|
|
69
|
+
# header parameters
|
|
70
|
+
header_params = opts[:header_params] || {}
|
|
71
|
+
# HTTP header 'Accept' (if needed)
|
|
72
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
73
|
+
# HTTP header 'Content-Type'
|
|
74
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
75
|
+
if !content_type.nil?
|
|
76
|
+
header_params['Content-Type'] = content_type
|
|
77
|
+
end
|
|
78
|
+
header_params[:'x-tq-context-mode'] = opts[:'x_tq_context_mode'] if !opts[:'x_tq_context_mode'].nil?
|
|
79
|
+
header_params[:'x-tq-kv-cache-hint'] = opts[:'x_tq_kv_cache_hint'] if !opts[:'x_tq_kv_cache_hint'].nil?
|
|
80
|
+
header_params[:'x-tq-model-tier'] = opts[:'x_tq_model_tier'] if !opts[:'x_tq_model_tier'].nil?
|
|
81
|
+
|
|
82
|
+
# form parameters
|
|
83
|
+
form_params = opts[:form_params] || {}
|
|
84
|
+
|
|
85
|
+
# http body (model)
|
|
86
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(leafengines_query_request)
|
|
87
|
+
|
|
88
|
+
# return_type
|
|
89
|
+
return_type = opts[:debug_return_type] || 'LeafEnginesCompatibility'
|
|
90
|
+
|
|
91
|
+
# auth_names
|
|
92
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
93
|
+
|
|
94
|
+
new_options = opts.merge(
|
|
95
|
+
:operation => :"LeafEnginesApi.leafengines_query",
|
|
96
|
+
:header_params => header_params,
|
|
97
|
+
:query_params => query_params,
|
|
98
|
+
:form_params => form_params,
|
|
99
|
+
:body => post_body,
|
|
100
|
+
:auth_names => auth_names,
|
|
101
|
+
:return_type => return_type
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
105
|
+
if @api_client.config.debugging
|
|
106
|
+
@api_client.config.logger.debug "API called: LeafEnginesApi#leafengines_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
107
|
+
end
|
|
108
|
+
return data, status_code, headers
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|