feat(prompts): implement TOML-backed prompt loading and refactor message generation

This commit is contained in:
2026-07-24 11:38:51 -04:00
parent 94f18722e4
commit 8073144e2b
7 changed files with 83 additions and 24 deletions
+8
View File
@@ -93,6 +93,14 @@ async def test_answer_query_uses_httpx_chat_completions(mocker: MockerFixture) -
payload = kwargs["json"]
assert isinstance(payload, dict)
assert payload["model"] == "deepseek-v4-flash"
assert payload["messages"] == [
{
"role": "system",
"content": "Answer only from the provided context. Cite sources with bracketed numbers like [1]. "
"If the context is insufficient, say so.",
},
{"role": "user", "content": "Question:\nquestion\n\nContext:\n[1] Book\nsource"},
]
async def test_embed_texts_uses_httpx_embeddings(mocker: MockerFixture) -> None: