openllmetry icon indicating copy to clipboard operation
openllmetry copied to clipboard

Added logging for content filter

Open dtee1 opened this issue 10 months ago • 6 comments

  • [ ] I have added tests that cover my changes.
  • [ ] If adding a new instrumentation or changing an existing one, I've added screenshots from some observability platform showing the change.
  • [ ] PR name follows conventional commits format: feat(instrumentation): ... or fix(instrumentation): ....
  • [ ] (If applicable) I have updated the documentation accordingly.

dtee1 avatar Apr 27 '24 13:04 dtee1

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 27 '24 13:04 CLAassistant

Thanks @dtee1 but I think we already wrap everything with a try-catch and log an exception (see the @dont_throw annotation)

nirga avatar Apr 27 '24 13:04 nirga

Thanks @dtee1 but I think we already wrap everything with a try-catch and log an exception (see the @dont_throw annotation)

Ok sounds good. I can take that out. Would you rather I just log the warning in an else?

dtee1 avatar Apr 27 '24 23:04 dtee1

Thanks @dtee1 but I think we already wrap everything with a try-catch and log an exception (see the @dont_throw annotation)

Ok sounds good. I can take that out. Would you rather I just log the warning in an else?

We also log there 😀

nirga avatar Apr 28 '24 06:04 nirga

Thanks @dtee1 but I think we already wrap everything with a try-catch and log an exception (see the @dont_throw annotation)

Ok sounds good. I can take that out. Would you rather I just log the warning in an else?

We also log there 😀

Ok, how is the fix #855 supposed to be implemented? Maybe I missed something

dtee1 avatar Apr 28 '24 14:04 dtee1

@dtee1 so when calling azure it may filter the response returned from the model if it contains harmful text, see https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter?tabs=warning%2Cpython-new

We should add attributes to the span according to those returned from azure in this case.

nirga avatar Apr 28 '24 15:04 nirga

Superseded by #1539

nirga avatar Jul 17 '24 16:07 nirga