Skip to content

Commit

Permalink
lowercase comparision (#8532)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsbatista authored Nov 11, 2024
1 parent ebb45d3 commit 852900d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/components/generators/test_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@ def test_run_with_system_prompt(self):
system_prompt="You answer in Portuguese, regardless of the language on which a question is asked",
)
result = generator.run("Can you explain the Pitagoras therom?")
assert "teorema" in result["replies"][0]
assert "teorema" in result["replies"][0].lower()

result = generator.run(
"Can you explain the Pitagoras therom?",
system_prompt="You answer in German, regardless of the language on which a question is asked.",
)
assert "Pythagoras" in result["replies"][0]
assert "pythagoras".lower() in result["replies"][0].lower()

0 comments on commit 852900d

Please sign in to comment.