mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
test(guardrails): expect the content_filter finish on a blocked chat stream (#51281)
Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
935a1b8cf6
commit
9c41214b0c
1 changed files with 1 additions and 1 deletions
|
|
@ -1637,7 +1637,7 @@ def test_chat_pre_call_denial_streams_content_filter(gateway: Gateway, tmp_path:
|
|||
assert lines[-1] == "data: [DONE]", response.text
|
||||
chunks: Final = tuple(json.loads(line.removeprefix("data: ")) for line in lines[:-1])
|
||||
assert chunks[0]["choices"][0]["delta"]["content"] == _RESPONSES_DENIAL, chunks
|
||||
assert chunks[-1]["choices"][0]["finish_reason"] == "stop", chunks
|
||||
assert chunks[-1]["choices"][0]["finish_reason"] == "content_filter", chunks
|
||||
|
||||
|
||||
@pytest.mark.covers("other.observability.guardrails.chat_pre_call_denial_returns_content_filter")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue