Skip to content

Commit

Permalink
Throw exception if query method is not implemented in query_multimoda…
Browse files Browse the repository at this point in the history
…l_with_retries

Summary: as titled

Reviewed By: SimonWan

Differential Revision: D64257047

fbshipit-source-id: a51136644fc727c9dd0e0a6f4e8e23c87399f6a9
  • Loading branch information
onionymous authored and facebook-github-bot committed Oct 11, 2024
1 parent babeb62 commit a3a9712
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CybersecurityBenchmarks/benchmark/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,11 @@ def query_multimodal_with_retries(
self.model, system_prompt, cache_key, response
)
return response
except NotImplementedError as exception:
LOG.error(
f"LLM Query failed as the method was not implemented: {exception}"
)
raise exception
except UnretriableQueryException as exception:
LOG.error(f"LLM Query failed due to unretriable error: {exception}")
return None
Expand Down

0 comments on commit a3a9712

Please sign in to comment.