Merge remote-tracking branch 'origin/main'
This commit is contained in:
13
tests/test_custom_provider.py
Normal file
13
tests/test_custom_provider.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from types import SimpleNamespace
|
||||
|
||||
from nanobot.providers.custom_provider import CustomProvider
|
||||
|
||||
|
||||
def test_custom_provider_parse_handles_empty_choices() -> None:
|
||||
provider = CustomProvider()
|
||||
response = SimpleNamespace(choices=[])
|
||||
|
||||
result = provider._parse(response)
|
||||
|
||||
assert result.finish_reason == "error"
|
||||
assert "empty choices" in result.content
|
||||
Reference in New Issue
Block a user