chore: Fix OpenAI sentry errors (#7687)

- add check for nil condition
- add logs for openAI
This commit is contained in:
Sojan Jose
2023-08-07 14:08:26 -07:00
committed by GitHub
parent ed82eb2932
commit 4c75bb68f4
3 changed files with 16 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ module Enterprise::Integrations::OpenaiProcessorService
# To what you ask? Sometimes, the response includes
# "Labels:" in it's response in some format. This is a hacky way to remove it
# TODO: Fix with with a better prompt
response.gsub(/^(label|labels):/i, '')
response.present? ? response.gsub(/^(label|labels):/i, '') : ''
end
private