magnitude-test
Version:
A TypeScript client for running automated UI tests through the Magnitude testing platform
16 lines (15 loc) • 1.06 kB
TypeScript
import { LLMClientIdentifier } from 'magnitude-core';
export declare function isLoopbackIp(address: string): boolean;
export declare function isPrivateIp(address: string): boolean;
export declare function extractHostname(urlOrHostname: string): string;
export declare function cleanHostname(hostname: string): string;
export declare function isLocalhostDomain(hostname: string): boolean;
export declare function isLoopbackHost(urlOrHostname: string): boolean;
export declare function isPrivateHost(urlOrHostname: string): boolean;
export declare function isPrivateUrl(url: string): boolean;
export declare function isLoopbackUrl(url: string): boolean;
export declare function addProtocolIfMissing(url: string): string;
export declare function describeModel(client: LLMClientIdentifier): string;
export declare const knownCostMap: Record<string, number[]>;
export declare function calculateCost(modelId: string, inTokens: number, outTokens: number): number | undefined;
export declare function processUrl(...urls: (string | undefined)[]): string | undefined;