mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-06 12:07:04 +00:00
refactor: Remove name 'llm' from LLMEvaluator output (#7479)
This commit is contained in:
parent
8b8a93bc0d
commit
8ef6062748
@ -166,7 +166,6 @@ class LLMEvaluator:
|
||||
|
||||
self.validate_outputs(expected=self.outputs, received=result["replies"][0])
|
||||
parsed_result = json.loads(result["replies"][0])
|
||||
parsed_result["name"] = "llm"
|
||||
results.append(parsed_result)
|
||||
|
||||
return {"results": results}
|
||||
|
||||
@ -265,7 +265,7 @@ class TestLLMEvaluator:
|
||||
monkeypatch.setattr("haystack.components.generators.openai.OpenAIGenerator.run", generator_run)
|
||||
|
||||
results = component.run(questions=["What is the capital of Germany?"], responses=["Berlin"])
|
||||
assert results == {"results": [{"score": 0.5, "name": "llm"}]}
|
||||
assert results == {"results": [{"score": 0.5}]}
|
||||
|
||||
def test_prepare_template(self, monkeypatch):
|
||||
monkeypatch.setenv("OPENAI_API_KEY", "test-api-key")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user