mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-16 02:30:37 +08:00
refactor(ai_handler): add a return statement or raise an exception in the elif branch
This commit is contained in:
@ -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):
|
||||
|
Reference in New Issue
Block a user