Add reasoning_effort to chat request
Introduce a new field `reasoning_effort` to the `ChatRequest` struct. This field, set to "medium" by default, allows tuning LLM reasoning depth to balance hallucination risk against latency and token cost. This setting is specifically for Ionos' GPT-OSS reasoning models and is ignored by other OpenAI-compatible models.
This commit is contained in:
@@ -48,6 +48,10 @@ pub struct LlmSettings<'a> {
|
||||
struct ChatRequest<'a> {
|
||||
model: &'a str,
|
||||
temperature: f32,
|
||||
/// Tunes reasoning depth for gpt-oss reasoning models (Ionos):
|
||||
/// `low`/`medium`/`high` trade off hallucination risk against latency and
|
||||
/// token cost. Ignored by non-reasoning OpenAI-compatible models.
|
||||
reasoning_effort: &'static str,
|
||||
stream: bool,
|
||||
messages: Vec<Message<'a>>,
|
||||
}
|
||||
@@ -91,6 +95,7 @@ pub async fn chat_once(
|
||||
let body = ChatRequest {
|
||||
model: settings.model,
|
||||
temperature: settings.temperature,
|
||||
reasoning_effort: "medium",
|
||||
stream: false,
|
||||
messages: vec![
|
||||
Message {
|
||||
|
||||
@@ -24,7 +24,7 @@ nur der konsolidierte Text. Mehrere Absätze erlaubt. KEINE Inline-Sektionsmarke
|
||||
|
||||
QUELLE: Das Diktat wurde automatisch transkribiert und enthält typische ASR-Fehler — phonetisch ähnliche Verwechslungen und zerschnittene Komposita (z.B. "Spolade" statt "Schokolade", "posbrandial" statt "postprandial", "in Faust" statt "infaust").
|
||||
|
||||
MARKIERUNGEN: ==...== signalisiert dem Arzt "bitte prüfen". Keine anderen Annotations-Formen ("(unsicher)", "[TODO]" o.ä.) verwenden.
|
||||
MARKIERUNGEN: ==Originaltext [<Hinweistext>]== signalisiert dem Arzt "bitte prüfen". Der <Hinweistext> ist optional und beschreibt kurz, warum markiert wurde. Keine anderen Annotations-Formen ("(unsicher)", "[TODO]" o.ä.) verwenden.
|
||||
|
||||
TREUE ZUM DIKTAT (höchste Priorität — vor allen anderen Regeln):
|
||||
- Diktat-Reihenfolge erhalten.
|
||||
|
||||
@@ -8,3 +8,4 @@ Klappenvitien
|
||||
Koronarbaum
|
||||
Pumpfunktion
|
||||
Ileus
|
||||
Orthopnoe
|
||||
|
||||
Reference in New Issue
Block a user