Skip to content

Commit

Permalink
Merge branch 'main' into yifanmai/fix-openai-inference-engine
Browse files Browse the repository at this point in the history
  • Loading branch information
elronbandel committed Sep 8, 2024
2 parents 0827a1c + 258d5bf commit e53722e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/unitxt/llm_as_judge.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ def verify(self):
)

if isinstance(self.inference_model, OpenAiInferenceEngine):
if self.format:
if self.format and type(self.format) is not SystemFormat:
raise ValueError(
"Error in 'LLMAsJudge' metric. Inference model 'OpenAiInferenceEngine' does "
"not support formatting. Please remove the format definition from the recipe"
" (OpenAi Chat API take care of the formatting automatically)."
)
if self.system_prompt:
if self.system_prompt and type(self.system_prompt) is not EmptySystemPrompt:
raise ValueError(
"Error in 'LLMAsJudge' metric. Inference model 'OpenAiInferenceEngine' does "
"not support system prompt. Please remove the system_prompt definition from the recipe"
Expand Down

0 comments on commit e53722e

Please sign in to comment.