Skip to content

Commit 9c51b4d

Browse files
authored
Add missing variable initialization. (#1352)
Under some weird circumstance, the `if` statements after the newly added line are both evaluating to `False`, causing the variable `provider_request` to never be initialized. This initializes the variable to a reasonable default value, but I'm not 100% sure it solves the problem. Fixes #1345
1 parent 55f6d86 commit 9c51b4d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/codegate/providers/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ async def complete(
287287
is_fim_request,
288288
)
289289

290+
provider_request = normalized_request # default value
290291
if input_pipeline_result.request:
291292
provider_request = self._input_normalizer.denormalize(input_pipeline_result.request)
292293
if is_fim_request:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy