Skip to content

Commit fb1796b

Browse files
committed
feat: Add similarity slider control for query embedding configuration
1 parent c793c39 commit fb1796b

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ caffeine.version=3.2.2
1616

1717
api.version=1.16.3
1818
core.version=1.18.9
19-
ui.version=1.19.2
19+
ui.version=1.19.3
2020
app.version=1.6.4

ui/src/main/kotlin/dev/paulee/ui/Config.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ object Config {
3636

3737
var searchExpanded by mutableStateOf(true)
3838

39+
var queryEmbSimilarity by mutableStateOf(0.8f)
40+
3941
private var configFile = "config"
4042

4143
private var configPath = Path(configFile)

ui/src/main/kotlin/dev/paulee/ui/components/TableView.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,16 @@ private fun QuerySettingsPanel(
489489

490490
Spacer(modifier = Modifier.height(8.dp))
491491

492+
SliderControl(
493+
text = locale["main.query_settings.similarity"],
494+
value = Config.queryEmbSimilarity,
495+
onValueChange = {
496+
Config.queryEmbSimilarity = it
497+
},
498+
minValue = 0.5f,
499+
maxValue = 1.0f,
500+
defaultValue = 0.8f
501+
)
492502
}
493503
}
494504
}

0 commit comments

Comments
 (0)