mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 19:05:18 +00:00
refactor(ai_handler): add a return statement or raise an exception in the elif branch
This commit is contained in:
parent
11fb6ccc7e
commit
8c7680d85d
1 changed files with 1 additions and 1 deletions
|
|
@ -447,7 +447,7 @@ class LiteLLMAIHandler(BaseAiHandler):
|
|||
raise openai.APIError("Empty streaming response received without proper completion")
|
||||
elif not full_response and finish_reason:
|
||||
get_logger().debug(f"Streaming response resulted in empty content but completed with finish_reason: {finish_reason}")
|
||||
|
||||
raise openai.APIError(f"Streaming response completed with finish_reason '{finish_reason}' but no content received")
|
||||
return full_response, finish_reason
|
||||
|
||||
async def _get_completion(self, model, **kwargs):
|
||||
|
|
|
|||
Loading…
Reference in a new issue