getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
38.63k stars 4.14k forks source link

Use Azure OpenAI Libraries to Enable Azure OpenAI in addition to OpenAI integration #68972

Open sharkymcdongles opened 5 months ago

sharkymcdongles commented 5 months ago

Problem Statement

Most bigger organizations use Azure OpenAI rather than OpenAI directly since they already have Azure accounts. The current AI suggestion implemenation uses the OpenAI libs instead of the Azure libraries meaning you cannot support both options.

Solution Brainstorm

Migrate to these libraries https://platform.openai.com/docs/libraries/azure-openai-libraries

Product Area

Issues - Suggested Fix

getsantry[bot] commented 5 months ago

Assigning to @getsentry/support for routing ⏲️

sharkymcdongles commented 5 months ago

Looks like openai lib supports as well so might be as easy as allowing azure specific env vars and if they exist using the azure api client from openai.

sharkymcdongles commented 5 months ago

See this PR for a proposed way of solving this:

https://github.com/getsentry/sentry/pull/68981

getsantry[bot] commented 5 months ago

Routing to @getsentry/product-owners-issues-suggested-fix for triage ⏲️

trillville commented 5 months ago

@sharkymcdongles thanks for raising this issue and proposing a suggestion! One of our engineers, @JoshFerge is working on a general purpose LLM adapter.

https://github.com/getsentry/sentry/pull/68771

It would probably make sense to build off of this