Skip to content

Commit cece3e6

Browse files
committed
Merge NVIDIA#51: Bug fix - avoic str concat with None when logging user_intent
2 parents fa3d65e + b9409cf commit cece3e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nemoguardrails/actions/llm/generation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,10 @@ async def generate_user_intent(self, events: List[dict]):
269269
if user_intent and user_intent.startswith("user "):
270270
user_intent = user_intent[5:]
271271

272-
log.info("Canonical form for user intent: %s", user_intent)
272+
log.info(
273+
"Canonical form for user intent: "
274+
+ (user_intent if user_intent else "None")
275+
)
273276

274277
if user_intent is None:
275278
return ActionResult(

0 commit comments

Comments
 (0)