Small clean up
This commit is contained in:
parent
b9f9c3ae50
commit
94ebd0f614
10 changed files with 22 additions and 21 deletions
|
|
@ -944,9 +944,9 @@ pub static ENUM_FEATURE_GROUPS: &[EnumFeatureGroup] = &[
|
|||
},
|
||||
EnumFeatureConfig {
|
||||
name: "Property type",
|
||||
order: Some(&["Detached", "Semi-Detached", "Terraced", "Flat"]),
|
||||
description: "Type of property: detached, semi-detached, terraced, or flat",
|
||||
detail: "From HM Land Registry Price Paid data. The broad property type classification: Detached, Semi-Detached, Terraced, or Flat/Maisonette.",
|
||||
order: Some(&["Detached", "Semi-Detached", "Terraced", "Flats/Maisonettes"]),
|
||||
description: "Type of property: detached, semi-detached, terraced, or flat/maisonette",
|
||||
detail: "From HM Land Registry Price Paid data. The broad property type classification: Detached, Semi-Detached, Terraced, or Flats/Maisonettes.",
|
||||
source: "price-paid",
|
||||
},
|
||||
EnumFeatureConfig {
|
||||
|
|
|
|||
|
|
@ -329,7 +329,6 @@ async fn main() -> anyhow::Result<()> {
|
|||
&cli.google_oauth_client_secret,
|
||||
)
|
||||
.await?;
|
||||
|
||||
info!(
|
||||
"Ollama configured: {} (model: {})",
|
||||
cli.ollama_url, cli.ollama_model
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ mod tests {
|
|||
"Detached".into(),
|
||||
"Semi".into(),
|
||||
"Terraced".into(),
|
||||
"Flat".into(),
|
||||
"Flats/Maisonettes".into(),
|
||||
],
|
||||
);
|
||||
map
|
||||
|
|
@ -273,7 +273,7 @@ mod tests {
|
|||
#[test]
|
||||
fn parse_enum_with_unknown_value() {
|
||||
let (_numeric, enums) = parse_filters(
|
||||
Some("Type:Detached|Unknown|Flat"),
|
||||
Some("Type:Detached|Unknown|Flats/Maisonettes"),
|
||||
&extended_feature_map(),
|
||||
&extended_enum_values(),
|
||||
)
|
||||
|
|
@ -281,14 +281,14 @@ mod tests {
|
|||
|
||||
assert_eq!(enums.len(), 1);
|
||||
assert!(enums[0].allowed.contains(&(0.0_f32).to_bits())); // Detached
|
||||
assert!(enums[0].allowed.contains(&(3.0_f32).to_bits())); // Flat
|
||||
assert!(enums[0].allowed.contains(&(3.0_f32).to_bits())); // Flats/Maisonettes
|
||||
assert_eq!(enums[0].allowed.len(), 2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_filter_with_whitespace() {
|
||||
let (numeric, enums) = parse_filters(
|
||||
Some("Price : 100000 : 500000 , Type : Detached | Flat"),
|
||||
Some("Price : 100000 : 500000 , Type : Detached | Flats/Maisonettes"),
|
||||
&extended_feature_map(),
|
||||
&extended_enum_values(),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ pub fn build_system_prompt(features: &FeaturesResponse) -> String {
|
|||
{\"name\": \"Last known price\", \"bound\": \"max\", \"value\": 300000}, \
|
||||
{\"name\": \"Number of bedrooms & living rooms\", \"bound\": \"min\", \"value\": 4}, \
|
||||
{\"name\": \"Max available download speed (Mbps)\", \"bound\": \"min\", \"value\": 100}], \
|
||||
\"enum_filters\": [{\"name\": \"Property type\", \"values\": [\"Flat\"]}], \
|
||||
\"enum_filters\": [{\"name\": \"Property type\", \"values\": [\"Flats/Maisonettes\"]}], \
|
||||
\"notes\": \"No filter for: beach proximity\"}"
|
||||
.to_string(),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue