mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
🐛 fix(stt): declare local initial prompt default
This commit is contained in:
parent
f65481674b
commit
131251a1ae
2 changed files with 22 additions and 0 deletions
|
|
@ -2325,6 +2325,7 @@ DEFAULT_CONFIG = {
|
|||
"local": {
|
||||
"model": "base", # tiny, base, small, medium, large-v3
|
||||
"language": "", # auto-detect by default; set to "en", "es", "fr", etc. to force
|
||||
"initial_prompt": "",
|
||||
},
|
||||
"openai": {
|
||||
"model": "whisper-1", # whisper-1, gpt-4o-mini-transcribe, gpt-4o-transcribe
|
||||
|
|
|
|||
|
|
@ -122,6 +122,27 @@ class TestValidateAudioFile:
|
|||
assert "too large" in result["error"]
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Config resolution
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
class TestLoadSttConfig:
|
||||
|
||||
def test_merges_default_local_initial_prompt(self, monkeypatch, tmp_path):
|
||||
monkeypatch.setenv("HERMES_HOME", str(tmp_path))
|
||||
(tmp_path / "config.yaml").write_text(
|
||||
"stt:\n local:\n model: small\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
from tools.transcription_tools import _load_stt_config
|
||||
local_config = _load_stt_config()["local"]
|
||||
|
||||
assert local_config["model"] == "small"
|
||||
assert local_config["initial_prompt"] == ""
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Local transcription
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue