Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@keegangeorge
Copy link
Member

@keegangeorge keegangeorge commented Oct 1, 2024

🔍 Overview

This PR updates the rate limits for AI helper so that image caption follows a specific rate limit of 20 requests per minute. This should help when uploading multiple files that need to be captioned. This PR also updates the UI so that it shows toast message with the extracted error message instead of having a blocking popupAjaxError error dialog.

📸 Screenshots

Screenshot 2024-10-01 at 16 08 09

requires_plugin ::DiscourseAi::PLUGIN_NAME
requires_login
before_action :ensure_can_request_suggestions
before_action :rate_limiter_performed!, except: %i[prompts]
Copy link
Member Author

Choose a reason for hiding this comment

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

Sneaking in this small change that was missed previously. The prompts controller action no longer exists as it was removed here #472.

Copy link
Contributor

@tyb-talks tyb-talks left a comment

Choose a reason for hiding this comment

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

looks good! left a minor comment.

xfalcox and others added 4 commits October 2, 2024 12:27
- Surface rate limit error message
- Use constants for rate limit amount/intervals
@keegangeorge keegangeorge merged commit 110a162 into main Oct 2, 2024
5 checks passed
@keegangeorge keegangeorge deleted the fix-rate-limit-ic branch October 2, 2024 17:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants