import React from "react"; import { Select } from "antd"; import { Text } from "@tremor/react"; import { EndpointType } from "./mode_endpoint_mapping"; interface EndpointSelectorProps { endpointType: string; // Accept string to avoid type conflicts onEndpointChange: (value: string) => void; className?: string; } /** * A reusable component for selecting API endpoints */ const EndpointSelector: React.FC = ({ endpointType, onEndpointChange, className, }) => { // Map endpoint types to their display labels const endpointOptions = [ { value: EndpointType.CHAT, label: '/v1/chat/completions' }, { value: EndpointType.RESPONSES, label: '/v1/responses' }, { value: EndpointType.IMAGE, label: '/v1/images/generations' }, ]; return (
Endpoint Type: