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

enhance(ai-help): Don't answer if no refs #277

Merged
merged 2 commits into from
Jul 6, 2023

Conversation

fiji-flo
Copy link
Contributor

@fiji-flo fiji-flo commented Jul 6, 2023

If we don't find any related content don't ask GPT.

@fiji-flo fiji-flo requested a review from caugner July 6, 2023 11:53
We replace it in the frontend.
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a change, otherwise LGTM, apart from the PaymentRequired bits that seem unrelated?

@@ -139,6 +143,8 @@ impl ApiError {
Self::LoginRequiredForFeature(_) => "Login Required",
Self::OpenAIError(_) => "Open AI error",
Self::AIError(_) => "AI error",
Self::PaymentRequired => "Payment required",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you split out the PaymentRequired part to a separate PR, since it doesn't seem to belong to this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its used in https://github.com/mdn/rumba/pull/277/files#diff-bcadba1de8298716d2007f60e8d59f39916df655a845cdfd8ac4ad4904b800edR157

Otherwise I need to return a less meaningful error or the types will get really really ugly.

@fiji-flo fiji-flo merged commit 5f9bb64 into main Jul 6, 2023
@fiji-flo fiji-flo deleted the MP-523-ai-help-improvements-1 branch July 6, 2023 16:29
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

Successfully merging this pull request may close these issues.

2 participants