From 452969781d1d5af7c3a99fe9ef380e4ff51ccbc0 Mon Sep 17 00:00:00 2001 From: shadeMe Date: Thu, 6 Jun 2024 15:10:14 +0200 Subject: [PATCH] `reno` --- .../notes/llm-evaluator-serde-fix-aa5b27d2524db9c5.yaml | 4 ++++ test/components/evaluators/test_llm_evaluator.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/llm-evaluator-serde-fix-aa5b27d2524db9c5.yaml diff --git a/releasenotes/notes/llm-evaluator-serde-fix-aa5b27d2524db9c5.yaml b/releasenotes/notes/llm-evaluator-serde-fix-aa5b27d2524db9c5.yaml new file mode 100644 index 0000000000..aabfaaa6c7 --- /dev/null +++ b/releasenotes/notes/llm-evaluator-serde-fix-aa5b27d2524db9c5.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Correctly serialize tuples and types in the init parameters of the `LLMEvaluator` component and its subclasses. diff --git a/test/components/evaluators/test_llm_evaluator.py b/test/components/evaluators/test_llm_evaluator.py index 18311ecab7..d3ec4d29e4 100644 --- a/test/components/evaluators/test_llm_evaluator.py +++ b/test/components/evaluators/test_llm_evaluator.py @@ -282,7 +282,8 @@ def test_to_dict_with_parameters(self, monkeypatch): }, } - def test_serde(self): + def test_serde(self, monkeypatch): + monkeypatch.setenv("OPENAI_API_KEY", "test-api-key") pipeline = Pipeline() component = LLMEvaluator( instructions="test-instruction",