-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(ai): use openAI provider for suggested fix #69161
Conversation
@@ -264,28 +250,18 @@ def describe_event_for_ai(event, model): | |||
return data | |||
|
|||
|
|||
def suggest_fix(event_data, model=settings.SENTRY_AI_SUGGESTED_FIX_MODEL, stream=False): | |||
def suggest_fix(event_data, model=settings.SENTRY_AI_SUGGESTED_FIX_MODEL): | |||
"""Runs an OpenAI request to suggest a fix.""" | |||
prompt = PROMPT.replace("___FUN_PROMPT___", random.choice(FUN_PROMPT_CHOICES)) | |||
event_info = describe_event_for_ai(event_data, model=model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to use the model configured in the usecase config instead of settings.SENTRY_AI_SUGGESTED_FIX_MODEL
now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah good point, this parameter shouldn't be used anymore
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #69161 +/- ##
===========================================
- Coverage 81.44% 79.69% -1.76%
===========================================
Files 2843 6433 +3590
Lines 176165 285413 +109248
Branches 31430 49140 +17710
===========================================
+ Hits 143479 227450 +83971
- Misses 32683 57595 +24912
- Partials 3 368 +365
|
95f47ca
to
64ced53
Compare
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
instead of using openAI directly, use the new LLM usecase abstractions. Note we'll want to wait to merge this until we have documentation for self hosted, as they'll have to configure providers.