Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No proper error handling if Azure filtered the response #136

Open
sentry-tum-ase bot opened this issue Jul 3, 2024 · 0 comments
Open

No proper error handling if Azure filtered the response #136

sentry-tum-ase bot opened this issue Jul 3, 2024 · 0 comments

Comments

@sentry-tum-ase
Copy link

sentry-tum-ase bot commented Jul 3, 2024

Sentry Issue: PYRIS-K

AttributeError: 'NoneType' object has no attribute 'contents'
(19 additional frame(s) were not displayed)
...
  File "app/retrieval/lecture_retrieval.py", line 462, in run_parallel_rewrite_tasks
    rewritten_query = rewritten_query_future.result()
  File "app/retrieval/lecture_retrieval.py", line 241, in rewrite_student_query
    raise e
  File "app/retrieval/lecture_retrieval.py", line 237, in rewrite_student_query
    response = (prompt | self.pipeline).invoke({})
  File "app/llm/langchain/iris_langchain_chat_model.py", line 44, in _generate
    base_message = convert_iris_message_to_langchain_message(iris_message)
  File "app/common/message_converters.py", line 13, in convert_iris_message_to_langchain_message
    if len(iris_message.contents) == 0:

More context: Ths request was filtered by Azure due to sexual explicit content (false positive) and Pyris was not able to handle the error properly, which is why this issue occurred.
Not super critical to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants