Skip to content

Commit

Permalink
Fix AzureOpenAILLM load method setting the correct path to mock the i…
Browse files Browse the repository at this point in the history
…nternal class (#725)
  • Loading branch information
plaguss authored Jun 12, 2024
1 parent 2ea3f43 commit 3822c73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/distilabel/llms/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ def load(self) -> None:
"""Loads the `AsyncAzureOpenAI` client to benefit from async requests."""
# This is a workaround to avoid the `OpenAILLM` calling the _prepare_structured_output
# in the load method before we have the proper client.
with patch("OpenAILLM._prepare_structured_output", lambda x: x):
with patch(
"distilabel.llms.openai.OpenAILLM._prepare_structured_output", lambda x: x
):
super().load()

try:
Expand Down

0 comments on commit 3822c73

Please sign in to comment.