mirror of
https://github.com/BerriAI/litellm.git
synced 2025-12-06 11:33:26 +08:00
removed unused imports
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
{
|
||||
"extends": "next/core-web-vitals",
|
||||
"extends": ["next/core-web-vitals", "eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
|
||||
"plugins": ["unused-imports"],
|
||||
"rules": {
|
||||
"unused-imports/no-unused-imports": "error"
|
||||
"unused-imports/no-unused-imports": "error",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-expressions": "off",
|
||||
"@typescript-eslint/ban-ts-comment": "off",
|
||||
"prefer-const": "off",
|
||||
"no-empty": "off",
|
||||
"no-prototype-builtins": "off",
|
||||
"no-useless-catch": "off",
|
||||
"no-useless-escape": "off",
|
||||
"no-self-assign": "off"
|
||||
}
|
||||
}
|
||||
|
||||
16
ui/litellm-dashboard/package-lock.json
generated
16
ui/litellm-dashboard/package-lock.json
generated
@@ -56,6 +56,7 @@
|
||||
"autoprefixer": "^10.4.17",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.2.32",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-unused-imports": "^4.2.0",
|
||||
"jsdom": "^27.0.0",
|
||||
"postcss": "^8.4.33",
|
||||
@@ -10461,6 +10462,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-config-prettier": {
|
||||
"version": "10.1.8",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz",
|
||||
"integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"eslint-config-prettier": "bin/cli.js"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint-config-prettier"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-import-resolver-node": {
|
||||
"version": "0.3.9",
|
||||
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
"autoprefixer": "^10.4.17",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.2.32",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-unused-imports": "^4.2.0",
|
||||
"jsdom": "^27.0.0",
|
||||
"postcss": "^8.4.33",
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import AdminPanel from "@/components/admins";
|
||||
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
|
||||
import { useState } from "react";
|
||||
import { Team } from "@/components/key_team_helpers/key_list";
|
||||
import useTeams from "@/app/(dashboard)/hooks/useTeams";
|
||||
|
||||
const AdminSettings = () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import useKeyList, { KeyResponse } from "@/components/key_team_helpers/key_list";
|
||||
import useKeyList from "@/components/key_team_helpers/key_list";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
|
||||
import UserDashboard from "@/components/user_dashboard";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"use client";
|
||||
import React, { Suspense, useEffect, useState } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import { modelHubCall } from "@/components/networking";
|
||||
import PublicModelHubPage from "@/components/public_model_hub";
|
||||
|
||||
export default function PublicModelHub() {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"use client";
|
||||
import React, { Suspense, useEffect, useState } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import { modelHubCall } from "@/components/networking";
|
||||
import ModelHubTable from "@/components/model_hub_table";
|
||||
|
||||
export default function PublicModelHubTable() {
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
"use client";
|
||||
import React, { Suspense, useEffect, useState } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import { Card, Title, Text, TextInput, Callout, Button, Grid, Col } from "@tremor/react";
|
||||
import { RiAlarmWarningLine, RiCheckboxCircleLine } from "@remixicon/react";
|
||||
import { RiCheckboxCircleLine } from "@remixicon/react";
|
||||
import {
|
||||
invitationClaimCall,
|
||||
userUpdateUserCall,
|
||||
getOnboardingCredentials,
|
||||
claimOnboardingToken,
|
||||
getUiConfig,
|
||||
getProxyBaseUrl,
|
||||
} from "@/components/networking";
|
||||
import { jwtDecode } from "jwt-decode";
|
||||
import { Form, Button as Button2, message } from "antd";
|
||||
import { Form, Button as Button2 } from "antd";
|
||||
import { getCookie } from "@/utils/cookieUtils";
|
||||
|
||||
export default function Onboarding() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Card, Title, Text, Grid, Col, Button as TremorButton, Callout, TextInput, Divider } from "@tremor/react";
|
||||
import { message, Form } from "antd";
|
||||
import { Card, Title, Text, Grid, Button as TremorButton, Callout, TextInput, Divider } from "@tremor/react";
|
||||
import { Form } from "antd";
|
||||
import { keyCreateCall } from "./networking";
|
||||
import { CopyToClipboard } from "react-copy-to-clipboard";
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Modal, Form, Input, Button as Button2, Select, message } from "antd";
|
||||
import { Modal, Form, Input, Button as Button2, Select } from "antd";
|
||||
import { Text, TextInput } from "@tremor/react";
|
||||
import { getSSOSettings, updateSSOSettings } from "./networking";
|
||||
import NotificationsManager from "./molecules/notifications_manager";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Card, Title, Text, Divider, Button, TextInput } from "@tremor/react";
|
||||
import { Typography, Spin, message, Switch, Select, Form, InputNumber } from "antd";
|
||||
import { Typography, Spin, Switch, Select, InputNumber } from "antd";
|
||||
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
||||
import { getInternalUserSettings, updateInternalUserSettings, modelAvailableCall } from "./networking";
|
||||
import BudgetDurationDropdown, { getBudgetDurationLabel } from "./common_components/budget_duration_dropdown";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Card, Title, Text, Divider, Button, TextInput } from "@tremor/react";
|
||||
import { Typography, Spin, message, Switch, Select, Form } from "antd";
|
||||
import { Typography, Spin, Switch, Select } from "antd";
|
||||
import { getDefaultTeamSettings, updateDefaultTeamSettings, modelAvailableCall } from "./networking";
|
||||
import BudgetDurationDropdown, { getBudgetDurationLabel } from "./common_components/budget_duration_dropdown";
|
||||
import { getModelDisplayName } from "./key_team_helpers/fetch_available_models_team_key";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Form, Button as Button2, Select, message } from "antd";
|
||||
import { Form, Button as Button2, Select } from "antd";
|
||||
import { Text, TextInput } from "@tremor/react";
|
||||
import { getSSOSettings, updateSSOSettings } from "./networking";
|
||||
import NotificationManager from "./molecules/notifications_manager";
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
*/
|
||||
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Button, TextInput, Grid, Col } from "@tremor/react";
|
||||
import { Select, SelectItem, MultiSelect, MultiSelectItem, SearchSelect, SearchSelectItem } from "@tremor/react";
|
||||
import { Button } from "@tremor/react";
|
||||
import { SearchSelect, SearchSelectItem } from "@tremor/react";
|
||||
import { setCallbacksCall } from "./networking";
|
||||
import { Modal, Form, message } from "antd";
|
||||
import { Modal, Form } from "antd";
|
||||
import { fetchAvailableModels, ModelGroup } from "./chat_ui/llm_calls/fetch_models";
|
||||
import NotificationManager from "./molecules/notifications_manager";
|
||||
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Card, Form, Button, Tooltip, Typography, Select as AntdSelect, Modal, Upload, message } from "antd";
|
||||
import { Card, Form, Button, Tooltip, Typography, Select as AntdSelect, Modal } from "antd";
|
||||
import type { FormInstance } from "antd";
|
||||
import type { UploadProps } from "antd/es/upload";
|
||||
import { UploadOutlined } from "@ant-design/icons";
|
||||
import { Text, TextInput } from "@tremor/react";
|
||||
import { Row, Col } from "antd";
|
||||
import { CredentialItem, modelAvailableCall } from "../networking";
|
||||
import { modelAvailableCall } from "../networking";
|
||||
import ConnectionErrorDisplay from "./model_connection_test";
|
||||
import { all_admin_roles } from "@/utils/roles";
|
||||
import { handleAddAutoRouterSubmit } from "./handle_add_auto_router_submit";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useMemo, useState } from "react";
|
||||
import { Card, Form, Button, Tooltip, Typography, Select as AntdSelect, Modal, message } from "antd";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Card, Form, Button, Tooltip, Typography, Select as AntdSelect, Modal } from "antd";
|
||||
import type { FormInstance } from "antd";
|
||||
import type { UploadProps } from "antd/es/upload";
|
||||
import { TabGroup, TabList, Tab, TabPanels, TabPanel } from "@tremor/react";
|
||||
@@ -7,13 +7,13 @@ import LiteLLMModelNameField from "./litellm_model_name";
|
||||
import ConditionalPublicModelName from "./conditional_public_model_name";
|
||||
import ProviderSpecificFields from "./provider_specific_fields";
|
||||
import AdvancedSettings from "./advanced_settings";
|
||||
import { Providers, providerLogoMap, getPlaceholder } from "../provider_info_helpers";
|
||||
import { Providers, providerLogoMap } from "../provider_info_helpers";
|
||||
import type { Team } from "../key_team_helpers/key_list";
|
||||
import { CredentialItem, getGuardrailsList, modelAvailableCall } from "../networking";
|
||||
import ConnectionErrorDisplay from "./model_connection_test";
|
||||
import { TEST_MODES } from "./add_model_modes";
|
||||
import { Row, Col } from "antd";
|
||||
import { Text, TextInput, Switch } from "@tremor/react";
|
||||
import { Text, Switch } from "@tremor/react";
|
||||
import TeamDropdown from "../common_components/team_dropdown";
|
||||
import { all_admin_roles } from "@/utils/roles";
|
||||
import AddAutoRouterTab from "./add_auto_router_tab";
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import React from "react";
|
||||
import { Form, Switch, Select, Input, Tooltip } from "antd";
|
||||
import { Text, Button, Accordion, AccordionHeader, AccordionBody, TextInput } from "@tremor/react";
|
||||
import { Row, Col, Typography, Card } from "antd";
|
||||
import { Form, Switch, Select, Tooltip } from "antd";
|
||||
import { Text, Accordion, AccordionHeader, AccordionBody, TextInput } from "@tremor/react";
|
||||
import { Row, Col, Typography } from "antd";
|
||||
import TextArea from "antd/es/input/TextArea";
|
||||
import { InfoCircleOutlined } from "@ant-design/icons";
|
||||
import { Team } from "../key_team_helpers/key_list";
|
||||
import TeamDropdown from "../common_components/team_dropdown";
|
||||
import CacheControlSettings from "./cache_control_settings";
|
||||
const { Link } = Typography;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { Form, Switch, Select, Input, Typography } from "antd";
|
||||
import { Form, Switch, Select, Typography } from "antd";
|
||||
import { PlusOutlined, MinusCircleOutlined } from "@ant-design/icons";
|
||||
import NumericalInput from "../shared/numerical_input";
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { message } from "antd";
|
||||
import { modelCreateCall, Model } from "../networking";
|
||||
import NotificationManager from "../molecules/notifications_manager";
|
||||
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { message } from "antd";
|
||||
import { provider_map, Providers } from "../provider_info_helpers";
|
||||
import { modelCreateCall, Model } from "../networking";
|
||||
import React, { useState } from "react";
|
||||
import ConnectionErrorDisplay from "./model_connection_test";
|
||||
import NotificationManager from "../molecules/notifications_manager";
|
||||
|
||||
export const prepareModelAddRequest = async (formValues: Record<string, any>, accessToken: string, form: any) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { Typography, Space, Button, Divider, message } from "antd";
|
||||
import { Typography, Button, Divider } from "antd";
|
||||
import { WarningOutlined, InfoCircleOutlined, CopyOutlined } from "@ant-design/icons";
|
||||
import { testConnectionRequest } from "../networking";
|
||||
import { prepareModelAddRequest } from "./handle_add_model_submit";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Card, Form, Button, Input, InputNumber, Select as AntdSelect, Space, Tooltip, Collapse } from "antd";
|
||||
import { Card, Button, Input, InputNumber, Select as AntdSelect, Tooltip, Collapse } from "antd";
|
||||
import { PlusOutlined, DeleteOutlined, InfoCircleOutlined, DownOutlined } from "@ant-design/icons";
|
||||
import { Text, TextInput } from "@tremor/react";
|
||||
import { Text } from "@tremor/react";
|
||||
import { ModelGroup } from "../chat_ui/llm_calls/fetch_models";
|
||||
|
||||
const { TextArea } = Input;
|
||||
|
||||
@@ -2,46 +2,26 @@
|
||||
* Modal to add fallbacks to the proxy router config
|
||||
*/
|
||||
|
||||
import React, { useState, useEffect, useRef } from "react";
|
||||
import { Button, TextInput, Grid, Col, Switch } from "@tremor/react";
|
||||
import React, { useState } from "react";
|
||||
import { Button, TextInput, Switch } from "@tremor/react";
|
||||
import {
|
||||
Select,
|
||||
SelectItem,
|
||||
MultiSelect,
|
||||
MultiSelectItem,
|
||||
Card,
|
||||
Metric,
|
||||
Text,
|
||||
Title,
|
||||
Subtitle,
|
||||
Accordion,
|
||||
AccordionHeader,
|
||||
AccordionBody,
|
||||
} from "@tremor/react";
|
||||
import { createPassThroughEndpoint } from "./networking";
|
||||
import {
|
||||
Button as Button2,
|
||||
Modal,
|
||||
Form,
|
||||
Input,
|
||||
InputNumber,
|
||||
Select as Select2,
|
||||
message,
|
||||
Tooltip,
|
||||
Alert,
|
||||
Divider,
|
||||
Collapse,
|
||||
} from "antd";
|
||||
import NumericalInput from "./shared/numerical_input";
|
||||
import {
|
||||
InfoCircleOutlined,
|
||||
ApiOutlined,
|
||||
ExclamationCircleOutlined,
|
||||
CheckCircleOutlined,
|
||||
CopyOutlined,
|
||||
} from "@ant-design/icons";
|
||||
import { keyCreateCall, slackBudgetAlertsHealthCheck, modelAvailableCall } from "./networking";
|
||||
import { list } from "postcss";
|
||||
import KeyValueInput from "./key_value_input";
|
||||
import { passThroughItem } from "./pass_through_settings";
|
||||
import RoutePreview from "./route_preview";
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Typography } from "antd";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { Button as Button2, Modal, Form, Input, Select as Select2, InputNumber, message } from "antd";
|
||||
import { CopyToClipboard } from "react-copy-to-clipboard";
|
||||
import { Select, SelectItem, Subtitle } from "@tremor/react";
|
||||
import { Button as Button2, Modal, Form, Input } from "antd";
|
||||
import { Select, SelectItem } from "@tremor/react";
|
||||
import { Team } from "./key_team_helpers/key_list";
|
||||
import {
|
||||
Table,
|
||||
@@ -17,24 +16,16 @@ import {
|
||||
TableHeaderCell,
|
||||
TableRow,
|
||||
Card,
|
||||
Icon,
|
||||
Button,
|
||||
Col,
|
||||
Text,
|
||||
Grid,
|
||||
Callout,
|
||||
Divider,
|
||||
TabGroup,
|
||||
TabList,
|
||||
Tab,
|
||||
TabPanel,
|
||||
TabPanels,
|
||||
} from "@tremor/react";
|
||||
import { PencilAltIcon } from "@heroicons/react/outline";
|
||||
import OnboardingModal from "./onboarding_link";
|
||||
import { InvitationLink } from "./onboarding_link";
|
||||
import SSOModals from "./SSOModals";
|
||||
import { ssoProviderConfigs } from "./SSOModals";
|
||||
import SCIMConfig from "./SCIM";
|
||||
import UIAccessControlForm from "./UIAccessControlForm";
|
||||
import NotificationsManager from "./molecules/notifications_manager";
|
||||
|
||||
@@ -2,21 +2,9 @@
|
||||
* UI for controlling slack alerting settings
|
||||
*/
|
||||
import React, { useState, useEffect } from "react";
|
||||
import {
|
||||
Table,
|
||||
TableHead,
|
||||
TableRow,
|
||||
TableHeaderCell,
|
||||
TableCell,
|
||||
Button,
|
||||
Icon,
|
||||
Badge,
|
||||
TableBody,
|
||||
Text,
|
||||
} from "@tremor/react";
|
||||
import { InputNumber, message } from "antd";
|
||||
|
||||
|
||||
import { alertingSettingsCall, updateConfigFieldSetting } from "../networking";
|
||||
import { TrashIcon, CheckCircleIcon } from "@heroicons/react/outline";
|
||||
import DynamicForm from "./dynamic_form";
|
||||
import NotificationsManager from "../molecules/notifications_manager";
|
||||
interface alertingSettingsItem {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React from "react";
|
||||
import { Form, Input, InputNumber, Row, Col, Button as Button2 } from "antd";
|
||||
import { Form, Input, InputNumber, Button as Button2 } from "antd";
|
||||
import { TrashIcon, CheckCircleIcon } from "@heroicons/react/outline";
|
||||
import { Button, Badge, Icon, Text, TableRow, TableCell, Switch } from "@tremor/react";
|
||||
import Paragraph from "antd/es/typography/Paragraph";
|
||||
interface AlertingSetting {
|
||||
field_name: string;
|
||||
field_description: string;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"use client";
|
||||
import React, { useEffect, useState, useCallback, useRef } from "react";
|
||||
import { ColumnDef, Row } from "@tanstack/react-table";
|
||||
import { DataTable } from "./view_logs/table";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { ColumnDef } from "@tanstack/react-table";
|
||||
import { Select, SelectItem } from "@tremor/react";
|
||||
import { Button } from "@tremor/react";
|
||||
import KeyInfoView from "./templates/key_info_view";
|
||||
@@ -9,16 +8,10 @@ import { Tooltip } from "antd";
|
||||
import { Team, KeyResponse } from "./key_team_helpers/key_list";
|
||||
import FilterComponent from "./molecules/filter";
|
||||
import { FilterOption } from "./molecules/filter";
|
||||
import { keyListCall, Organization, userListCall } from "./networking";
|
||||
import { createTeamSearchFunction } from "./key_team_helpers/team_search_fn";
|
||||
import { createOrgSearchFunction } from "./key_team_helpers/organization_search_fn";
|
||||
import { Organization, userListCall } from "./networking";
|
||||
import { useFilterLogic } from "./key_team_helpers/filter_logic";
|
||||
import { Setter } from "@/types";
|
||||
import { updateExistingKeys } from "@/utils/dataUtils";
|
||||
import { debounce } from "lodash";
|
||||
import { defaultPageSize } from "./constants";
|
||||
import { fetchAllTeams } from "./key_team_helpers/filter_helpers";
|
||||
import { fetchAllOrganizations } from "./key_team_helpers/filter_helpers";
|
||||
import { flexRender, getCoreRowModel, getSortedRowModel, SortingState, useReactTable } from "@tanstack/react-table";
|
||||
import { Table, TableHead, TableHeaderCell, TableBody, TableRow, TableCell, Icon } from "@tremor/react";
|
||||
import { SwitchVerticalIcon, ChevronUpIcon, ChevronDownIcon, ChevronRightIcon } from "@heroicons/react/outline";
|
||||
|
||||
@@ -1,23 +1,7 @@
|
||||
"use client";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import React from "react";
|
||||
import {
|
||||
Badge,
|
||||
Card,
|
||||
Table,
|
||||
Metric,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableHeaderCell,
|
||||
TableRow,
|
||||
Text,
|
||||
Title,
|
||||
Icon,
|
||||
Accordion,
|
||||
AccordionBody,
|
||||
AccordionHeader,
|
||||
List,
|
||||
ListItem,
|
||||
Tab,
|
||||
TabGroup,
|
||||
TabList,
|
||||
@@ -25,8 +9,6 @@ import {
|
||||
TabPanels,
|
||||
Grid,
|
||||
} from "@tremor/react";
|
||||
import { Statistic } from "antd";
|
||||
import { modelAvailableCall } from "./networking";
|
||||
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
||||
|
||||
interface ApiRefProps {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { Button, TextInput, Grid, Col, Accordion, AccordionHeader, AccordionBody } from "@tremor/react";
|
||||
import { Button as Button2, Modal, Form, Input, InputNumber, Select, message } from "antd";
|
||||
import { TextInput, Accordion, AccordionHeader, AccordionBody } from "@tremor/react";
|
||||
import { Button as Button2, Modal, Form, InputNumber, Select } from "antd";
|
||||
import { budgetCreateCall } from "../networking";
|
||||
import NotificationsManager from "../molecules/notifications_manager";
|
||||
|
||||
|
||||
@@ -4,14 +4,12 @@
|
||||
*/
|
||||
|
||||
import React, { useState, useEffect } from "react";
|
||||
import BudgetSettings from "./budget_settings";
|
||||
import BudgetModal from "./budget_modal";
|
||||
import EditBudgetModal from "./edit_budget_modal";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableFoot,
|
||||
TableHead,
|
||||
TableHeaderCell,
|
||||
TableRow,
|
||||
@@ -24,18 +22,10 @@ import {
|
||||
TabList,
|
||||
TabPanel,
|
||||
TabPanels,
|
||||
Grid,
|
||||
} from "@tremor/react";
|
||||
import {
|
||||
InformationCircleIcon,
|
||||
PencilAltIcon,
|
||||
PencilIcon,
|
||||
StatusOnlineIcon,
|
||||
TrashIcon,
|
||||
RefreshIcon,
|
||||
CheckCircleIcon,
|
||||
XCircleIcon,
|
||||
QuestionMarkCircleIcon,
|
||||
} from "@heroicons/react/outline";
|
||||
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
||||
import { getBudgetList, budgetDeleteCall } from "../networking";
|
||||
|
||||
@@ -1,45 +1,21 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import {
|
||||
Card,
|
||||
Title,
|
||||
Subtitle,
|
||||
Table,
|
||||
TableHead,
|
||||
TableRow,
|
||||
Badge,
|
||||
TableHeaderCell,
|
||||
TableCell,
|
||||
TableBody,
|
||||
Metric,
|
||||
Text,
|
||||
Grid,
|
||||
Button,
|
||||
TextInput,
|
||||
Select as Select2,
|
||||
SelectItem,
|
||||
Col,
|
||||
Accordion,
|
||||
AccordionBody,
|
||||
AccordionHeader,
|
||||
AccordionList,
|
||||
} from "@tremor/react";
|
||||
import { TabPanel, TabPanels, TabGroup, TabList, Tab, Icon } from "@tremor/react";
|
||||
import { Icon } from "@tremor/react";
|
||||
import { getBudgetSettings } from "../networking";
|
||||
import { Modal, Form, Input, Select, Button as Button2, message, InputNumber } from "antd";
|
||||
import { InputNumber } from "antd";
|
||||
import {
|
||||
InformationCircleIcon,
|
||||
PencilAltIcon,
|
||||
PencilIcon,
|
||||
StatusOnlineIcon,
|
||||
TrashIcon,
|
||||
RefreshIcon,
|
||||
CheckCircleIcon,
|
||||
XCircleIcon,
|
||||
QuestionMarkCircleIcon,
|
||||
} from "@heroicons/react/outline";
|
||||
import AddFallbacks from "../add_fallbacks";
|
||||
import openai from "openai";
|
||||
import Paragraph from "antd/es/skeleton/Paragraph";
|
||||
|
||||
interface BudgetSettingsPageProps {
|
||||
accessToken: string | null;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { Button, TextInput, Grid, Col, Accordion, AccordionHeader, AccordionBody } from "@tremor/react";
|
||||
import { Button as Button2, Modal, Form, Input, InputNumber, Select, message } from "antd";
|
||||
import { TextInput, Accordion, AccordionHeader, AccordionBody } from "@tremor/react";
|
||||
import { Button as Button2, Modal, Form, InputNumber, Select } from "antd";
|
||||
import { budgetUpdateCall } from "../networking";
|
||||
import { budgetItem } from "./budget_panel";
|
||||
import NotificationsManager from "../molecules/notifications_manager";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Button as TremorButton, Text } from "@tremor/react";
|
||||
import { Modal, Table, Upload, message, Alert, Typography } from "antd";
|
||||
import { Modal, Table, Upload, Typography } from "antd";
|
||||
import {
|
||||
UploadOutlined,
|
||||
DownloadOutlined,
|
||||
@@ -13,7 +13,6 @@ import { userCreateCall, invitationCreateCall, getProxyUISettings } from "./netw
|
||||
import Papa from "papaparse";
|
||||
import { CheckCircleIcon, XCircleIcon, ExclamationIcon } from "@heroicons/react/outline";
|
||||
import { CopyToClipboard } from "react-copy-to-clipboard";
|
||||
import { InvitationLink } from "./onboarding_link";
|
||||
import NotificationsManager from "./molecules/notifications_manager";
|
||||
|
||||
interface BulkCreateUsersProps {
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
import React, { useState } from "react";
|
||||
import {
|
||||
Button as Button2,
|
||||
Modal,
|
||||
Typography,
|
||||
Divider,
|
||||
message,
|
||||
Table,
|
||||
Select,
|
||||
Form,
|
||||
InputNumber,
|
||||
Card,
|
||||
Space,
|
||||
Checkbox,
|
||||
} from "antd";
|
||||
import { Button } from "@tremor/react";
|
||||
import { userBulkUpdateUserCall, teamBulkMemberAddCall, Member } from "./networking";
|
||||
import { UserEditView } from "./user_edit_view";
|
||||
import NotificationsManager from "./molecules/notifications_manager";
|
||||
|
||||
@@ -1,33 +1,26 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import {
|
||||
Card,
|
||||
Title,
|
||||
BarChart,
|
||||
Subtitle,
|
||||
Grid,
|
||||
Col,
|
||||
Select,
|
||||
SelectItem,
|
||||
DateRangePicker,
|
||||
DateRangePickerValue,
|
||||
MultiSelect,
|
||||
MultiSelectItem,
|
||||
Button,
|
||||
TabPanel,
|
||||
TabPanels,
|
||||
TabGroup,
|
||||
TabList,
|
||||
Tab,
|
||||
TextInput,
|
||||
Icon,
|
||||
Text,
|
||||
} from "@tremor/react";
|
||||
import UsageDatePicker from "./shared/usage_date_picker";
|
||||
import NotificationsManager from "./molecules/notifications_manager";
|
||||
|
||||
import { Button as Button2, message } from "antd";
|
||||
import { RefreshIcon, CheckCircleIcon, XCircleIcon } from "@heroicons/react/outline";
|
||||
import { adminGlobalCacheActivity, cachingHealthCheckCall, healthCheckCall } from "./networking";
|
||||
import { RefreshIcon } from "@heroicons/react/outline";
|
||||
import { adminGlobalCacheActivity, cachingHealthCheckCall } from "./networking";
|
||||
|
||||
// Import the new component
|
||||
import { CacheHealthTab } from "./cache_health";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { Card, Text, Button, TabGroup, TabList, Tab, TabPanel, TabPanels } from "@tremor/react";
|
||||
import { Text, Button, TabGroup, TabList, Tab, TabPanel, TabPanels } from "@tremor/react";
|
||||
import { CheckCircleIcon, XCircleIcon, ClipboardCopyIcon } from "@heroicons/react/outline";
|
||||
import { ResponseTimeIndicator } from "./response_time_indicator";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { Upload, Tooltip } from "antd";
|
||||
import { PaperClipOutlined, DeleteOutlined } from "@ant-design/icons";
|
||||
import { PaperClipOutlined } from "@ant-design/icons";
|
||||
|
||||
const { Dragger } = Upload;
|
||||
|
||||
|
||||
@@ -3,28 +3,13 @@ import ReactMarkdown from "react-markdown";
|
||||
import {
|
||||
Card,
|
||||
Title,
|
||||
Table,
|
||||
TableHead,
|
||||
TableRow,
|
||||
TableCell,
|
||||
TableBody,
|
||||
Grid,
|
||||
Tab,
|
||||
TabGroup,
|
||||
TabList,
|
||||
TabPanel,
|
||||
TabPanels,
|
||||
Metric,
|
||||
Col,
|
||||
Text,
|
||||
SelectItem,
|
||||
TextInput,
|
||||
Button as TremorButton,
|
||||
Divider,
|
||||
} from "@tremor/react";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
import { message, Select, Spin, Typography, Tooltip, Input, Upload, Modal, Button } from "antd";
|
||||
import { Select, Spin, Typography, Tooltip, Input, Upload, Modal, Button } from "antd";
|
||||
import { makeOpenAIChatCompletionRequest } from "./llm_calls/chat_completion";
|
||||
import { makeOpenAIImageGenerationRequest } from "./llm_calls/image_generation";
|
||||
import { makeOpenAIImageEditsRequest } from "./llm_calls/image_edits";
|
||||
@@ -33,28 +18,26 @@ import { makeAnthropicMessagesRequest } from "./llm_calls/anthropic_messages";
|
||||
import { fetchAvailableModels, ModelGroup } from "./llm_calls/fetch_models";
|
||||
import { fetchAvailableMCPTools } from "./llm_calls/fetch_mcp_tools";
|
||||
import type { MCPTool } from "./llm_calls/fetch_mcp_tools";
|
||||
import { litellmModeMapping, ModelMode, EndpointType, getEndpointType } from "./mode_endpoint_mapping";
|
||||
import { EndpointType } from "./mode_endpoint_mapping";
|
||||
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
||||
import { coy } from "react-syntax-highlighter/dist/esm/styles/prism";
|
||||
import EndpointSelector from "./EndpointSelector";
|
||||
import TagSelector from "../tag_management/TagSelector";
|
||||
import VectorStoreSelector from "../vector_store_management/VectorStoreSelector";
|
||||
import GuardrailSelector from "../guardrails/GuardrailSelector";
|
||||
import { determineEndpointType } from "./EndpointUtils";
|
||||
import { generateCodeSnippet } from "./CodeSnippets";
|
||||
import { MessageType } from "./types";
|
||||
import ReasoningContent from "./ReasoningContent";
|
||||
import ResponseMetrics, { TokenUsage } from "./ResponseMetrics";
|
||||
import ResponsesImageUpload from "./ResponsesImageUpload";
|
||||
import ResponsesImageRenderer from "./ResponsesImageRenderer";
|
||||
import { convertImageToBase64, createMultimodalMessage, createDisplayMessage } from "./ResponsesImageUtils";
|
||||
import { createMultimodalMessage, createDisplayMessage } from "./ResponsesImageUtils";
|
||||
import ChatImageUpload from "./ChatImageUpload";
|
||||
import ChatImageRenderer from "./ChatImageRenderer";
|
||||
import { createChatMultimodalMessage, createChatDisplayMessage } from "./ChatImageUtils";
|
||||
import SessionManagement from "./SessionManagement";
|
||||
import MCPEventsDisplay, { MCPEvent } from "./MCPEventsDisplay";
|
||||
import {
|
||||
SendOutlined,
|
||||
ApiOutlined,
|
||||
KeyOutlined,
|
||||
ClearOutlined,
|
||||
@@ -66,7 +49,6 @@ import {
|
||||
DatabaseOutlined,
|
||||
InfoCircleOutlined,
|
||||
SafetyOutlined,
|
||||
UploadOutlined,
|
||||
PictureOutlined,
|
||||
CodeOutlined,
|
||||
ToolOutlined,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ModelGroup } from "./llm_calls/fetch_models";
|
||||
import { ModelMode, EndpointType, getEndpointType } from "./mode_endpoint_mapping";
|
||||
import { EndpointType, getEndpointType } from "./mode_endpoint_mapping";
|
||||
|
||||
/**
|
||||
* Determines the appropriate endpoint type based on the selected model
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from "react";
|
||||
import { Button, Collapse } from "antd";
|
||||
import { Button } from "antd";
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
||||
import { coy } from "react-syntax-highlighter/dist/esm/styles/prism";
|
||||
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
NumberOutlined,
|
||||
ImportOutlined,
|
||||
ExportOutlined,
|
||||
ThunderboltOutlined,
|
||||
BulbOutlined,
|
||||
ToolOutlined,
|
||||
} from "@ant-design/icons";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import { Upload, Tooltip } from "antd";
|
||||
import { PaperClipOutlined, DeleteOutlined } from "@ant-design/icons";
|
||||
import { PaperClipOutlined } from "@ant-design/icons";
|
||||
|
||||
const { Dragger } = Upload;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { Switch, Tooltip, message } from "antd";
|
||||
import { Switch, Tooltip } from "antd";
|
||||
import { InfoCircleOutlined, CopyOutlined } from "@ant-design/icons";
|
||||
import { EndpointType } from "./mode_endpoint_mapping";
|
||||
import NotificationsManager from "../molecules/notifications_manager";
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { message } from "antd";
|
||||
import Anthropic from "@anthropic-ai/sdk";
|
||||
import { MessageType } from "../types";
|
||||
import { TokenUsage } from "../ResponseMetrics";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import openai from "openai";
|
||||
import { ChatCompletionMessageParam } from "openai/resources/chat/completions";
|
||||
import { message } from "antd";
|
||||
import { TokenUsage } from "../ResponseMetrics";
|
||||
import { getProxyBaseUrl } from "@/components/networking";
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import NotificationManager from "@/components/molecules/notifications_manager";
|
||||
import { mcpToolsCall } from "../../networking";
|
||||
import { message } from "antd";
|
||||
|
||||
export interface MCPTool {
|
||||
name: string;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import openai from "openai";
|
||||
import { message } from "antd";
|
||||
import { getProxyBaseUrl } from "@/components/networking";
|
||||
import NotificationManager from "@/components/molecules/notifications_manager";
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import openai from "openai";
|
||||
import { message } from "antd";
|
||||
import { getProxyBaseUrl } from "@/components/networking";
|
||||
import NotificationManager from "@/components/molecules/notifications_manager";
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import openai from "openai";
|
||||
import { message } from "antd";
|
||||
import { MessageType } from "../types";
|
||||
import { TokenUsage } from "../ResponseMetrics";
|
||||
import { getProxyBaseUrl } from "@/components/networking";
|
||||
import { MCPTool } from "@/components/chat_ui/llm_calls/fetch_mcp_tools";
|
||||
import NotificationManager from "@/components/molecules/notifications_manager";
|
||||
import { MCPEvent } from "../MCPEventsDisplay";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Card, Title, Text, Button, Callout, TextInput } from "@tremor/react";
|
||||
import { Modal, Form, Input, message, Spin, Select } from "antd";
|
||||
import { Text, Button, Callout, TextInput } from "@tremor/react";
|
||||
import { Modal, Form, Spin, Select } from "antd";
|
||||
import NotificationsManager from "./molecules/notifications_manager";
|
||||
|
||||
interface CloudZeroExportModalProps {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { Card, Text, Badge } from "@tremor/react";
|
||||
import { Text, Badge } from "@tremor/react";
|
||||
import { RefreshIcon, ClockIcon } from "@heroicons/react/outline";
|
||||
|
||||
interface AutoRotationViewProps {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { message } from "antd";
|
||||
import { PlusCircleIcon, PencilIcon, TrashIcon } from "@heroicons/react/outline";
|
||||
import { Card, Title, Text, Table, TableHead, TableHeaderCell, TableBody, TableRow, TableCell } from "@tremor/react";
|
||||
import ModelSelector from "./ModelSelector";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ProxySettings, UserInfo } from "./user_dashboard";
|
||||
import { getProxyUISettings } from "./networking";
|
||||
|
||||
interface DashboardTeamProps {
|
||||
teams: Object[] | null;
|
||||
teams: object[] | null;
|
||||
setSelectedTeam: React.Dispatch<React.SetStateAction<any | null>>;
|
||||
userRole: string | null;
|
||||
proxySettings: ProxySettings | null;
|
||||
@@ -17,7 +17,7 @@ interface DashboardTeamProps {
|
||||
type TeamInterface = {
|
||||
models: any[];
|
||||
team_id: null;
|
||||
team_alias: String;
|
||||
team_alias: string;
|
||||
max_budget: number | null;
|
||||
};
|
||||
|
||||
|
||||
@@ -488,7 +488,7 @@ const GeneralSettings: React.FC<GeneralSettingsPageProps> = ({ accessToken, user
|
||||
|
||||
<TableBody>
|
||||
{routerSettings["fallbacks"] &&
|
||||
routerSettings["fallbacks"].map((item: Object, index: number) =>
|
||||
routerSettings["fallbacks"].map((item: object, index: number) =>
|
||||
Object.entries(item).map(([key, value]) => (
|
||||
<TableRow key={index.toString() + key}>
|
||||
<TableCell>{key}</TableCell>
|
||||
|
||||
@@ -11,7 +11,7 @@ export const fetchAllKeyAliases = async (accessToken: string | null): Promise<st
|
||||
if (!accessToken) return [];
|
||||
|
||||
try {
|
||||
const { aliases } = await keyAliasesCall(accessToken as unknown as String);
|
||||
const { aliases } = await keyAliasesCall(accessToken as unknown as string);
|
||||
// Defensive dedupe & null-guard
|
||||
return Array.from(new Set((aliases || []).filter(Boolean)));
|
||||
} catch (error) {
|
||||
|
||||
@@ -80,8 +80,8 @@ export const DEFAULT_ORGANIZATION = "default_organization";
|
||||
|
||||
export interface Model {
|
||||
model_name: string;
|
||||
litellm_params: Object;
|
||||
model_info: Object | null;
|
||||
litellm_params: object;
|
||||
model_info: object | null;
|
||||
}
|
||||
|
||||
interface PromptInfo {
|
||||
@@ -90,7 +90,7 @@ interface PromptInfo {
|
||||
|
||||
export interface PromptSpec {
|
||||
prompt_id: string;
|
||||
litellm_params: Object;
|
||||
litellm_params: object;
|
||||
prompt_info: PromptInfo;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
@@ -381,7 +381,7 @@ export const modelCreateCall = async (accessToken: string, formValues: Model) =>
|
||||
}
|
||||
};
|
||||
|
||||
export const modelSettingsCall = async (accessToken: String) => {
|
||||
export const modelSettingsCall = async (accessToken: string) => {
|
||||
/**
|
||||
* Get all configurable params for setting a model
|
||||
*/
|
||||
@@ -625,7 +625,7 @@ export const invitationClaimCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const alertingSettingsCall = async (accessToken: String) => {
|
||||
export const alertingSettingsCall = async (accessToken: string) => {
|
||||
/**
|
||||
* Get all configurable params for setting a model
|
||||
*/
|
||||
@@ -848,7 +848,7 @@ export const userCreateCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const keyDeleteCall = async (accessToken: String, user_key: String) => {
|
||||
export const keyDeleteCall = async (accessToken: string, user_key: string) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/key/delete` : `/key/delete`;
|
||||
console.log("in keyDeleteCall:", user_key);
|
||||
@@ -915,7 +915,7 @@ export const userDeleteCall = async (accessToken: string, userIds: string[]) =>
|
||||
}
|
||||
};
|
||||
|
||||
export const teamDeleteCall = async (accessToken: String, teamID: String) => {
|
||||
export const teamDeleteCall = async (accessToken: string, teamID: string) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/team/delete` : `/team/delete`;
|
||||
console.log("in teamDeleteCall:", teamID);
|
||||
@@ -956,7 +956,7 @@ export type UserListResponse = {
|
||||
};
|
||||
|
||||
export const userListCall = async (
|
||||
accessToken: String,
|
||||
accessToken: string,
|
||||
userIDs: string[] | null = null,
|
||||
page: number | null = null,
|
||||
page_size: number | null = null,
|
||||
@@ -1044,10 +1044,10 @@ export const userListCall = async (
|
||||
};
|
||||
|
||||
export const userInfoCall = async (
|
||||
accessToken: String,
|
||||
userID: String | null,
|
||||
userRole: String,
|
||||
viewAll: Boolean = false,
|
||||
accessToken: string,
|
||||
userID: string | null,
|
||||
userRole: string,
|
||||
viewAll: boolean = false,
|
||||
page: number | null,
|
||||
page_size: number | null,
|
||||
lookup_user_id: boolean = false,
|
||||
@@ -1098,7 +1098,7 @@ export const userInfoCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const teamInfoCall = async (accessToken: String, teamID: String | null) => {
|
||||
export const teamInfoCall = async (accessToken: string, teamID: string | null) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/team/info` : `/team/info`;
|
||||
if (teamID) {
|
||||
@@ -1139,9 +1139,9 @@ type TeamListResponse = {
|
||||
};
|
||||
|
||||
export const v2TeamListCall = async (
|
||||
accessToken: String,
|
||||
accessToken: string,
|
||||
organizationID: string | null,
|
||||
userID: String | null = null,
|
||||
userID: string | null = null,
|
||||
teamID: string | null = null,
|
||||
team_alias: string | null = null,
|
||||
page: number = 1,
|
||||
@@ -1204,9 +1204,9 @@ export const v2TeamListCall = async (
|
||||
};
|
||||
|
||||
export const teamListCall = async (
|
||||
accessToken: String,
|
||||
accessToken: string,
|
||||
organizationID: string | null,
|
||||
userID: String | null = null,
|
||||
userID: string | null = null,
|
||||
teamID: string | null = null,
|
||||
team_alias: string | null = null,
|
||||
) => {
|
||||
@@ -1264,7 +1264,7 @@ export const teamListCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const availableTeamListCall = async (accessToken: String) => {
|
||||
export const availableTeamListCall = async (accessToken: string) => {
|
||||
/**
|
||||
* Get all available teams on proxy
|
||||
*/
|
||||
@@ -1294,7 +1294,7 @@ export const availableTeamListCall = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const organizationListCall = async (accessToken: String) => {
|
||||
export const organizationListCall = async (accessToken: string) => {
|
||||
/**
|
||||
* Get all organizations on proxy
|
||||
*/
|
||||
@@ -1323,7 +1323,7 @@ export const organizationListCall = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const organizationInfoCall = async (accessToken: String, organizationID: String) => {
|
||||
export const organizationInfoCall = async (accessToken: string, organizationID: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/organization/info` : `/organization/info`;
|
||||
if (organizationID) {
|
||||
@@ -1466,7 +1466,7 @@ export const organizationDeleteCall = async (accessToken: string, organizationID
|
||||
}
|
||||
};
|
||||
|
||||
export const transformRequestCall = async (accessToken: String, request: object) => {
|
||||
export const transformRequestCall = async (accessToken: string, request: object) => {
|
||||
/**
|
||||
* Transform request
|
||||
*/
|
||||
@@ -1498,7 +1498,7 @@ export const transformRequestCall = async (accessToken: String, request: object)
|
||||
}
|
||||
};
|
||||
|
||||
export const userDailyActivityCall = async (accessToken: String, startTime: Date, endTime: Date, page: number = 1) => {
|
||||
export const userDailyActivityCall = async (accessToken: string, startTime: Date, endTime: Date, page: number = 1) => {
|
||||
/**
|
||||
* Get daily user activity on proxy
|
||||
*/
|
||||
@@ -1538,7 +1538,7 @@ export const userDailyActivityCall = async (accessToken: String, startTime: Date
|
||||
};
|
||||
|
||||
export const tagDailyActivityCall = async (
|
||||
accessToken: String,
|
||||
accessToken: string,
|
||||
startTime: Date,
|
||||
endTime: Date,
|
||||
page: number = 1,
|
||||
@@ -1586,7 +1586,7 @@ export const tagDailyActivityCall = async (
|
||||
};
|
||||
|
||||
export const teamDailyActivityCall = async (
|
||||
accessToken: String,
|
||||
accessToken: string,
|
||||
startTime: Date,
|
||||
endTime: Date,
|
||||
page: number = 1,
|
||||
@@ -1634,7 +1634,7 @@ export const teamDailyActivityCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const getTotalSpendCall = async (accessToken: String) => {
|
||||
export const getTotalSpendCall = async (accessToken: string) => {
|
||||
/**
|
||||
* Get all models on proxy
|
||||
*/
|
||||
@@ -1666,7 +1666,7 @@ export const getTotalSpendCall = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const getOnboardingCredentials = async (inviteUUID: String) => {
|
||||
export const getOnboardingCredentials = async (inviteUUID: string) => {
|
||||
/**
|
||||
* Get all models on proxy
|
||||
*/
|
||||
@@ -1701,7 +1701,7 @@ export const claimOnboardingToken = async (
|
||||
accessToken: string,
|
||||
inviteUUID: string,
|
||||
userID: string,
|
||||
password: String,
|
||||
password: string,
|
||||
) => {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/onboarding/claim_token` : `/onboarding/claim_token`;
|
||||
try {
|
||||
@@ -1769,7 +1769,7 @@ export const regenerateKeyCall = async (accessToken: string, keyToRegenerate: st
|
||||
let ModelListerrorShown = false;
|
||||
let errorTimer: NodeJS.Timeout | null = null;
|
||||
|
||||
export const modelInfoCall = async (accessToken: String, userID: String, userRole: String) => {
|
||||
export const modelInfoCall = async (accessToken: string, userID: string, userRole: string) => {
|
||||
/**
|
||||
* Get all models on proxy
|
||||
*/
|
||||
@@ -1821,7 +1821,7 @@ export const modelInfoCall = async (accessToken: String, userID: String, userRol
|
||||
}
|
||||
};
|
||||
|
||||
export const modelInfoV1Call = async (accessToken: String, modelId: String) => {
|
||||
export const modelInfoV1Call = async (accessToken: string, modelId: string) => {
|
||||
/**
|
||||
* Get all models on proxy
|
||||
*/
|
||||
@@ -1864,7 +1864,7 @@ export const modelHubPublicModelsCall = async () => {
|
||||
return response.json();
|
||||
};
|
||||
|
||||
export const modelHubCall = async (accessToken: String) => {
|
||||
export const modelHubCall = async (accessToken: string) => {
|
||||
/**
|
||||
* Get all models on proxy
|
||||
*/
|
||||
@@ -1899,7 +1899,7 @@ export const modelHubCall = async (accessToken: String) => {
|
||||
};
|
||||
|
||||
// Function to get allowed IPs
|
||||
export const getAllowedIPs = async (accessToken: String) => {
|
||||
export const getAllowedIPs = async (accessToken: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/get/allowed_ips` : `/get/allowed_ips`;
|
||||
|
||||
@@ -1928,7 +1928,7 @@ export const getAllowedIPs = async (accessToken: String) => {
|
||||
};
|
||||
|
||||
// Function to add an allowed IP
|
||||
export const addAllowedIP = async (accessToken: String, ip: String) => {
|
||||
export const addAllowedIP = async (accessToken: string, ip: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/add/allowed_ip` : `/add/allowed_ip`;
|
||||
|
||||
@@ -1958,7 +1958,7 @@ export const addAllowedIP = async (accessToken: String, ip: String) => {
|
||||
};
|
||||
|
||||
// Function to delete an allowed IP
|
||||
export const deleteAllowedIP = async (accessToken: String, ip: String) => {
|
||||
export const deleteAllowedIP = async (accessToken: string, ip: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/delete/allowed_ip` : `/delete/allowed_ip`;
|
||||
|
||||
@@ -1988,14 +1988,14 @@ export const deleteAllowedIP = async (accessToken: String, ip: String) => {
|
||||
};
|
||||
|
||||
export const modelMetricsCall = async (
|
||||
accessToken: String,
|
||||
userID: String,
|
||||
userRole: String,
|
||||
modelGroup: String | null,
|
||||
startTime: String | undefined,
|
||||
endTime: String | undefined,
|
||||
apiKey: String | null,
|
||||
customer: String | null,
|
||||
accessToken: string,
|
||||
userID: string,
|
||||
userRole: string,
|
||||
modelGroup: string | null,
|
||||
startTime: string | undefined,
|
||||
endTime: string | undefined,
|
||||
apiKey: string | null,
|
||||
customer: string | null,
|
||||
) => {
|
||||
/**
|
||||
* Get all models on proxy
|
||||
@@ -2031,10 +2031,10 @@ export const modelMetricsCall = async (
|
||||
}
|
||||
};
|
||||
export const streamingModelMetricsCall = async (
|
||||
accessToken: String,
|
||||
modelGroup: String | null,
|
||||
startTime: String | undefined,
|
||||
endTime: String | undefined,
|
||||
accessToken: string,
|
||||
modelGroup: string | null,
|
||||
startTime: string | undefined,
|
||||
endTime: string | undefined,
|
||||
) => {
|
||||
/**
|
||||
* Get all models on proxy
|
||||
@@ -2071,14 +2071,14 @@ export const streamingModelMetricsCall = async (
|
||||
};
|
||||
|
||||
export const modelMetricsSlowResponsesCall = async (
|
||||
accessToken: String,
|
||||
userID: String,
|
||||
userRole: String,
|
||||
modelGroup: String | null,
|
||||
startTime: String | undefined,
|
||||
endTime: String | undefined,
|
||||
apiKey: String | null,
|
||||
customer: String | null,
|
||||
accessToken: string,
|
||||
userID: string,
|
||||
userRole: string,
|
||||
modelGroup: string | null,
|
||||
startTime: string | undefined,
|
||||
endTime: string | undefined,
|
||||
apiKey: string | null,
|
||||
customer: string | null,
|
||||
) => {
|
||||
/**
|
||||
* Get all models on proxy
|
||||
@@ -2116,14 +2116,14 @@ export const modelMetricsSlowResponsesCall = async (
|
||||
};
|
||||
|
||||
export const modelExceptionsCall = async (
|
||||
accessToken: String,
|
||||
userID: String,
|
||||
userRole: String,
|
||||
modelGroup: String | null,
|
||||
startTime: String | undefined,
|
||||
endTime: String | undefined,
|
||||
apiKey: String | null,
|
||||
customer: String | null,
|
||||
accessToken: string,
|
||||
userID: string,
|
||||
userRole: string,
|
||||
modelGroup: string | null,
|
||||
startTime: string | undefined,
|
||||
endTime: string | undefined,
|
||||
apiKey: string | null,
|
||||
customer: string | null,
|
||||
) => {
|
||||
/**
|
||||
* Get all models on proxy
|
||||
@@ -2159,7 +2159,7 @@ export const modelExceptionsCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const updateUsefulLinksCall = async (accessToken: String, useful_links: Record<string, string>) => {
|
||||
export const updateUsefulLinksCall = async (accessToken: string, useful_links: Record<string, string>) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/model_hub/update_useful_links` : `/model_hub/update_useful_links`;
|
||||
const response = await fetch(url, {
|
||||
@@ -2185,11 +2185,11 @@ export const updateUsefulLinksCall = async (accessToken: String, useful_links: R
|
||||
};
|
||||
|
||||
export const modelAvailableCall = async (
|
||||
accessToken: String,
|
||||
userID: String,
|
||||
userRole: String,
|
||||
accessToken: string,
|
||||
userID: string,
|
||||
userRole: string,
|
||||
return_wildcard_routes: boolean = false,
|
||||
teamID: String | null = null,
|
||||
teamID: string | null = null,
|
||||
include_model_access_groups: boolean = false,
|
||||
only_model_access_groups: boolean = false,
|
||||
) => {
|
||||
@@ -2240,7 +2240,7 @@ export const modelAvailableCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const keySpendLogsCall = async (accessToken: String, token: String) => {
|
||||
export const keySpendLogsCall = async (accessToken: string, token: string) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/logs` : `/global/spend/logs`;
|
||||
console.log("in keySpendLogsCall:", url);
|
||||
@@ -2267,7 +2267,7 @@ export const keySpendLogsCall = async (accessToken: String, token: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const teamSpendLogsCall = async (accessToken: String) => {
|
||||
export const teamSpendLogsCall = async (accessToken: string) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/teams` : `/global/spend/teams`;
|
||||
console.log("in teamSpendLogsCall:", url);
|
||||
@@ -2295,10 +2295,10 @@ export const teamSpendLogsCall = async (accessToken: String) => {
|
||||
};
|
||||
|
||||
export const tagsSpendLogsCall = async (
|
||||
accessToken: String,
|
||||
startTime: String | undefined,
|
||||
endTime: String | undefined,
|
||||
tags: String[] | undefined,
|
||||
accessToken: string,
|
||||
startTime: string | undefined,
|
||||
endTime: string | undefined,
|
||||
tags: string[] | undefined,
|
||||
) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/tags` : `/global/spend/tags`;
|
||||
@@ -2336,7 +2336,7 @@ export const tagsSpendLogsCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const allTagNamesCall = async (accessToken: String) => {
|
||||
export const allTagNamesCall = async (accessToken: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/all_tag_names` : `/global/spend/all_tag_names`;
|
||||
|
||||
@@ -2364,7 +2364,7 @@ export const allTagNamesCall = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const allEndUsersCall = async (accessToken: String) => {
|
||||
export const allEndUsersCall = async (accessToken: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/customer/list` : `/customer/list`;
|
||||
|
||||
@@ -2392,7 +2392,7 @@ export const allEndUsersCall = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const userFilterUICall = async (accessToken: String, params: URLSearchParams) => {
|
||||
export const userFilterUICall = async (accessToken: string, params: URLSearchParams) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/user/filter/ui` : `/user/filter/ui`;
|
||||
|
||||
@@ -2425,12 +2425,12 @@ export const userFilterUICall = async (accessToken: String, params: URLSearchPar
|
||||
};
|
||||
|
||||
export const userSpendLogsCall = async (
|
||||
accessToken: String,
|
||||
token: String,
|
||||
userRole: String,
|
||||
userID: String,
|
||||
startTime: String,
|
||||
endTime: String,
|
||||
accessToken: string,
|
||||
token: string,
|
||||
userRole: string,
|
||||
userID: string,
|
||||
startTime: string,
|
||||
endTime: string,
|
||||
) => {
|
||||
try {
|
||||
console.log(`user role in spend logs call: ${userRole}`);
|
||||
@@ -2466,7 +2466,7 @@ export const userSpendLogsCall = async (
|
||||
};
|
||||
|
||||
export const uiSpendLogsCall = async (
|
||||
accessToken: String,
|
||||
accessToken: string,
|
||||
api_key?: string,
|
||||
team_id?: string,
|
||||
request_id?: string,
|
||||
@@ -2528,7 +2528,7 @@ export const uiSpendLogsCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const adminSpendLogsCall = async (accessToken: String) => {
|
||||
export const adminSpendLogsCall = async (accessToken: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/logs` : `/global/spend/logs`;
|
||||
|
||||
@@ -2557,7 +2557,7 @@ export const adminSpendLogsCall = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const adminTopKeysCall = async (accessToken: String) => {
|
||||
export const adminTopKeysCall = async (accessToken: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/keys?limit=5` : `/global/spend/keys?limit=5`;
|
||||
|
||||
@@ -2587,10 +2587,10 @@ export const adminTopKeysCall = async (accessToken: String) => {
|
||||
};
|
||||
|
||||
export const adminTopEndUsersCall = async (
|
||||
accessToken: String,
|
||||
keyToken: String | null,
|
||||
startTime: String | undefined,
|
||||
endTime: String | undefined,
|
||||
accessToken: string,
|
||||
keyToken: string | null,
|
||||
startTime: string | undefined,
|
||||
endTime: string | undefined,
|
||||
) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/end_users` : `/global/spend/end_users`;
|
||||
@@ -2637,10 +2637,10 @@ export const adminTopEndUsersCall = async (
|
||||
};
|
||||
|
||||
export const adminspendByProvider = async (
|
||||
accessToken: String,
|
||||
keyToken: String | null,
|
||||
startTime: String | undefined,
|
||||
endTime: String | undefined,
|
||||
accessToken: string,
|
||||
keyToken: string | null,
|
||||
startTime: string | undefined,
|
||||
endTime: string | undefined,
|
||||
) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/provider` : `/global/spend/provider`;
|
||||
@@ -2679,9 +2679,9 @@ export const adminspendByProvider = async (
|
||||
};
|
||||
|
||||
export const adminGlobalActivity = async (
|
||||
accessToken: String,
|
||||
startTime: String | undefined,
|
||||
endTime: String | undefined,
|
||||
accessToken: string,
|
||||
startTime: string | undefined,
|
||||
endTime: string | undefined,
|
||||
) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/activity` : `/global/activity`;
|
||||
@@ -2716,9 +2716,9 @@ export const adminGlobalActivity = async (
|
||||
};
|
||||
|
||||
export const adminGlobalCacheActivity = async (
|
||||
accessToken: String,
|
||||
startTime: String | undefined,
|
||||
endTime: String | undefined,
|
||||
accessToken: string,
|
||||
startTime: string | undefined,
|
||||
endTime: string | undefined,
|
||||
) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/activity/cache_hits` : `/global/activity/cache_hits`;
|
||||
@@ -2753,9 +2753,9 @@ export const adminGlobalCacheActivity = async (
|
||||
};
|
||||
|
||||
export const adminGlobalActivityPerModel = async (
|
||||
accessToken: String,
|
||||
startTime: String | undefined,
|
||||
endTime: String | undefined,
|
||||
accessToken: string,
|
||||
startTime: string | undefined,
|
||||
endTime: string | undefined,
|
||||
) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/activity/model` : `/global/activity/model`;
|
||||
@@ -2790,10 +2790,10 @@ export const adminGlobalActivityPerModel = async (
|
||||
};
|
||||
|
||||
export const adminGlobalActivityExceptions = async (
|
||||
accessToken: String,
|
||||
startTime: String | undefined,
|
||||
endTime: String | undefined,
|
||||
modelGroup: String,
|
||||
accessToken: string,
|
||||
startTime: string | undefined,
|
||||
endTime: string | undefined,
|
||||
modelGroup: string,
|
||||
) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/activity/exceptions` : `/global/activity/exceptions`;
|
||||
@@ -2832,10 +2832,10 @@ export const adminGlobalActivityExceptions = async (
|
||||
};
|
||||
|
||||
export const adminGlobalActivityExceptionsPerDeployment = async (
|
||||
accessToken: String,
|
||||
startTime: String | undefined,
|
||||
endTime: String | undefined,
|
||||
modelGroup: String,
|
||||
accessToken: string,
|
||||
startTime: string | undefined,
|
||||
endTime: string | undefined,
|
||||
modelGroup: string,
|
||||
) => {
|
||||
try {
|
||||
let url = proxyBaseUrl
|
||||
@@ -2875,7 +2875,7 @@ export const adminGlobalActivityExceptionsPerDeployment = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const adminTopModelsCall = async (accessToken: String) => {
|
||||
export const adminTopModelsCall = async (accessToken: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/global/spend/models?limit=5` : `/global/spend/models?limit=5`;
|
||||
|
||||
@@ -2904,7 +2904,7 @@ export const adminTopModelsCall = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const keyInfoCall = async (accessToken: String, keys: String[]) => {
|
||||
export const keyInfoCall = async (accessToken: string, keys: string[]) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/v2/key/info` : `/v2/key/info`;
|
||||
|
||||
@@ -3029,7 +3029,7 @@ export const keyInfoV1Call = async (accessToken: string, key: string) => {
|
||||
};
|
||||
|
||||
export const keyListCall = async (
|
||||
accessToken: String,
|
||||
accessToken: string,
|
||||
organizationID: string | null,
|
||||
teamID: string | null,
|
||||
selectedKeyAlias: string | null,
|
||||
@@ -3117,7 +3117,7 @@ export const keyListCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const keyAliasesCall = async (accessToken: String): Promise<{ aliases: string[] }> => {
|
||||
export const keyAliasesCall = async (accessToken: string): Promise<{ aliases: string[] }> => {
|
||||
/**
|
||||
* Get all key aliases from proxy
|
||||
*/
|
||||
@@ -3149,7 +3149,7 @@ export const keyAliasesCall = async (accessToken: String): Promise<{ aliases: st
|
||||
}
|
||||
};
|
||||
|
||||
export const spendUsersCall = async (accessToken: String, userID: String) => {
|
||||
export const spendUsersCall = async (accessToken: string, userID: string) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/spend/users` : `/spend/users`;
|
||||
console.log("in spendUsersCall:", url);
|
||||
@@ -3177,10 +3177,10 @@ export const spendUsersCall = async (accessToken: String, userID: String) => {
|
||||
};
|
||||
|
||||
export const userRequestModelCall = async (
|
||||
accessToken: String,
|
||||
model: String,
|
||||
UserID: String,
|
||||
justification: String,
|
||||
accessToken: string,
|
||||
model: string,
|
||||
UserID: string,
|
||||
justification: string,
|
||||
) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/user/request_model` : `/user/request_model`;
|
||||
@@ -3215,7 +3215,7 @@ export const userRequestModelCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const userGetRequesedtModelsCall = async (accessToken: String) => {
|
||||
export const userGetRequesedtModelsCall = async (accessToken: string) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/user/get_requests` : `/user/get_requests`;
|
||||
console.log("in userGetRequesedtModelsCall:", url);
|
||||
@@ -3252,7 +3252,7 @@ export interface User {
|
||||
[key: string]: string; // Include any other potential keys in the dictionary
|
||||
}
|
||||
|
||||
export const userDailyActivityAggregatedCall = async (accessToken: String, startTime: Date, endTime: Date) => {
|
||||
export const userDailyActivityAggregatedCall = async (accessToken: string, startTime: Date, endTime: Date) => {
|
||||
/**
|
||||
* Get aggregated daily user activity (no pagination)
|
||||
*/
|
||||
@@ -3296,7 +3296,7 @@ export const userDailyActivityAggregatedCall = async (accessToken: String, start
|
||||
}
|
||||
};
|
||||
|
||||
export const userGetAllUsersCall = async (accessToken: String, role: String) => {
|
||||
export const userGetAllUsersCall = async (accessToken: string, role: string) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/user/get_users?role=${role}` : `/user/get_users?role=${role}`;
|
||||
console.log("in userGetAllUsersCall:", url);
|
||||
@@ -3326,7 +3326,7 @@ export const userGetAllUsersCall = async (accessToken: String, role: String) =>
|
||||
}
|
||||
};
|
||||
|
||||
export const getPossibleUserRoles = async (accessToken: String) => {
|
||||
export const getPossibleUserRoles = async (accessToken: string) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/user/available_roles` : `/user/available_roles`;
|
||||
const response = await fetch(url, {
|
||||
@@ -3443,7 +3443,7 @@ export const credentialCreateCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const credentialListCall = async (accessToken: String) => {
|
||||
export const credentialListCall = async (accessToken: string) => {
|
||||
/**
|
||||
* Get all available teams on proxy
|
||||
*/
|
||||
@@ -3476,7 +3476,7 @@ export const credentialListCall = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const credentialGetCall = async (accessToken: String, credentialName: String | null, modelId: String | null) => {
|
||||
export const credentialGetCall = async (accessToken: string, credentialName: string | null, modelId: string | null) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/credentials` : `/credentials`;
|
||||
|
||||
@@ -3513,7 +3513,7 @@ export const credentialGetCall = async (accessToken: String, credentialName: Str
|
||||
}
|
||||
};
|
||||
|
||||
export const credentialDeleteCall = async (accessToken: String, credentialName: String) => {
|
||||
export const credentialDeleteCall = async (accessToken: string, credentialName: string) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/credentials/${credentialName}` : `/credentials/${credentialName}`;
|
||||
console.log("in credentialDeleteCall:", credentialName);
|
||||
@@ -4243,7 +4243,7 @@ export const PredictedSpendLogsCall = async (accessToken: string, requestData: a
|
||||
}
|
||||
};
|
||||
|
||||
export const slackBudgetAlertsHealthCheck = async (accessToken: String) => {
|
||||
export const slackBudgetAlertsHealthCheck = async (accessToken: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl
|
||||
? `${proxyBaseUrl}/health/services?service=slack_budget_alerts`
|
||||
@@ -4280,7 +4280,7 @@ export const slackBudgetAlertsHealthCheck = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const serviceHealthCheck = async (accessToken: String, service: String) => {
|
||||
export const serviceHealthCheck = async (accessToken: string, service: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl
|
||||
? `${proxyBaseUrl}/health/services?service=${service}`
|
||||
@@ -4312,7 +4312,7 @@ export const serviceHealthCheck = async (accessToken: String, service: String) =
|
||||
}
|
||||
};
|
||||
|
||||
export const getBudgetList = async (accessToken: String) => {
|
||||
export const getBudgetList = async (accessToken: string) => {
|
||||
/**
|
||||
* Get all configurable params for setting a budget
|
||||
*/
|
||||
@@ -4344,7 +4344,7 @@ export const getBudgetList = async (accessToken: String) => {
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
export const getBudgetSettings = async (accessToken: String) => {
|
||||
export const getBudgetSettings = async (accessToken: string) => {
|
||||
/**
|
||||
* Get all configurable params for setting a budget
|
||||
*/
|
||||
@@ -4377,7 +4377,7 @@ export const getBudgetSettings = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const getCallbacksCall = async (accessToken: String, userID: String, userRole: String) => {
|
||||
export const getCallbacksCall = async (accessToken: string, userID: string, userRole: string) => {
|
||||
/**
|
||||
* Get all the models user has access to
|
||||
*/
|
||||
@@ -4410,7 +4410,7 @@ export const getCallbacksCall = async (accessToken: String, userID: String, user
|
||||
}
|
||||
};
|
||||
|
||||
export const getGeneralSettingsCall = async (accessToken: String) => {
|
||||
export const getGeneralSettingsCall = async (accessToken: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl
|
||||
? `${proxyBaseUrl}/config/list?config_type=general_settings`
|
||||
@@ -4442,7 +4442,7 @@ export const getGeneralSettingsCall = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const getPassThroughEndpointsCall = async (accessToken: String) => {
|
||||
export const getPassThroughEndpointsCall = async (accessToken: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/config/pass_through_endpoint` : `/config/pass_through_endpoint`;
|
||||
|
||||
@@ -4472,7 +4472,7 @@ export const getPassThroughEndpointsCall = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const getConfigFieldSetting = async (accessToken: String, fieldName: string) => {
|
||||
export const getConfigFieldSetting = async (accessToken: string, fieldName: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl
|
||||
? `${proxyBaseUrl}/config/field/info?field_name=${fieldName}`
|
||||
@@ -4503,7 +4503,7 @@ export const getConfigFieldSetting = async (accessToken: String, fieldName: stri
|
||||
}
|
||||
};
|
||||
|
||||
export const updatePassThroughFieldSetting = async (accessToken: String, fieldName: string, fieldValue: any) => {
|
||||
export const updatePassThroughFieldSetting = async (accessToken: string, fieldName: string, fieldValue: any) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/config/pass_through_endpoint` : `/config/pass_through_endpoint`;
|
||||
|
||||
@@ -4539,7 +4539,7 @@ export const updatePassThroughFieldSetting = async (accessToken: String, fieldNa
|
||||
}
|
||||
};
|
||||
|
||||
export const createPassThroughEndpoint = async (accessToken: String, formValues: Record<string, any>) => {
|
||||
export const createPassThroughEndpoint = async (accessToken: string, formValues: Record<string, any>) => {
|
||||
/**
|
||||
* Set callbacks on proxy
|
||||
*/
|
||||
@@ -4575,7 +4575,7 @@ export const createPassThroughEndpoint = async (accessToken: String, formValues:
|
||||
}
|
||||
};
|
||||
|
||||
export const updateConfigFieldSetting = async (accessToken: String, fieldName: string, fieldValue: any) => {
|
||||
export const updateConfigFieldSetting = async (accessToken: string, fieldName: string, fieldValue: any) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/config/field/update` : `/config/field/update`;
|
||||
|
||||
@@ -4612,7 +4612,7 @@ export const updateConfigFieldSetting = async (accessToken: String, fieldName: s
|
||||
}
|
||||
};
|
||||
|
||||
export const deleteConfigFieldSetting = async (accessToken: String, fieldName: String) => {
|
||||
export const deleteConfigFieldSetting = async (accessToken: string, fieldName: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl ? `${proxyBaseUrl}/config/field/delete` : `/config/field/delete`;
|
||||
|
||||
@@ -4647,7 +4647,7 @@ export const deleteConfigFieldSetting = async (accessToken: String, fieldName: S
|
||||
}
|
||||
};
|
||||
|
||||
export const deletePassThroughEndpointsCall = async (accessToken: String, endpointId: string) => {
|
||||
export const deletePassThroughEndpointsCall = async (accessToken: string, endpointId: string) => {
|
||||
try {
|
||||
let url = proxyBaseUrl
|
||||
? `${proxyBaseUrl}/config/pass_through_endpoint?endpoint_id=${endpointId}`
|
||||
@@ -4679,7 +4679,7 @@ export const deletePassThroughEndpointsCall = async (accessToken: String, endpoi
|
||||
}
|
||||
};
|
||||
|
||||
export const setCallbacksCall = async (accessToken: String, formValues: Record<string, any>) => {
|
||||
export const setCallbacksCall = async (accessToken: string, formValues: Record<string, any>) => {
|
||||
/**
|
||||
* Set callbacks on proxy
|
||||
*/
|
||||
@@ -4715,7 +4715,7 @@ export const setCallbacksCall = async (accessToken: String, formValues: Record<s
|
||||
}
|
||||
};
|
||||
|
||||
export const healthCheckCall = async (accessToken: String) => {
|
||||
export const healthCheckCall = async (accessToken: string) => {
|
||||
/**
|
||||
* Get all the models user has access to
|
||||
*/
|
||||
@@ -4748,7 +4748,7 @@ export const healthCheckCall = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const individualModelHealthCheckCall = async (accessToken: String, modelName: string) => {
|
||||
export const individualModelHealthCheckCall = async (accessToken: string, modelName: string) => {
|
||||
/**
|
||||
* Run health check for a specific model using model name
|
||||
*/
|
||||
@@ -4780,7 +4780,7 @@ export const individualModelHealthCheckCall = async (accessToken: String, modelN
|
||||
}
|
||||
};
|
||||
|
||||
export const cachingHealthCheckCall = async (accessToken: String) => {
|
||||
export const cachingHealthCheckCall = async (accessToken: string) => {
|
||||
/**
|
||||
* Get all the models user has access to
|
||||
*/
|
||||
@@ -4813,7 +4813,7 @@ export const cachingHealthCheckCall = async (accessToken: String) => {
|
||||
};
|
||||
|
||||
export const healthCheckHistoryCall = async (
|
||||
accessToken: String,
|
||||
accessToken: string,
|
||||
model?: string,
|
||||
statusFilter?: string,
|
||||
limit: number = 100,
|
||||
@@ -4857,7 +4857,7 @@ export const healthCheckHistoryCall = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const latestHealthChecksCall = async (accessToken: String) => {
|
||||
export const latestHealthChecksCall = async (accessToken: string) => {
|
||||
/**
|
||||
* Get the latest health check status for all models
|
||||
*/
|
||||
@@ -4886,7 +4886,7 @@ export const latestHealthChecksCall = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const getProxyUISettings = async (accessToken: String) => {
|
||||
export const getProxyUISettings = async (accessToken: string) => {
|
||||
/**
|
||||
* Get all the models user has access to
|
||||
*/
|
||||
@@ -4921,7 +4921,7 @@ export const getProxyUISettings = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const getGuardrailsList = async (accessToken: String) => {
|
||||
export const getGuardrailsList = async (accessToken: string) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/v2/guardrails/list` : `/v2/guardrails/list`;
|
||||
const response = await fetch(url, {
|
||||
@@ -4947,7 +4947,7 @@ export const getGuardrailsList = async (accessToken: String) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const getPromptsList = async (accessToken: String): Promise<ListPromptsResponse> => {
|
||||
export const getPromptsList = async (accessToken: string): Promise<ListPromptsResponse> => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/prompts/list` : `/prompts/list`;
|
||||
const response = await fetch(url, {
|
||||
@@ -4973,7 +4973,7 @@ export const getPromptsList = async (accessToken: String): Promise<ListPromptsRe
|
||||
}
|
||||
};
|
||||
|
||||
export const getPromptInfo = async (accessToken: String, promptId: string): Promise<PromptInfoResponse> => {
|
||||
export const getPromptInfo = async (accessToken: string, promptId: string): Promise<PromptInfoResponse> => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/prompts/${promptId}/info` : `/prompts/${promptId}/info`;
|
||||
const response = await fetch(url, {
|
||||
@@ -5393,7 +5393,7 @@ export const updateMCPServer = async (accessToken: string, formValues: Record<st
|
||||
}
|
||||
};
|
||||
|
||||
export const deleteMCPServer = async (accessToken: String, serverId: String) => {
|
||||
export const deleteMCPServer = async (accessToken: string, serverId: string) => {
|
||||
try {
|
||||
const url = (proxyBaseUrl ? `${proxyBaseUrl}` : "") + `/v1/mcp/server/${serverId}`;
|
||||
console.log("in deleteMCPServer:", serverId);
|
||||
@@ -6270,7 +6270,7 @@ export const updateSSOSettings = async (accessToken: string, settings: Record<st
|
||||
};
|
||||
|
||||
export const uiAuditLogsCall = async (
|
||||
accessToken: String,
|
||||
accessToken: string,
|
||||
start_date?: string,
|
||||
end_date?: string,
|
||||
page?: number,
|
||||
@@ -6424,7 +6424,7 @@ export const getPassThroughEndpointInfo = async (accessToken: string, endpointPa
|
||||
}
|
||||
};
|
||||
|
||||
export const deleteCallback = async (accessToken: String, callbackName: string) => {
|
||||
export const deleteCallback = async (accessToken: string, callbackName: string) => {
|
||||
/**
|
||||
* Delete specific callback from proxy using the /config/callback/delete API
|
||||
*/
|
||||
|
||||
@@ -59,7 +59,7 @@ interface UserDashboardProps {
|
||||
type TeamInterface = {
|
||||
models: any[];
|
||||
team_id: null;
|
||||
team_alias: String;
|
||||
team_alias: string;
|
||||
};
|
||||
|
||||
const UserDashboard: React.FC<UserDashboardProps> = ({
|
||||
|
||||
@@ -34,7 +34,7 @@ interface ViewUserDashboardProps {
|
||||
userRole: string | null;
|
||||
userID: string | null;
|
||||
teams: any[] | null;
|
||||
setKeys: React.Dispatch<React.SetStateAction<Object[] | null>>;
|
||||
setKeys: React.Dispatch<React.SetStateAction<object[] | null>>;
|
||||
}
|
||||
|
||||
interface FilterState {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import NotificationsManager from "@/components/molecules/notifications_manager";
|
||||
|
||||
export function updateExistingKeys<Source extends Object>(target: Source, source: Object): Source {
|
||||
export function updateExistingKeys<Source extends object>(target: Source, source: object): Source {
|
||||
const clonedTarget = structuredClone(target);
|
||||
|
||||
for (const [key, value] of Object.entries(source)) {
|
||||
|
||||
Reference in New Issue
Block a user