mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
(feat) ui set tpm / rpm limits
This commit is contained in:
parent
f8a204c101
commit
9c4bf01bd6
1 changed files with 23 additions and 2 deletions
|
@ -70,20 +70,23 @@ const CreateKey: React.FC<CreateKeyProps> = ({
|
||||||
onOk={handleOk}
|
onOk={handleOk}
|
||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
>
|
>
|
||||||
<Form form={form} onFinish={handleCreate} labelCol={{ span: 6 }} wrapperCol={{ span: 16 }} labelAlign="left">
|
<Form form={form} onFinish={handleCreate} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} labelAlign="left">
|
||||||
{userRole === 'App Owner' || userRole === 'Admin' ? (
|
{userRole === 'App Owner' || userRole === 'Admin' ? (
|
||||||
<>
|
<>
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="Key Name"
|
label="Key Name"
|
||||||
name="key_alias"
|
name="key_alias"
|
||||||
>
|
>
|
||||||
<Input />
|
<Input />
|
||||||
|
<p style={{ fontStyle: 'italic', color: 'gray' }}>Optional</p>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="Team ID"
|
label="Team ID"
|
||||||
name="team_id"
|
name="team_id"
|
||||||
>
|
>
|
||||||
<Input placeholder="ai_team" />
|
<Input placeholder="ai_team" />
|
||||||
|
<p style={{ fontStyle: 'italic', color: 'gray' }}>Optional</p>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="Models"
|
label="Models"
|
||||||
|
@ -100,6 +103,7 @@ const CreateKey: React.FC<CreateKeyProps> = ({
|
||||||
</Option>
|
</Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
|
<p style={{ fontStyle: 'italic', color: 'gray' }}>Optional, defaults to all models</p>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
|
||||||
|
@ -108,18 +112,35 @@ const CreateKey: React.FC<CreateKeyProps> = ({
|
||||||
name="max_budget"
|
name="max_budget"
|
||||||
>
|
>
|
||||||
<InputNumber step={0.01} precision={2} width={200}/>
|
<InputNumber step={0.01} precision={2} width={200}/>
|
||||||
|
<p style={{ fontStyle: 'italic', color: 'gray' }}>Optional, defaults Unlimited Budget </p>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label="Tokens per minute Limit (TPM)"
|
||||||
|
name="tpm_limit"
|
||||||
|
>
|
||||||
|
<InputNumber step={1} width={400}/>
|
||||||
|
<p style={{ fontStyle: 'italic', color: 'gray' }}>Optional, defaults to Unlimited TPM</p>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label="Requests per minute Limit (RPM)"
|
||||||
|
name="rpm_limit"
|
||||||
|
>
|
||||||
|
<InputNumber step={1} width={400}/>
|
||||||
|
<p style={{ fontStyle: 'italic', color: 'gray' }}>Optional, defaults to Unlimited RPM</p>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="Duration (eg: 30s, 30h, 30d)"
|
label="Duration (eg: 30s, 30h, 30d)"
|
||||||
name="duration"
|
name="duration"
|
||||||
>
|
>
|
||||||
<Input />
|
<Input />
|
||||||
|
<p style={{ fontStyle: 'italic', color: 'gray' }}>Optional, defaults to never expiring key</p>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="Metadata"
|
label="Metadata"
|
||||||
name="metadata"
|
name="metadata"
|
||||||
>
|
>
|
||||||
<Input.TextArea rows={4} placeholder="Enter metadata as JSON" />
|
<Input.TextArea rows={4} placeholder="Enter metadata as JSON" />
|
||||||
|
<p style={{ fontStyle: 'italic', color: 'gray' }}>Optional, defaults to null</p>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue