UI - create keys limited to specific routes

This commit is contained in:
Ishaan Jaff 2024-05-21 17:39:37 -07:00
parent 62e5559e0a
commit 1d35b7543a

View file

@ -319,7 +319,21 @@ const CreateKey: React.FC<CreateKeyProps> = ({
> >
<TextInput placeholder="" /> <TextInput placeholder="" />
</Form.Item> </Form.Item>
<Form.Item label="Metadata" name="metadata">
<Form.Item
className="mt-8"
label="Allowed Routes"
name="permissions"
help={`Select routes this key is allowed to access`}
>
<Select defaultValue={null} placeholder="n/a" mode="multiple" defaultValue={['get_spend_routes', 'llm_routes']}>
<Select.Option value="get_spend_routes">Spend Reporting Routes (/global/spend/report, etc) </Select.Option>
<Select.Option value="llm_routes">LLM routes (/chat, /completions, /embeddings)</Select.Option>
</Select>
</Form.Item>
<Form.Item label="Metadata" name="metadata" className="mt-8">
<Input.TextArea <Input.TextArea
rows={4} rows={4}
placeholder="Enter metadata as JSON" placeholder="Enter metadata as JSON"