diff --git a/ui/litellm-dashboard/src/components/callback_info_helpers.tsx b/ui/litellm-dashboard/src/components/callback_info_helpers.tsx index b615a7945e..66ef4d8738 100644 --- a/ui/litellm-dashboard/src/components/callback_info_helpers.tsx +++ b/ui/litellm-dashboard/src/components/callback_info_helpers.tsx @@ -46,7 +46,7 @@ const asset_logos_folder = '/ui/assets/logos/'; interface CallbackInfo { logo: string; supports_key_team_logging: boolean; - dynamic_params: Record; + dynamic_params: Record; description: string | null; } @@ -86,7 +86,8 @@ export const callbackInfo: Record = { dynamic_params: { "langsmith_api_key": "password", "langsmith_project": "text", - "langsmith_base_url": "text" + "langsmith_base_url": "text", + "langsmith_sampling_rate": "number" }, description: "Langsmith Logging Integration" }, diff --git a/ui/litellm-dashboard/src/components/team/LoggingSettings.tsx b/ui/litellm-dashboard/src/components/team/LoggingSettings.tsx index c81acefebd..f0b660d01d 100644 --- a/ui/litellm-dashboard/src/components/team/LoggingSettings.tsx +++ b/ui/litellm-dashboard/src/components/team/LoggingSettings.tsx @@ -6,6 +6,7 @@ import { InfoCircleOutlined } from '@ant-design/icons'; import { Button, Card, TextInput } from '@tremor/react'; import { PlusIcon, TrashIcon, CogIcon, BanIcon } from '@heroicons/react/outline'; import { callbackInfo, Callbacks, callback_map, mapDisplayToInternalNames } from '../callback_info_helpers'; +import NumericalInput from '../shared/numerical_input'; const { Option } = Select; @@ -126,13 +127,33 @@ const LoggingSettings: React.FC = ({ Sensitive )} + {paramType === 'number' && ( + + Number + + )} - updateCallbackVar(configIndex, paramName, e.target.value)} - /> + {paramType === 'number' && ( + + Value must be between 0 and 1 + + )} + {paramType === 'number' ? ( + updateCallbackVar(configIndex, paramName, e.target.value)} + /> + ) : ( + updateCallbackVar(configIndex, paramName, e.target.value)} + /> + )} ))}