fix(nordagpt): add 'lub/czy' to hallucination prefix patterns
Some checks are pending
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
Some checks are pending
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
This commit is contained in:
parent
513d32ffb2
commit
365de18301
@ -265,9 +265,9 @@ class NordaBizChatEngine:
|
||||
logger.warning(f"NordaGPT hallucination blocked: plain text '{name}' after '{prefix}' not in DB")
|
||||
return ''
|
||||
|
||||
# Pattern 1: "firma X", "również X", "oraz X"
|
||||
# Pattern 1: "firma X", "również X", "oraz X", "lub X", "i X"
|
||||
text = re.sub(
|
||||
r'(firma|firmą|firmę|firmy|również|oraz)\s+([A-ZĄĘÓŁŹŻŚĆŃ][a-zA-ZąęółźżśćńĄĘÓŁŹŻŚĆŃ-]{2,25}(?:\s+[A-ZĄĘÓŁŹŻŚĆŃ][a-zA-ZąęółźżśćńĄĘÓŁŹŻŚĆŃ-]+)?)',
|
||||
r'(firma|firmą|firmę|firmy|również|oraz|lub|czy)\s+([A-ZĄĘÓŁŹŻŚĆŃ][a-zA-ZąęółźżśćńĄĘÓŁŹŻŚĆŃ-]{2,25}(?:\s+[A-ZĄĘÓŁŹŻŚĆŃ][a-zA-ZąęółźżśćńĄĘÓŁŹŻŚĆŃ-]+)?)',
|
||||
replace_plain_company, text
|
||||
)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user