UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

122 lines (121 loc) 3.58 kB
/** * SageMaker Model Detection and Streaming Capability Discovery * * This module provides intelligent detection of SageMaker endpoint capabilities * including model type identification and streaming protocol support. */ import type { EndpointHealth, ModelDetectionResult, SageMakerConfig, StreamingCapability } from "../../types/index.js"; /** * SageMaker Model Detection and Capability Discovery Service */ export declare class SageMakerDetector { private client; private config; constructor(config: SageMakerConfig); /** * Detect streaming capabilities for a given endpoint */ detectStreamingCapability(endpointName: string): Promise<StreamingCapability>; /** * Detect the model type/framework for an endpoint */ detectModelType(endpointName: string): Promise<ModelDetectionResult>; /** * Check endpoint health and gather metadata */ checkEndpointHealth(endpointName: string): Promise<EndpointHealth>; /** * Test if endpoint supports streaming for given model type */ private testStreamingSupport; /** * Detect streaming protocol used by endpoint */ private detectStreamingProtocol; /** * Test for HuggingFace Transformers signature */ private testHuggingFaceSignature; /** * Test for LLaMA model signature */ private testLlamaSignature; /** * Test for PyTorch model signature */ private testPyTorchSignature; /** * Test for TensorFlow Serving signature */ private testTensorFlowSignature; /** * Get streaming test cases for a model type */ private getStreamingTestCases; /** * Check if response indicates streaming support */ private indicatesStreamingSupport; /** * Extract model information from response */ private extractModelInfo; /** * Get suggested configuration for detected model type */ private getSuggestedConfig; /** * Run detection tests in parallel with intelligent rate limiting and circuit breaker * Now uses configuration object for better parameter management */ private runDetectionTestsInParallel; /** * Create a semaphore for detection test concurrency control */ private createDetectionSemaphore; /** * Wrap a detection test with error handling, rate limiting, and retry logic * Now uses configuration object instead of multiple parameters */ private wrapDetectionTest; /** * Execute a test with staggered start to spread load */ private executeWithStaggeredStart; /** * Handle detection test errors with rate limiting and retry logic */ private handleDetectionTestError; /** * Check if an error indicates rate limiting */ private isRateLimitError; /** * Retry a test with exponential backoff */ private retryWithBackoff; /** * Execute wrapped tests with concurrency control */ private executeTestsWithConcurrencyControl; /** * Log detection test failure */ private logDetectionTestFailure; /** * Log detection test retry failure */ private logDetectionTestRetryFailure; /** * Log final detection results */ private logDetectionResults; /** * Create a no-streaming capability result */ private createNoStreamingCapability; } /** * Create a detector instance with configuration */ export declare function createSageMakerDetector(config: SageMakerConfig): SageMakerDetector;