Skip to content

Commit

Permalink
add test for init defaults, delete telemetry tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlistairLR112 committed Jan 3, 2024
1 parent 0f7d6a8 commit 9df9309
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions integrations/ollama/tests/test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,15 @@ def test_run_model_unavailable(self):
with pytest.raises(HTTPError):
component.run(prompt="Why is Alistair so great?")

def test__get_telemetry_data(self):
component = OllamaGenerator(model_name="some_model")
observed = component._get_telemetry_data()
assert observed == {"model": "some_model"}
def test_init_default(self):
component = OllamaGenerator()
assert component.model_name == "orca-mini"
assert component.url == "http://localhost:11434/api/generate"
assert component.generation_kwargs == {}
assert component.system_prompt is None
assert component.template is None
assert component.raw is False
assert component.timeout == 30

@pytest.mark.parametrize(
"configuration, prompt",
Expand Down

0 comments on commit 9df9309

Please sign in to comment.