model to builder

This commit is contained in:
2026-02-22 01:54:34 +01:00
parent 248237d868
commit 1e3877fc34
2 changed files with 3 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ public class RagApplication {
SimpleLoggerAdvisor.builder().order(4).build()
)
.defaultOptions(OpenAiChatOptions.builder()
.model(ragDefaults.model())
.temperature(ragDefaults.temperature())
.topP(ragDefaults.topP())
.frequencyPenalty(ragDefaults.repeatPenalty() - 1.0) // Ollama repeatPenalty 1.1 -> frequencyPenalty 0.1

View File

@@ -11,5 +11,6 @@ public record RagDefaultsProperties(
@DefaultValue("0.3") double temperature,
@DefaultValue("1.1") double repeatPenalty,
@DefaultValue("2") int searchTopK,
@DefaultValue("0.3") double similarityThreshold
@DefaultValue("0.3") double similarityThreshold,
@DefaultValue("llama-3.3-70b-versatile") String model
) {}