perfect-postcode/server-rs/src/consts.rs
Andras Schmelczer b94cf17d75
Some checks failed
CI / Python (lint + test) (push) Failing after 1m39s
CI / Frontend (lint + typecheck) (push) Failing after 1m49s
CI / Rust (lint + test) (push) Failing after 1m50s
Build and publish Docker image / build-and-push (push) Failing after 3m9s
Lots of improvements
2026-04-04 10:45:48 +01:00

30 lines
1.1 KiB
Rust

pub const NAN_U16: u16 = u16::MAX;
pub const QUANT_SCALE: f32 = 65534.0;
pub const HISTOGRAM_BINS: usize = 100;
pub const H3_PRECOMPUTE_MAX: u8 = 12;
pub const H3_REQUEST_MIN: u8 = 4;
pub const H3_REQUEST_MAX: u8 = 12;
pub const SERVER_ADDRESS: &str = "0.0.0.0:8001";
pub const GRID_CELL_SIZE: f32 = 0.01;
pub const MAX_POIS_PER_REQUEST: usize = 10000;
pub const MAX_CELLS_PER_REQUEST: usize = 50000;
pub const DEFAULT_PROPERTIES_LIMIT: usize = 100;
pub const MAX_PROPERTIES_LIMIT: usize = 500;
pub const MAX_PRICE_HISTORY_POINTS: usize = 5000;
pub const POSTCODE_SEARCH_OFFSET: f64 = 0.02;
pub const AI_FILTERS_MAX_TOKENS: usize = 2000;
/// Gemini 3 recommends 1.0; lower values can cause looping or degraded performance.
pub const AI_FILTERS_TEMPERATURE: f32 = 1.0;
pub const AI_FILTERS_WEEKLY_TOKEN_LIMIT: u64 = 10_000_000;
/// Timeout for outbound HTTP service calls (seconds).
pub const SERVICE_CALL_TIMEOUT: u64 = 120;
/// Demo free zone bounds (south, west, north, east) — inner London, roughly zone 1.
/// Users without a license can only query data within these bounds.
pub const FREE_ZONE_BOUNDS: (f64, f64, f64, f64) = (51.44, -0.31, 51.59, 0.05);