mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-02-07 20:18:16 +00:00
d07cf51653
Adds a comprehensive quota management system for LLM models that allows: - Setting per-group (applied per user in the group) token and usage limits with configurable durations - Tracking and enforcing token/usage limits across user groups - Quota reset periods (hourly, daily, weekly, or custom) - Admin UI for managing quotas with real-time updates This system provides granular control over LLM API usage by allowing admins to define limits on both total tokens and number of requests per group. Supports multiple concurrent quotas per model and automatically handles quota resets. Co-authored-by: Keegan George <kgeorge13@gmail.com>
30 lines
606 B
Plaintext
30 lines
606 B
Plaintext
import { computed } from "@ember/object";
|
|
import { i18n } from "discourse-i18n";
|
|
import ComboBox from "select-kit/components/combo-box";
|
|
|
|
export default ComboBox.extend({
|
|
content: computed(function () {
|
|
const content = [
|
|
{
|
|
id: -1,
|
|
name: i18n("discourse_ai.ai_persona.tool_strategies.all"),
|
|
},
|
|
];
|
|
|
|
[1, 2, 5].forEach((i) => {
|
|
content.push({
|
|
id: i,
|
|
name: i18n("discourse_ai.ai_persona.tool_strategies.replies", {
|
|
count: i,
|
|
}),
|
|
});
|
|
});
|
|
|
|
return content;
|
|
}),
|
|
|
|
selectKitOptions: {
|
|
filterable: false,
|
|
},
|
|
});
|