(raw: &Value)
| 45 | } |
| 46 | |
| 47 | fn extract_session_id(raw: &Value) -> String { |
| 48 | value_string(raw, "session_id") |
| 49 | .or_else(|| value_string(raw, "conversation_id")) |
| 50 | .or_else(|| value_string(raw, "thread_id")) |
| 51 | .or_else(|| value_at(raw, &["extra", "session_id"])) |
| 52 | .filter(|s| !s.is_empty()) |
| 53 | .unwrap_or_else(|| "hermes-session".to_string()) |
| 54 | } |
| 55 | |
| 56 | fn extract_prompt(raw: &Value) -> Option<String> { |
| 57 | value_string(raw, "prompt") |
nothing calls this directly
no test coverage detected